Are we going to keep all locations seen, or only those seen in the last 24 hours? If the former, shouldn't we use them? If not, we have a space and cpu leak, albeit a slow one... (and yes I know it's my fault)
On Sat, Sep 09, 2006 at 10:26:40PM +0000, ljn1981 at freenetproject.org wrote: > Author: ljn1981 > Date: 2006-09-09 22:26:24 +0000 (Sat, 09 Sep 2006) > New Revision: 10446 > > Modified: > trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java > trunk/freenet/src/freenet/node/LocationManager.java > Log: > Well bombe's optimization helped speed but it turns out it's not working > right, I suspect the casting is wrong... > > > Modified: > trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java > =================================================================== > --- trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java > 2006-09-09 21:26:42 UTC (rev 10445) > +++ trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java > 2006-09-09 22:26:24 UTC (rev 10446) > @@ -142,6 +142,7 @@ > int bwlimitDelayTime = (int) node.getBwlimitDelayTime(); > int nodeAveragePingTime = (int) > node.getNodeAveragePingTime(); > int networkSizeEstimateSession = > node.getNetworkSizeEstimate(-1); > + //int networkSizeEstimateDay = > node.getNetworkSizeEstimate(now-86400000); > DecimalFormat fix4 = new DecimalFormat("0.0000"); > double missRoutingDistance = > node.missRoutingDistance.currentValue(); > DecimalFormat fix1 = new DecimalFormat("##0.0%"); > @@ -163,6 +164,7 @@ > overviewList.addChild("li", > "bwlimitDelayTime:\u00a0" + bwlimitDelayTime + "ms"); > overviewList.addChild("li", > "nodeAveragePingTime:\u00a0" + nodeAveragePingTime + "ms"); > overviewList.addChild("li", > "networkSizeEstimateSession:\u00a0" + networkSizeEstimateSession + > "\u00a0nodes"); > + //overviewList.addChild("li", > "networkSizeEstimateDay:\u00a0" + networkSizeEstimateDay + "\u00a0nodes"); > overviewList.addChild("li", "nodeUptime:\u00a0" > + nodeUptimeString); > overviewList.addChild("li", > "missRoutingDistance:\u00a0" + fix4.format(missRoutingDistance)); > overviewList.addChild("li", > "backedoffPercent:\u00a0" + fix1.format(backedoffPercent)); > > Modified: trunk/freenet/src/freenet/node/LocationManager.java > =================================================================== > --- trunk/freenet/src/freenet/node/LocationManager.java 2006-09-09 > 21:26:42 UTC (rev 10445) > +++ trunk/freenet/src/freenet/node/LocationManager.java 2006-09-09 > 22:26:24 UTC (rev 10446) > @@ -984,10 +984,10 @@ > else if (timestamp > -1) { > Date threshold = new Date(timestamp); > int numberOfLocationsInPeriod = 0; > - //TODO Optimize so it doesn't take forever.. > Iterator knownLocationsIterator = > knownLocs.values().iterator(); > while (knownLocationsIterator.hasNext()) { > - if (threshold.after((Date) > knownLocationsIterator.next())) { > + //FIXME: It's not counting :( > + if > (threshold.after((Date)knownLocationsIterator.next())) { > numberOfLocationsInPeriod++; > } > } > > _______________________________________________ > cvs mailing list > cvs at freenetproject.org > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20060919/665edb03/attachment.pgp>