@InterfaceAudience.Private public class WeightedMovingAverage extends WindowMovingAverage
SimpleMovingAverage, WeightedMovingAverage gives each data different
weight. And it is based on WindowMovingAverage, such that it only focus on the last N.| Modifier and Type | Field and Description |
|---|---|
private int[] |
coefficient |
private int |
denominator |
DEFAULT_SIZE, lastN, mostRecent, oneRoundlabel| Constructor and Description |
|---|
WeightedMovingAverage(String label) |
WeightedMovingAverage(String label,
int size) |
| Modifier and Type | Method and Description |
|---|---|
double |
getAverageTime()
Get average execution time of the measured method.
|
enoughStatistics, getMostRecentPosistion, getNumberOfStatistics, getStatisticsAtIndex, moveForwardMostRecentPosistion, updateMostRecentTimemeasure, start, stopprivate int[] coefficient
private int denominator
public WeightedMovingAverage(String label)
public WeightedMovingAverage(String label, int size)
public double getAverageTime()
MovingAveragegetAverageTime in class WindowMovingAverageCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.