Class UniformTimeValuesSnapshot
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.core.AbstractTimeSnapshot
org.glassfish.jersey.server.internal.monitoring.core.UniformTimeValuesSnapshot
- All Implemented Interfaces:
UniformTimeSnapshot
A statistical snapshot of a
UniformTimeValuesSnapshot
.- Author:
- Stepan Vavra, Dropwizard Team
- See Also:
-
Constructor Summary
ConstructorDescriptionUniformTimeValuesSnapshot
(Collection<Long> values, long timeInterval, TimeUnit timeIntervalUnit) Create a new snapshot with the given values. -
Method Summary
Modifier and TypeMethodDescriptionlong
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[]
Returns the entire set of values in the snapshot.long
size()
Returns the number of values in the snapshot.Methods inherited from class org.glassfish.jersey.server.internal.monitoring.core.AbstractTimeSnapshot
getRate, getTimeInterval
-
Constructor Details
-
UniformTimeValuesSnapshot
public UniformTimeValuesSnapshot(Collection<Long> values, long timeInterval, TimeUnit timeIntervalUnit) Create a new snapshot with the given values.- Parameters:
values
- an unordered set of values in the reservoirtimeInterval
- The time interval this snapshot relates totimeIntervalUnit
- The time unit of the time interval
-
-
Method Details
-
getValue
public double getValue(double quantile) Returns the value at the given quantile.- Parameters:
quantile
- a given quantile, in[0..1]
- Returns:
- the value in the distribution at
quantile
-
size
public long size()Returns the number of values in the snapshot.- Returns:
- the number of values
-
getValues
public long[] getValues()Returns the entire set of values in the snapshot.- Returns:
- the entire set of values
-
getMax
public long getMax()Returns the highest value in the snapshot.- Returns:
- the highest value
-
getMin
public long getMin()Returns the lowest value in the snapshot.- Returns:
- the lowest value
-
getMean
public double getMean()Returns the arithmetic mean of the values in the snapshot.- Returns:
- the arithmetic mean
-