Package org.apache.hadoop.hbase.util
Class SimpleMovingAverage<T>
java.lang.Object
org.apache.hadoop.hbase.util.MovingAverage<T>
org.apache.hadoop.hbase.util.SimpleMovingAverage<T>
SMA measure the overall average execution time of a specific method.
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.util.MovingAverage
label
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Get average execution time of the measured method.void
updateMostRecentTime
(long elapsed) Update the most recent data.Methods inherited from class org.apache.hadoop.hbase.util.MovingAverage
measure, start, stop
-
Field Details
-
averageTime
-
count
-
-
Constructor Details
-
SimpleMovingAverage
-
-
Method Details
-
updateMostRecentTime
Description copied from class:MovingAverage
Update the most recent data.- Specified by:
updateMostRecentTime
in classMovingAverage<T>
- Parameters:
elapsed
- elapsed time of the most recent measurement
-
getAverageTime
Description copied from class:MovingAverage
Get average execution time of the measured method.- Specified by:
getAverageTime
in classMovingAverage<T>
- Returns:
- average time in ns
-