INT-1496: start optimistically with success rate 100%

This commit is contained in:
Dave Syer
2010-10-06 11:00:59 -07:00
parent 71f171b163
commit a21172fdab
2 changed files with 7 additions and 6 deletions

View File

@@ -92,7 +92,8 @@ public class ExponentialMovingAverageRatio {
public double getMean() {
int count = cumulative.getCount();
if (count == 0) {
return 0;
// Optimistic to start: success rate is 100%
return 1;
}
long t = System.currentTimeMillis();
double alpha = Math.exp((t0 - t) * lapse);