public class DurationStats extends Object
Constructor and Description |
---|
DurationStats(DurationStats that)
construct from anothr stats entry;
all value are copied.
|
DurationStats(String operation)
Construct statistics for a given operation.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Duration duration)
Add a duration
|
void |
add(long x)
Add a number
|
double |
getArithmeticMean()
Get the arithmetic mean of the aggregate statistics
|
int |
getCount()
Get the number of entries sampled
|
double |
getDeviation()
Get the std deviation, sigma
|
long |
getSum()
Get the sum of all durations
|
double |
getVariance()
Variance, sigma^2
|
void |
reset()
Reset the data
|
String |
toString()
Covert to a useful string
|
public DurationStats(String operation)
operation
- operationpublic DurationStats(DurationStats that)
that
- the source statisticspublic void add(Duration duration)
duration
- the new durationpublic void add(long x)
x
- the numberpublic void reset()
public int getCount()
public long getSum()
public double getArithmeticMean()
public double getVariance()
public double getDeviation()
Copyright © 2015 Apache Software Foundation. All Rights Reserved.