[freenet-cvs] r18313 - in trunk/freenet/src/freenet: clients/http l10n

toad at freenetproject.org toad at freenetproject.org
Sat Mar 1 23:49:16 UTC 2008


Author: toad
Date: 2008-03-01 23:49:16 +0000 (Sat, 01 Mar 2008)
New Revision: 18313

Modified:
   trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
   trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
Log:
Show "Other output" (including as a % of total).

Modified: trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java	2008-03-01 23:36:14 UTC (rev 18312)
+++ trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java	2008-03-01 23:49:16 UTC (rev 18313)
@@ -806,14 +806,32 @@
 		activityList.addChild("li", l10n("totalOutput", new String[] { "total", "rate" }, new String[] { SizeUtil.formatSize(total[0], true), SizeUtil.formatSize(total_output_rate, true) } ));
 		activityList.addChild("li", l10n("payloadOutput", new String[] { "total", "rate", "percent" }, new String[] { SizeUtil.formatSize(totalPayload, true), SizeUtil.formatSize(total_payload_rate, true), Integer.toString(percent) } ));
 		if(isAdvancedModeEnabled) {
-			activityList.addChild("li", l10n("requestOutput", new String[] { "chk", "ssk" }, new String[] { SizeUtil.formatSize(node.nodeStats.getCHKRequestTotalBytesSent(), true), SizeUtil.formatSize(node.nodeStats.getSSKRequestTotalBytesSent(), true) }));
-			activityList.addChild("li", l10n("insertOutput", new String[] { "chk", "ssk" }, new String[] { SizeUtil.formatSize(node.nodeStats.getCHKInsertTotalBytesSent(), true), SizeUtil.formatSize(node.nodeStats.getSSKInsertTotalBytesSent(), true) }));
-			activityList.addChild("li", l10n("offeredKeyOutput", "total", SizeUtil.formatSize(node.nodeStats.getOfferedKeysTotalBytesSent(), true)));
-			activityList.addChild("li", l10n("swapOutput", "total", SizeUtil.formatSize(node.nodeStats.getSwappingTotalBytesSent(), true)));
-			activityList.addChild("li", l10n("authBytes", "total", SizeUtil.formatSize(node.nodeStats.getTotalAuthBytesSent(), true)));
-			activityList.addChild("li", l10n("resendBytes", "total", SizeUtil.formatSize(node.nodeStats.getResendBytesSent(), true)));
-			activityList.addChild("li", l10n("uomBytes", "total",  SizeUtil.formatSize(node.nodeStats.getUOMBytesSent(), true)));
-			activityList.addChild("li", l10n("announceBytes", "total", SizeUtil.formatSize(node.nodeStats.getAnnounceBytesSent(), true)));
+			long totalBytesSentCHKRequests = node.nodeStats.getCHKRequestTotalBytesSent();
+			long totalBytesSentSSKRequests = node.nodeStats.getSSKRequestTotalBytesSent();
+			long totalBytesSentCHKInserts = node.nodeStats.getCHKInsertTotalBytesSent();
+			long totalBytesSentSSKInserts = node.nodeStats.getSSKInsertTotalBytesSent();
+			long totalBytesSentOfferedKeys = node.nodeStats.getOfferedKeysTotalBytesSent();
+			long totalBytesSentSwapOutput = node.nodeStats.getSwappingTotalBytesSent();
+			long totalBytesSentAuth = node.nodeStats.getTotalAuthBytesSent();
+			long totalBytesSentResends = node.nodeStats.getResendBytesSent();
+			long totalBytesSentUOM = node.nodeStats.getUOMBytesSent();
+			long totalBytesSentAnnounce = node.nodeStats.getAnnounceBytesSent();
+			long totalBytesSentRemaining = total[0] - 
+				(totalPayload + totalBytesSentCHKRequests + totalBytesSentSSKRequests +
+				totalBytesSentCHKInserts + totalBytesSentSSKInserts +
+				totalBytesSentOfferedKeys + totalBytesSentSwapOutput + 
+				totalBytesSentAuth + totalBytesSentResends +
+				totalBytesSentUOM + totalBytesSentAnnounce);
+			activityList.addChild("li", l10n("requestOutput", new String[] { "chk", "ssk" }, new String[] { SizeUtil.formatSize(totalBytesSentCHKRequests, true), SizeUtil.formatSize(totalBytesSentSSKRequests, true) }));
+			activityList.addChild("li", l10n("insertOutput", new String[] { "chk", "ssk" }, new String[] { SizeUtil.formatSize(totalBytesSentCHKInserts, true), SizeUtil.formatSize(totalBytesSentSSKInserts, true) }));
+			activityList.addChild("li", l10n("offeredKeyOutput", "total", SizeUtil.formatSize(totalBytesSentOfferedKeys, true)));
+			activityList.addChild("li", l10n("swapOutput", "total", SizeUtil.formatSize(totalBytesSentSwapOutput, true)));
+			activityList.addChild("li", l10n("authBytes", "total", SizeUtil.formatSize(totalBytesSentAuth, true)));
+			activityList.addChild("li", l10n("resendBytes", "total", SizeUtil.formatSize(totalBytesSentResends, true)));
+			activityList.addChild("li", l10n("uomBytes", "total",  SizeUtil.formatSize(totalBytesSentUOM, true)));
+			activityList.addChild("li", l10n("announceBytes", "total", SizeUtil.formatSize(totalBytesSentAnnounce, true)));
+			activityList.addChild("li", l10n("unaccountedBytes", new String[] { "total", "percent" },
+					new String[] { SizeUtil.formatSize(totalBytesSentRemaining, true), Integer.toString((int)(totalBytesSentRemaining*100 / total[0])) }));
 		}
 	}
 

Modified: trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
===================================================================
--- trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties	2008-03-01 23:36:14 UTC (rev 18312)
+++ trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties	2008-03-01 23:49:16 UTC (rev 18313)
@@ -1003,6 +1003,7 @@
 StatisticsToadlet.totalOutput=Total Output: ${total} (${rate}/sec)
 StatisticsToadlet.transferringRequests=Transferring Requests: sending ${senders}, receiving ${receivers}
 StatisticsToadlet.uomBytes=Updater Output: ${total}
+StatisticsToadlet.unaccountedBytes=Other output: ${total} (${percent}%)
 StatisticsToadlet.usedMemory=Used Java memory: ${memory}
 StatisticsToadlet.versionTitle=Node Version Information
 SymlinkerToadlet.symlinks=Symlinks in ToadletServer




More information about the cvs mailing list