Package org.openjdk.jmh.util
Class MultisetStatistics
- java.lang.Object
-
- org.openjdk.jmh.util.AbstractStatistics
-
- org.openjdk.jmh.util.MultisetStatistics
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Statistics>
,org.apache.commons.math3.stat.descriptive.StatisticalSummary
,Statistics
public class MultisetStatistics extends AbstractStatistics
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
private Multiset<java.lang.Double>
values
-
Constructor Summary
Constructors Constructor Description MultisetStatistics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(double d, long count)
private double
get(long index)
int[]
getHistogram(double[] levels)
Returns the histogram for this statistics.double
getMax()
Returns the maximum for this statistics.double
getMin()
Returns the minimum for this statistics.long
getN()
Returns the number of samples in this statistics.double
getPercentile(double rank)
Returns the percentile at given rank.java.util.Iterator<java.util.Map.Entry<java.lang.Double,java.lang.Long>>
getRawData()
Returns the raw data for this statistics.double
getSum()
Returns the sum of samples in this statistics.double
getVariance()
Returns the variance for this statistics.-
Methods inherited from class org.openjdk.jmh.util.AbstractStatistics
compareTo, compareTo, getConfidenceIntervalAt, getMean, getMeanErrorAt, getStandardDeviation, isDifferent, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
values
private final Multiset<java.lang.Double> values
-
-
Method Detail
-
addValue
public void addValue(double d, long count)
-
getMax
public double getMax()
Description copied from interface:Statistics
Returns the maximum for this statistics.- Returns:
- maximum
-
getMin
public double getMin()
Description copied from interface:Statistics
Returns the minimum for this statistics.- Returns:
- minimum
-
getN
public long getN()
Description copied from interface:Statistics
Returns the number of samples in this statistics.- Returns:
- number of samples
-
getSum
public double getSum()
Description copied from interface:Statistics
Returns the sum of samples in this statistics.- Returns:
- sum
-
get
private double get(long index)
-
getPercentile
public double getPercentile(double rank)
Description copied from interface:Statistics
Returns the percentile at given rank.- Parameters:
rank
- the rank, [0..100]- Returns:
- percentile
-
getVariance
public double getVariance()
Description copied from interface:Statistics
Returns the variance for this statistics.- Returns:
- variance
-
getHistogram
public int[] getHistogram(double[] levels)
Description copied from interface:Statistics
Returns the histogram for this statistics. The histogram bin count would be equal to number of levels, minus one; so that each i-th bin is the number of samples in [i-th, (i+1)-th) levels.- Parameters:
levels
- levels- Returns:
- histogram data
-
getRawData
public java.util.Iterator<java.util.Map.Entry<java.lang.Double,java.lang.Long>> getRawData()
Description copied from interface:Statistics
Returns the raw data for this statistics. This data can be useful for custom postprocessing and statistics computations. Note, that values of multiple calls may not be unique. Ordering of the values is not specified.- Returns:
- iterator to raw data. Each item is pair of actual value and number of occurrences of this value.
-
-