Package org.teavm.perf
Class Statistics
java.lang.Object
org.teavm.perf.Statistics
Computes the same statistics that JMH reports: mean, error at 99.9% confidence level using Student's
t-distribution, and percentiles.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doublestatic final double[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetCount()doublegetError()Half-width of confidence interval for the mean.doublegetMax()doublegetMean()doublegetMin()doublegetPercentile(double percentile) Estimates percentile as(n + 1) * pposition in a sorted array with linear interpolation between neighbour values.doubledouble[]static doubleinverseStudentT(double p, int degreesOfFreedom) Finds suchtthatP(T <= t) = p, whereThas Student's t-distribution with given degrees of freedom.
-
Field Details
-
CONFIDENCE
public static final double CONFIDENCE- See Also:
-
PERCENTILES
public static final double[] PERCENTILES
-
-
Constructor Details
-
Statistics
-
-
Method Details
-
getCount
public int getCount() -
getMean
public double getMean() -
getStandardDeviation
public double getStandardDeviation() -
getError
public double getError()Half-width of confidence interval for the mean. -
getMin
public double getMin() -
getMax
public double getMax() -
getPercentile
public double getPercentile(double percentile) Estimates percentile as(n + 1) * pposition in a sorted array with linear interpolation between neighbour values. -
getValues
public double[] getValues() -
inverseStudentT
public static double inverseStudentT(double p, int degreesOfFreedom) Finds suchtthatP(T <= t) = p, whereThas Student's t-distribution with given degrees of freedom.
-