public class UniformTimeValuesSnapshot extends AbstractTimeSnapshot
UniformTimeValuesSnapshot
.Constructor and Description |
---|
UniformTimeValuesSnapshot(Collection<Long> values,
long timeInterval,
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, getTimeInterval
public UniformTimeValuesSnapshot(Collection<Long> values, long timeInterval, 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]
quantile
public long size()
public long[] getValues()
public long getMax()
public long getMin()
public double getMean()
Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.