com.espertech.esper.metrics.codahale_metrics.metrics.stats
Class Snapshot

java.lang.Object
  extended by com.espertech.esper.metrics.codahale_metrics.metrics.stats.Snapshot

public class Snapshot
extends java.lang.Object

A statistical snapshot of a Snapshot.


Constructor Summary
Snapshot(java.util.Collection<java.lang.Long> values)
          Create a new Snapshot with the given values.
Snapshot(double[] values)
          Create a new Snapshot with the given values.
 
Method Summary
 void dump(java.io.File output)
          Writes the values of the sample to the given file.
 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.
 double getMedian()
          Returns the median value in the distribution.
 double getValue(double quantile)
          Returns the value at the given quantile.
 double[] getValues()
          Returns the entire set of values in the snapshot.
 int size()
          Returns the number of values in the snapshot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Snapshot

public Snapshot(java.util.Collection<java.lang.Long> values)
Create a new Snapshot with the given values.

Parameters:
values - an unordered set of values in the sample

Snapshot

public Snapshot(double[] values)
Create a new Snapshot with the given values.

Parameters:
values - an unordered set of values in the sample
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 int size()
Returns the number of values in the snapshot.

Returns:
the number of values in the snapshot

getMedian

public double getMedian()
Returns the median value in the distribution.

Returns:
the median value in the distribution

get75thPercentile

public double get75thPercentile()
Returns the value at the 75th percentile in the distribution.

Returns:
the value at the 75th percentile in the distribution

get95thPercentile

public double get95thPercentile()
Returns the value at the 95th percentile in the distribution.

Returns:
the value at the 95th percentile in the distribution

get98thPercentile

public double get98thPercentile()
Returns the value at the 98th percentile in the distribution.

Returns:
the value at the 98th percentile in the distribution

get99thPercentile

public double get99thPercentile()
Returns the value at the 99th percentile in the distribution.

Returns:
the value at the 99th percentile in the distribution

get999thPercentile

public double get999thPercentile()
Returns the value at the 99.9th percentile in the distribution.

Returns:
the value at the 99.9th percentile in the distribution

getValues

public double[] getValues()
Returns the entire set of values in the snapshot.

Returns:
the entire set of values in the snapshot

dump

public void dump(java.io.File output)
          throws java.io.IOException
Writes the values of the sample to the given file.

Parameters:
output - the file to which the values will be written
Throws:
java.io.IOException - if there is an error writing the values

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com