Author: bback
Date: 2006-10-06 17:36:01 +0000 (Fri, 06 Oct 2006)
New Revision: 10640
Modified:
trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
trunk/freenet/src/freenet/node/Node.java
Log:
final store size stats
Modified: trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
2006-10-06 17:29:45 UTC (rev 10639)
+++ trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
2006-10-06 17:36:01 UTC (rev 10640)
@@ -359,9 +359,9 @@
long overallKeys = cachedKeys + storeKeys;
long overallSize = cachedSize + storeSize;
- long maxCachedKeys = node.getChkDatacache().getMaxKeys();
- long maxStoreKeys = node.getChkDatastore().getMaxKeys();
- long maxOverallKeys = maxCachedKeys + maxStoreKeys;
+// long maxCachedKeys = node.getChkDatacache().getMaxKeys();
+// long maxStoreKeys = node.getChkDatastore().getMaxKeys();
+ long maxOverallKeys = node.getMaxTotalKeys();
long maxOverallSize = maxOverallKeys * fix32kb;
long cachedStoreHits = node.getChkDatacache().hits();
@@ -374,32 +374,28 @@
storeSizeList.addChild("li",
"Cached keys:\u00a0" +
thousendPoint.format(cachedKeys) +
- "\u00a0(~" + SizeUtil.formatSize(cachedSize) + ")");
+ "\u00a0(" + SizeUtil.formatSize(cachedSize) + ")");
storeSizeList.addChild("li",
+ "Stored keys:\u00a0" + thousendPoint.format(storeKeys)
+
+ "\u00a0(" + SizeUtil.formatSize(storeSize) + ")");
+
+ storeSizeList.addChild("li",
+ "Overall size:\u00a0" +
thousendPoint.format(overallKeys) + "/" + thousendPoint.format(maxOverallKeys) +
+ "\u00a0(" + SizeUtil.formatSize(overallSize) + "/" +
SizeUtil.formatSize(maxOverallSize) + ")");
+
+ storeSizeList.addChild("li",
"Cache hits:\u00a0" +
thousendPoint.format(cachedStoreHits) +
"\u00a0/\u00a0"+thousendPoint.format(cacheAccesses) +
"\u00a0(" + ((cachedStoreHits*100) / (cacheAccesses))
+ "%)");
storeSizeList.addChild("li",
- "Stored keys:\u00a0" + thousendPoint.format(storeKeys)
+
- "\u00a0(~" + SizeUtil.formatSize(storeSize) + ")");
-
- storeSizeList.addChild("li",
"Store hits:\u00a0" + thousendPoint.format(storeHits)
+
"\u00a0/\u00a0"+thousendPoint.format(storeAccesses) +
"\u00a0(" + ((storeHits*100) / (storeAccesses)) +
"%)");
storeSizeList.addChild("li",
"Avg. access rate:\u00a0" +
thousendPoint.format(overallAccesses/nodeUptimeSeconds) + "/s");
-
- storeSizeList.addChild("li",
- "Overall size:\u00a0" +
thousendPoint.format(overallKeys) + "/" + thousendPoint.format(maxOverallKeys) +
- "\u00a0(~" + SizeUtil.formatSize(overallSize) + "/" +
SizeUtil.formatSize(maxOverallSize) + ")");
-
- // FIXME: DEBUG
- storeSizeList.addChild("li",
- "Debug(max_C/S):\u00a0" +
thousendPoint.format(maxCachedKeys) + "/" + thousendPoint.format(maxStoreKeys));
}
nextTableCell = advancedEnabled ? overviewTableRow.addChild("td")
: overviewTableRow.addChild("td", "class", "last");
Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java 2006-10-06 17:29:45 UTC (rev
10639)
+++ trunk/freenet/src/freenet/node/Node.java 2006-10-06 17:36:01 UTC (rev
10640)
@@ -1880,6 +1880,9 @@
public FreenetStore getChkDatastore() {
return chkDatastore;
}
+ public long getMaxTotalKeys() {
+ return maxTotalKeys;
+ }
long timeLastDumpedHits;