@InterfaceAudience.Private public class SimpleMovingAverage extends MovingAverage
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, stop
private double averageTime
protected long count
public SimpleMovingAverage(String label)
public void updateMostRecentTime(long elapsed)
MovingAverage
updateMostRecentTime
in class MovingAverage
elapsed
- elapsed time of the most recent measurementpublic double getAverageTime()
MovingAverage
getAverageTime
in class MovingAverage
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.