Author: j16sdiz
Date: 2008-09-02 15:28:42 +0000 (Tue, 02 Sep 2008)
New Revision: 22350
Modified:
branches/saltedhashstore/freenet/.classpath
branches/saltedhashstore/freenet/.settings/org.eclipse.jdt.core.prefs
branches/saltedhashstore/freenet/src/freenet/clients/http/StatisticsToadlet.java
Log:
fix merge
Modified: branches/saltedhashstore/freenet/.classpath
===================================================================
--- branches/saltedhashstore/freenet/.classpath 2008-09-02 15:13:36 UTC (rev
22349)
+++ branches/saltedhashstore/freenet/.classpath 2008-09-02 15:28:42 UTC (rev
22350)
@@ -3,7 +3,7 @@
<classpathentry
excluding="freenet/node/*Test.java|plugins/JSTUN/**|test/**" kind="src"
path="src"/>
<classpathentry including="freenet/|org/" kind="src" path="test"/>
<classpathentry exported="true" kind="lib" path="lib/freenet-ext.jar"/>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/usr/share/java/junit.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/saltedhashstore/freenet/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/saltedhashstore/freenet/.settings/org.eclipse.jdt.core.prefs
2008-09-02 15:13:36 UTC (rev 22349)
+++ branches/saltedhashstore/freenet/.settings/org.eclipse.jdt.core.prefs
2008-09-02 15:28:42 UTC (rev 22350)
@@ -1,3 +1,4 @@
+#Thu Jul 17 14:26:28 BST 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
Modified:
branches/saltedhashstore/freenet/src/freenet/clients/http/StatisticsToadlet.java
===================================================================
---
branches/saltedhashstore/freenet/src/freenet/clients/http/StatisticsToadlet.java
2008-09-02 15:13:36 UTC (rev 22349)
+++
branches/saltedhashstore/freenet/src/freenet/clients/http/StatisticsToadlet.java
2008-09-02 15:28:42 UTC (rev 22350)
@@ -80,8 +80,7 @@
peers = node.peers;
}
- @Override
- public String supportedMethods() {
+ public String supportedMethods() {
return "GET";
}
@@ -121,7 +120,7 @@
}
@Override
- public void handleGet(URI uri, HTTPRequest request, ToadletContext ctx)
throws ToadletContextClosedException, IOException, RedirectException {
+ public void handleGet(URI uri, HTTPRequest request, ToadletContext ctx)
throws ToadletContextClosedException, IOException, RedirectException {
if(!ctx.isAllowedFullAccess()) {
super.sendErrorPage(ctx, 403,
L10n.getString("Toadlet.unauthorizedTitle"),
L10n.getString("Toadlet.unauthorized"));
@@ -172,8 +171,8 @@
contentNode.addChild(core.alerts.createSummary());
final int mode =
ctx.getPageMaker().drawModeSelectionArray(core, request, contentNode);
- double swaps = node.getSwaps();
- double noSwaps = node.getNoSwaps();
+ double swaps = (double)node.getSwaps();
+ double noSwaps = (double)node.getNoSwaps();
HTMLNode overviewTable = contentNode.addChild("table", "class",
"column");
HTMLNode overviewTableRow = overviewTable.addChild("tr");
@@ -396,9 +395,9 @@
HTMLNode jvmStatsList = jvmStatsInfoboxContent.addChild("ul");
Runtime rt = Runtime.getRuntime();
- float freeMemory = rt.freeMemory();
- float totalMemory = rt.totalMemory();
- float maxMemory = rt.maxMemory();
+ float freeMemory = (float) rt.freeMemory();
+ float totalMemory = (float) rt.totalMemory();
+ float maxMemory = (float) rt.maxMemory();
long usedJavaMem = (long)(totalMemory - freeMemory);
long allocatedJavaMem = (long)totalMemory;
@@ -472,8 +471,6 @@
long storeAccesses = storeHits + storeMisses;
long cacheWrites=node.getChkDatacache().writes();
long storeWrites=node.getChkDatastore().writes();
- long cacheFalsePos =
node.getChkDatacache().getBloomFalsePositive();
- long storeFalsePos =
node.getChkDatastore().getBloomFalsePositive();
// REDFLAG Don't show database version because it's not
possible to get it accurately.
// (It's a public static constant, so it will use the version
from compile time of freenet.jar)
@@ -548,11 +545,6 @@
row.addChild("td",
fix1p2.format(1.0*storeWrites/nodeUptimeSeconds)+" /sec");
row.addChild("td",
fix1p2.format(1.0*cacheWrites/nodeUptimeSeconds)+" /sec");
- row = storeSizeTable.addChild("tr");
- row.addChild("td", "False Pos.");
- row.addChild("td", thousendPoint.format(storeFalsePos));
- row.addChild("td", thousendPoint.format(cacheFalsePos));
-
// location-based stats
double nodeLoc=0.0;
@@ -972,7 +964,7 @@
int networkSizeEstimateSession =
stats.getNetworkSizeEstimate(-1);
int networkSizeEstimate24h = 0;
int networkSizeEstimate48h = 0;
- double numberOfRemotePeerLocationsSeenInSwaps =
node.getNumberOfRemotePeerLocationsSeenInSwaps();
+ double numberOfRemotePeerLocationsSeenInSwaps =
(double)node.getNumberOfRemotePeerLocationsSeenInSwaps();
if(nodeUptimeSeconds > (24*60*60)) { // 24 hours
networkSizeEstimate24h =
stats.getNetworkSizeEstimate(now - (24*60*60*1000)); // 48 hours
@@ -1247,7 +1239,7 @@
// Make our own peer stand out from the crowd better so
we can see it easier
offset = -10;
} else {
- offset = (int) ((PEER_CIRCLE_INNER_RADIUS) * (1.0 -
strength));
+ offset = (int) (((double) PEER_CIRCLE_INNER_RADIUS) *
(1.0 - strength));
}
double x = PEER_CIRCLE_ADDITIONAL_FREE_SPACE +
PEER_CIRCLE_RADIUS + Math.sin(peerLocation) * (PEER_CIRCLE_RADIUS - offset);
double y = PEER_CIRCLE_RADIUS - Math.cos(peerLocation) *
(PEER_CIRCLE_RADIUS - offset); // no PEER_CIRCLE_ADDITIONAL_FREE_SPACE for
y-disposition