r26821 - trunk/freenet/src/freenet/clients/http

[email protected] Wed, 15 Apr 2009 01:41:13 +0000
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: dconrado
Date: 2009-04-15 01:41:12 +0000 (Wed, 15 Apr 2009)
New Revision: 26821

Modified:
   trunk/freenet/src/freenet/clients/http/ConnectionsToadlet.java
Log:
Show total data transferred to/from a peer over its entire lifetime. Adding a new column on Connections to friends/strangers in advanced interface mode with total traffic since source after total traffic. 


Modified: trunk/freenet/src/freenet/clients/http/ConnectionsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/ConnectionsToadlet.java	2009-04-15 00:53:04 UTC (rev 26820)
+++ trunk/freenet/src/freenet/clients/http/ConnectionsToadlet.java	2009-04-15 01:41:12 UTC (rev 26821)
@@ -119,7 +119,7 @@
 				return compareLongs(total1, total2);
 			}else if(sortBy.equals("total_traffic_since_startup")){
 				long total1 = firstNode.getTotalInputBytes()+firstNode.getTotalInputSinceStartup();
-				long total2 = secondNode.getTotalInputBytes()+secondNode.getTotalOutputSinceStartup();
+				long total2 = secondNode.getTotalOutputBytes()+secondNode.getTotalOutputSinceStartup();
 				return compareLongs(total1, total2);
 			}else if(sortBy.equals("selection_percentage")){
 				return Double.compare(firstNode.getSelectionRate(), secondNode.getSelectionRate());
@@ -822,6 +822,8 @@
 			peerRow.addChild("td", "class", "peer-idle" /* FIXME */).addChild("#", (totalSelectionRate > 0 ? (peerSelectionPercentage+"%") : "N/A"));
 			// total traffic column
 			peerRow.addChild("td", "class", "peer-idle" /* FIXME */).addChild("#", SizeUtil.formatSize(peerNodeStatus.getTotalInputBytes())+" / "+SizeUtil.formatSize(peerNodeStatus.getTotalOutputBytes())+"/"+SizeUtil.formatSize(peerNodeStatus.getResendBytesSent()));
+			// total traffic column startup
+			peerRow.addChild("td", "class", "peer-idle" /* FIXME */).addChild("#", SizeUtil.formatSize(peerNodeStatus.getTotalInputSinceStartup())+" / "+SizeUtil.formatSize(peerNodeStatus.getTotalOutputSinceStartup()));
 			// congestion control
 			PacketThrottle t = peerNodeStatus.getThrottle();
 			String val;