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
public class UniformTimeValuesSnapshot extends AbstractTimeSnapshot
A statistical snapshot of aUniformTimeValuesSnapshot
.- See Also:
- https://github.com/dropwizard/metrics
-
-
Field Summary
Fields Modifier and Type Field Description private long[]
values
-
Constructor Summary
Constructors Constructor Description UniformTimeValuesSnapshot(java.util.Collection<java.lang.Long> values, long timeInterval, java.util.concurrent.TimeUnit timeIntervalUnit)
Create a new snapshot with the given values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class org.glassfish.jersey.server.internal.monitoring.core.AbstractTimeSnapshot
getRate, getTimeInterval
-
-
-
-
Constructor Detail
-
UniformTimeValuesSnapshot
public UniformTimeValuesSnapshot(java.util.Collection<java.lang.Long> values, long timeInterval, java.util.concurrent.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 Detail
-
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
-
-