Package org.apache.hadoop.hbase.util
Class WeightedMovingAverage<T>
java.lang.Object
org.apache.hadoop.hbase.util.MovingAverage<T>
org.apache.hadoop.hbase.util.WindowMovingAverage<T>
org.apache.hadoop.hbase.util.WeightedMovingAverage<T>
Different from SMA
SimpleMovingAverage
, WeightedMovingAverage gives each data different
weight. And it is based on WindowMovingAverage
, such that it only focus on the last N.-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.util.WindowMovingAverage
DEFAULT_SIZE, lastN, mostRecent, oneRound
Fields inherited from class org.apache.hadoop.hbase.util.MovingAverage
label
-
Constructor Summary
ConstructorDescriptionWeightedMovingAverage
(String label) WeightedMovingAverage
(String label, int size) -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get average execution time of the measured method.Methods inherited from class org.apache.hadoop.hbase.util.WindowMovingAverage
enoughStatistics, getMostRecentPosition, getNumberOfStatistics, getStatisticsAtIndex, moveForwardMostRecentPosition, updateMostRecentTime
Methods inherited from class org.apache.hadoop.hbase.util.MovingAverage
measure, start, stop
-
Field Details
-
coefficient
-
denominator
-
-
Constructor Details
-
WeightedMovingAverage
-
WeightedMovingAverage
-
-
Method Details
-
getAverageTime
Description copied from class:MovingAverage
Get average execution time of the measured method.- Overrides:
getAverageTime
in classWindowMovingAverage<T>
- Returns:
- average time in ns
-