Constructor and Description |
---|
Snapshot(Collection<Long> values)
Create a new
Snapshot with the given values. |
Snapshot(double[] values)
Create a new
Snapshot with the given values. |
Modifier and Type | Method and Description |
---|---|
void |
dump(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.
|
public Snapshot(Collection<Long> values)
Snapshot
with the given values.values
- an unordered set of values in the samplepublic Snapshot(double[] values)
Snapshot
with the given values.values
- an unordered set of values in the samplepublic double getValue(double quantile)
quantile
- a given quantile, in [0..1]
quantile
public int size()
public double getMedian()
public double get75thPercentile()
public double get95thPercentile()
public double get98thPercentile()
public double get99thPercentile()
public double get999thPercentile()
public double[] getValues()
public void dump(File output) throws IOException
output
- the file to which the values will be writtenIOException
- if there is an error writing the valuesCopyright © 2014. All Rights Reserved.