public final class AverageMeter extends TotalMeter implements AverageSensor
Constructor and Description |
---|
AverageMeter(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
add(long value)
Adds a data sample to the probe
|
double |
calculate()
Calculate the current value based on the previous sample().
|
TotalMeter |
createCount(java.lang.String name) |
AbstractMeter |
createMax(java.lang.String name) |
AbstractMeter |
createSigma(java.lang.String name,
int n) |
double |
getTotal()
Return the total count
|
void |
sample()
Return the probe's next average.
|
double |
sampleCount()
Return the probe's next sample.
|
double |
sampleMax()
Return the probe's next sample.
|
double |
sampleSigma(int n)
Return the probe's next 2-sigma
|
getName, peek, toString
public TotalMeter createCount(java.lang.String name)
public AbstractMeter createMax(java.lang.String name)
public AbstractMeter createSigma(java.lang.String name, int n)
public final void add(long value)
AverageSensor
add
in interface AverageSensor
public final void sample()
sample
in interface Meter
sample
in class AbstractMeter
public final double calculate()
AbstractMeter
calculate
in interface Meter
calculate
in class AbstractMeter
public double getTotal()
TotalMeter
getTotal
in class TotalMeter
public final double sampleCount()
public final double sampleSigma(int n)
public final double sampleMax()