class UniformTimeValuesSnapshot extends AbstractTimeSnapshot
UniformTimeValuesSnapshot.| Modifier and Type | Field and Description |
|---|---|
private long[] |
values |
| Constructor and Description |
|---|
UniformTimeValuesSnapshot(java.util.Collection<java.lang.Long> values,
long timeInterval,
java.util.concurrent.TimeUnit timeIntervalUnit)
Create a new snapshot with the given values.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getMax()
Returns the highest value in the snapshot.
|
double |
getMean()
Returns the arithmetic mean of the values in the snapshot.
|
long |
getMin()
Returns the lowest value in the snapshot.
|
double |
getValue(double quantile)
Returns the value at the given quantile.
|
long[] |
getValues()
Returns the entire set of values in the snapshot.
|
long |
size()
Returns the number of values in the snapshot.
|
getRate, getTimeIntervalpublic UniformTimeValuesSnapshot(java.util.Collection<java.lang.Long> values,
long timeInterval,
java.util.concurrent.TimeUnit timeIntervalUnit)
values - an unordered set of values in the reservoirtimeInterval - The time interval this snapshot relates totimeIntervalUnit - The time unit of the time intervalpublic double getValue(double quantile)
quantile - a given quantile, in [0..1]quantilepublic long size()
public long[] getValues()
public long getMax()
public long getMin()
public double getMean()