Author: toad
Date: 2007-03-24 20:08:06 +0000 (Sat, 24 Mar 2007)
New Revision: 12339
Modified:
trunk/freenet/src/freenet/support/math/TimeDecayingRunningAverage.java
Log:
Don't give the first report an excessive weight
Modified: trunk/freenet/src/freenet/support/math/TimeDecayingRunningAverage.java
===================================================================
--- trunk/freenet/src/freenet/support/math/TimeDecayingRunningAverage.java
2007-03-24 20:00:45 UTC (rev 12338)
+++ trunk/freenet/src/freenet/support/math/TimeDecayingRunningAverage.java
2007-03-24 20:08:06 UTC (rev 12339)
@@ -74,7 +74,8 @@
this.defaultValue = defaultValue;
started = false;
this.halfLife = halfLife;
- createdTime = lastReportTime = System.currentTimeMillis();
+ createdTime = System.currentTimeMillis();
+ this.lastReportTime = -1; // long warm-up may skew results, so lets
wait for the first report
this.minReport = min;
this.maxReport = max;
totalReports = 0;