@InterfaceAudience.Private public class SimpleMovingAverage<T> extends MovingAverage<T>
| Modifier and Type | Field and Description |
|---|---|
private double |
averageTime |
protected long |
count |
label| Constructor and Description |
|---|
SimpleMovingAverage(String label) |
| 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.
|
measure, start, stopprivate double averageTime
protected long count
public SimpleMovingAverage(String label)
public void updateMostRecentTime(long elapsed)
MovingAverageupdateMostRecentTime in class MovingAverage<T>elapsed - elapsed time of the most recent measurementpublic double getAverageTime()
MovingAveragegetAverageTime in class MovingAverage<T>Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.