synchronized void addDataPoint ( double value , int updated ) { // 8/10/2012: Force the standard deviation to 1/3 of the first data point // 8/11:2012: Force it to 1/6th of the first data point (more accurate) if ( ewmaVariance == Double . NEGATIVE_INFINITY ) { reset ( value , updated ) ; return ; } double delta = value - ewma ; double increment = ALPHA * delta ; ewma += increment ; ewmaVariance = ( 1 - ALPHA ) * ( ewmaVariance + delta * increment ) ; ewmaStddev = Math . sqrt ( ewmaVariance ) ; lastUpdate = updated ; }
Add a throughput observation to the distribution setting lastUpdate