Author: toad
Date: 2008-03-13 20:41:24 +0000 (Thu, 13 Mar 2008)
New Revision: 18516
Modified:
trunk/freenet/src/freenet/io/comm/IOStatisticCollector.java
Log:
Don't track bytes per-IP by default.
Modified: trunk/freenet/src/freenet/io/comm/IOStatisticCollector.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/IOStatisticCollector.java 2008-03-13
20:40:07 UTC (rev 18515)
+++ trunk/freenet/src/freenet/io/comm/IOStatisticCollector.java 2008-03-13
20:41:24 UTC (rev 18516)
@@ -19,6 +19,7 @@
private long totalbytesin;
private long totalbytesout;
private final LinkedHashMap targets;
+ static boolean ENABLE_PER_ADDRESS_TRACKING = false;
public IOStatisticCollector() {
targets = new LinkedHashMap();
@@ -41,12 +42,14 @@
private void _addInfo(String key, int inbytes, int outbytes) {
rotate();
+ if(ENABLE_PER_ADDRESS_TRACKING) {
StatisticEntry entry = (StatisticEntry)targets.get(key);
if (entry == null) {
entry = new StatisticEntry();
targets.put(key, entry);
}
entry.addData((inbytes>0)?inbytes:0, (outbytes>0)?outbytes:0);
+ }
synchronized(this) {
totalbytesout += (outbytes>0)?outbytes:0;
totalbytesin += (inbytes>0)?inbytes:0;