@InterfaceAudience.Private public class ExponentialMovingAverage extends WindowMovingAverage
WeightedMovingAverage
in weighted, but the weighting factor decrease
exponentially. It brings benefits that it is more sensitive, and can see the trends easily.DEFAULT_SIZE, lastN, mostRecent, oneRound
label
构造器和说明 |
---|
ExponentialMovingAverage(String label) |
ExponentialMovingAverage(String label,
double alpha) |
ExponentialMovingAverage(String label,
int size) |
ExponentialMovingAverage(String label,
int size,
double alpha) |
限定符和类型 | 方法和说明 |
---|---|
double |
getAverageTime()
Get average execution time of the measured method.
|
void |
updateMostRecentTime(long elapsed)
Update the most recent data.
|
enoughStatistics, getMostRecentPosistion, getNumberOfStatistics, getStatisticsAtIndex, moveForwardMostRecentPosistion
measure, start, stop
public ExponentialMovingAverage(String label)
public ExponentialMovingAverage(String label, double alpha)
public ExponentialMovingAverage(String label, int size)
public ExponentialMovingAverage(String label, int size, double alpha)
public void updateMostRecentTime(long elapsed)
MovingAverage
updateMostRecentTime
在类中 WindowMovingAverage
elapsed
- elapsed time of the most recent measurementpublic double getAverageTime()
MovingAverage
getAverageTime
在类中 WindowMovingAverage
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.