Author: toad
Date: 2006-09-06 19:44:36 +0000 (Wed, 06 Sep 2006)
New Revision: 10414
Modified:
trunk/freenet/src/freenet/io/comm/IOStatisticCollector.java
trunk/freenet/src/freenet/node/GlobalProbe.java
Log:
Logging. And global probe fixes.
Modified: trunk/freenet/src/freenet/io/comm/IOStatisticCollector.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/IOStatisticCollector.java 2006-09-06
18:36:37 UTC (rev 10413)
+++ trunk/freenet/src/freenet/io/comm/IOStatisticCollector.java 2006-09-06
19:44:36 UTC (rev 10414)
@@ -4,6 +4,8 @@
import java.util.HashMap;
import java.util.Iterator;
+import freenet.support.Logger;
+
public class IOStatisticCollector {
public static final int STATISTICS_ENTRIES = 10;
public static final int STATISTICS_DURATION_S = 30;
@@ -54,6 +56,8 @@
synchronized(this) {
totalbytesout += (outbytes>0)?outbytes:0;
totalbytesin += (inbytes>0)?inbytes:0;
+ if(Logger.shouldLog(Logger.MINOR,
IOStatisticCollector.class))
+ Logger.minor(IOStatisticCollector.class,
"Add("+key+","+inbytes+","+outbytes+" -> "+totalbytesin+" : "+totalbytesout);
}
}
Modified: trunk/freenet/src/freenet/node/GlobalProbe.java
===================================================================
--- trunk/freenet/src/freenet/node/GlobalProbe.java 2006-09-06 18:36:37 UTC
(rev 10413)
+++ trunk/freenet/src/freenet/node/GlobalProbe.java 2006-09-06 19:44:36 UTC
(rev 10414)
@@ -64,6 +64,7 @@
}
output(lastLocation);
prevLoc = lastLocation;
+ if(lastLocation > 1.5) break;
ctr++;
// Sleep 10 seconds so we don't flood
try {