|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.metrics2.util.SampleStat
public class SampleStat
Helper to compute running sample stats
| Nested Class Summary | |
|---|---|
static class |
SampleStat.MinMax
Helper to keep running min/max |
| Constructor Summary | |
|---|---|
SampleStat()
Construct a new running sample stat |
|
| Method Summary | |
|---|---|
SampleStat |
add(double x)
Add a sample the running stat. |
SampleStat |
add(long nSamples,
double x)
Add some sample and a partial sum to the running stat. |
void |
copyTo(SampleStat other)
Copy the values to other (saves object creation and gc.) |
double |
max()
|
double |
mean()
|
double |
min()
|
long |
numSamples()
|
void |
reset()
|
double |
stddev()
|
double |
variance()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SampleStat()
| Method Detail |
|---|
public void reset()
public void copyTo(SampleStat other)
other - the destination to hold our valuespublic SampleStat add(double x)
x - the sample number
public SampleStat add(long nSamples,
double x)
nSamples - number of samplesx - the partial sum
public long numSamples()
public double mean()
public double variance()
public double stddev()
public double min()
public double max()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||