@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, oneRoundlabel| Constructor and Description |
|---|
ExponentialMovingAverage(String label) |
ExponentialMovingAverage(String label,
double alpha) |
ExponentialMovingAverage(String label,
int size) |
ExponentialMovingAverage(String label,
int size,
double alpha) |
| Modifier and Type | Method and Description |
|---|---|
double |
getAverageTime()
Get average execution time of the measured method.
|
void |
updateMostRecentTime(long elapsed)
Update the most recent data.
|
enoughStatistics, getMostRecentPosistion, getNumberOfStatistics, getStatisticsAtIndex, moveForwardMostRecentPosistionmeasure, start, stoppublic 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)
MovingAverageupdateMostRecentTime in class WindowMovingAverageelapsed - elapsed time of the most recent measurementpublic double getAverageTime()
MovingAveragegetAverageTime in class WindowMovingAverageCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.