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
FieldsFields inherited from class org.apache.hadoop.hbase.util.WindowMovingAverage
DEFAULT_SIZE, lastN, mostRecent, oneRoundFields inherited from class org.apache.hadoop.hbase.util.MovingAverage
label -
Constructor Summary
ConstructorsConstructorDescriptionWeightedMovingAverage(String label) WeightedMovingAverage(String label, int size) -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet average execution time of the measured method.Methods inherited from class org.apache.hadoop.hbase.util.WindowMovingAverage
enoughStatistics, getMostRecentPosition, getNumberOfStatistics, getStatisticsAtIndex, moveForwardMostRecentPosition, updateMostRecentTimeMethods 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:MovingAverageGet average execution time of the measured method.- Overrides:
getAverageTimein classWindowMovingAverage<T>- Returns:
- average time in ns
-