Author: toad
Date: 2008-02-07 16:56:25 +0000 (Thu, 07 Feb 2008)
New Revision: 17669
Modified:
trunk/freenet/src/freenet/node/simulator/RealNodeULPRTest.java
Log:
use successfulTests instead of total+1
Modified: trunk/freenet/src/freenet/node/simulator/RealNodeULPRTest.java
===================================================================
--- trunk/freenet/src/freenet/node/simulator/RealNodeULPRTest.java
2008-02-07 16:54:27 UTC (rev 17668)
+++ trunk/freenet/src/freenet/node/simulator/RealNodeULPRTest.java
2008-02-07 16:56:25 UTC (rev 17669)
@@ -118,8 +118,7 @@
long totalPropagationTime = 0;
- int totalCount = 0;
- for(totalCount=0;totalCount<256;totalCount++) {
+ for(int totalCount=0;totalCount<256;totalCount++) {
boolean isSSK = (totalCount & 0x1) == 1;
@@ -204,7 +203,7 @@
long propagationTime = tEnd-tStart;
System.err.println("SUCCESSFUL TEST #
"+successfulTests+" in "+propagationTime+"ms!!!");
totalPropagationTime += propagationTime;
- System.err.println("Average propagation time:
"+(totalPropagationTime / (totalCount+1))+"ms");
+ System.err.println("Average propagation time:
"+(totalPropagationTime / successfulTests)+"ms");
System.err.println();
break;
}
@@ -219,7 +218,7 @@
}
}
- System.err.println("Overall average propagation time:
"+(totalPropagationTime / (totalCount+1))+"ms");
+ System.err.println("Overall average propagation time:
"+(totalPropagationTime / successfulTests)+"ms");
}