Package com.codahale.metrics
Class Snapshot
- java.lang.Object
-
- com.codahale.metrics.Snapshot
-
- Direct Known Subclasses:
UniformSnapshot
,WeightedSnapshot
public abstract class Snapshot extends Object
A statistical snapshot of aSnapshot
.
-
-
Constructor Summary
Constructors Constructor Description Snapshot()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
dump(OutputStream output)
Writes the values of the snapshot to the given stream.double
get75thPercentile()
Returns the value at the 75th percentile in the distribution.double
get95thPercentile()
Returns the value at the 95th percentile in the distribution.double
get98thPercentile()
Returns the value at the 98th percentile in the distribution.double
get999thPercentile()
Returns the value at the 99.9th percentile in the distribution.double
get99thPercentile()
Returns the value at the 99th percentile in the distribution.abstract long
getMax()
Returns the highest value in the snapshot.abstract double
getMean()
Returns the arithmetic mean of the values in the snapshot.double
getMedian()
Returns the median value in the distribution.abstract long
getMin()
Returns the lowest value in the snapshot.abstract double
getStdDev()
Returns the standard deviation of the values in the snapshot.abstract double
getValue(double quantile)
Returns the value at the given quantile.abstract long[]
getValues()
Returns the entire set of values in the snapshot.abstract int
size()
Returns the number of values in the snapshot.
-
-
-
Method Detail
-
getValue
public abstract 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
-
getValues
public abstract long[] getValues()
Returns the entire set of values in the snapshot.- Returns:
- the entire set of values
-
size
public abstract int size()
Returns the number of values in the snapshot.- Returns:
- the number of values
-
getMedian
public double getMedian()
Returns the median value in the distribution.- Returns:
- the median value
-
get75thPercentile
public double get75thPercentile()
Returns the value at the 75th percentile in the distribution.- Returns:
- the value at the 75th percentile
-
get95thPercentile
public double get95thPercentile()
Returns the value at the 95th percentile in the distribution.- Returns:
- the value at the 95th percentile
-
get98thPercentile
public double get98thPercentile()
Returns the value at the 98th percentile in the distribution.- Returns:
- the value at the 98th percentile
-
get99thPercentile
public double get99thPercentile()
Returns the value at the 99th percentile in the distribution.- Returns:
- the value at the 99th percentile
-
get999thPercentile
public double get999thPercentile()
Returns the value at the 99.9th percentile in the distribution.- Returns:
- the value at the 99.9th percentile
-
getMax
public abstract long getMax()
Returns the highest value in the snapshot.- Returns:
- the highest value
-
getMean
public abstract double getMean()
Returns the arithmetic mean of the values in the snapshot.- Returns:
- the arithmetic mean
-
getMin
public abstract long getMin()
Returns the lowest value in the snapshot.- Returns:
- the lowest value
-
getStdDev
public abstract double getStdDev()
Returns the standard deviation of the values in the snapshot.- Returns:
- the standard value
-
dump
public abstract void dump(OutputStream output)
Writes the values of the snapshot to the given stream.- Parameters:
output
- an output stream
-
-