Package com.codahale.metrics
Class UniformSnapshot
- java.lang.Object
-
- com.codahale.metrics.Snapshot
-
- com.codahale.metrics.UniformSnapshot
-
public class UniformSnapshot extends Snapshot
A statistical snapshot of aUniformSnapshot
.
-
-
Constructor Summary
Constructors Constructor Description UniformSnapshot(long[] values)
Create a newSnapshot
with the given values.UniformSnapshot(Collection<Long> values)
Create a newSnapshot
with the given values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dump(OutputStream output)
Writes the values of the snapshot to the given stream.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
getStdDev()
Returns the standard deviation of the values 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.int
size()
Returns the number of values in the snapshot.-
Methods inherited from class com.codahale.metrics.Snapshot
get75thPercentile, get95thPercentile, get98thPercentile, get999thPercentile, get99thPercentile, getMedian
-
-
-
-
Constructor Detail
-
UniformSnapshot
public UniformSnapshot(Collection<Long> values)
Create a newSnapshot
with the given values.- Parameters:
values
- an unordered set of values in the reservoir
-
UniformSnapshot
public UniformSnapshot(long[] values)
Create a newSnapshot
with the given values.- Parameters:
values
- an unordered set of values in the reservoir that can be used by this class directly
-
-
Method Detail
-
getValue
public double getValue(double quantile)
Returns the value at the given quantile.
-
size
public int size()
Returns the number of values in the snapshot.
-
getValues
public long[] getValues()
Returns the entire set of values in the snapshot.
-
getMax
public long getMax()
Returns the highest value in the snapshot.
-
getMin
public long getMin()
Returns the lowest value in the snapshot.
-
getMean
public double getMean()
Returns the arithmetic mean of the values in the snapshot.
-
getStdDev
public double getStdDev()
Returns the standard deviation of the values in the snapshot.
-
dump
public void dump(OutputStream output)
Writes the values of the snapshot to the given stream.
-
-