Class Statistics

java.lang.Object
org.teavm.perf.Statistics

public final class Statistics extends Object
Computes the same statistics that JMH reports: mean, error at 99.9% confidence level using Student's t-distribution, and percentiles.
  • Field Details

    • CONFIDENCE

      public static final double CONFIDENCE
      See Also:
    • PERCENTILES

      public static final double[] PERCENTILES
  • Constructor Details

  • 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) * p position in a sorted array with linear interpolation between neighbour values.
    • getValues

      public double[] getValues()
    • inverseStudentT

      public static double inverseStudentT(double p, int degreesOfFreedom)
      Finds such t that P(T <= t) = p, where T has Student's t-distribution with given degrees of freedom.