Class Benchmark

java.lang.Object
org.apache.uima.fit.benchmark.Benchmark

public class Benchmark extends Object
  • Constructor Details

    • Benchmark

      public Benchmark(String aName)
    • Benchmark

      public Benchmark(Benchmark aTemplate)
    • Benchmark

      public Benchmark(String aName, Benchmark aTemplate)
  • Method Details

    • ignore

      public Benchmark ignore(boolean aIgnore)
    • isIgnored

      public boolean isIgnored()
    • limit

      public Benchmark limit(long aLimit)
    • getTimeLimitMs

      public long getTimeLimitMs()
    • applyTemplate

      public void applyTemplate(Benchmark aTemplate)
    • getName

      public String getName()
    • timer

      public Benchmark timer(LongSupplier aTimer, DoubleFunction<Double> aToMs)
    • repeat

      public Benchmark repeat(int aRepeat)
    • magnitude

      public Benchmark magnitude(int aMagnitude)
    • magnitudeIncrement

      public Benchmark magnitudeIncrement(IntFunction<Integer> aIncrement)
    • incrementTimes

      public Benchmark incrementTimes(int aTimes)
    • initialize

      public Benchmark initialize(IntConsumer aPieceOfCode)
    • measure

      public Benchmark measure(RunnableWithExceptions aPieceOfCode)
    • run

      public void run()
    • getBatches

      public List<Batch> getBatches()
    • getMaxDuration

      public long getMaxDuration()
    • getCumulativeDuration

      public long getCumulativeDuration()
    • getAverageDuration

      public long getAverageDuration()
    • getSlowestMeasurement

      public Measurement getSlowestMeasurement()
    • getStats

      public org.apache.commons.math3.stat.descriptive.DescriptiveStatistics getStats()
    • toMs

      public double toMs(double duration)
    • batchToString

      public String batchToString(Batch aBatch)
    • cpuTime

      public static long cpuTime()
      Get CPU time in nanoseconds.
    • userTime

      public static long userTime()
      Get user time in nanoseconds.
    • system

      public static long system()
      Get static system time in nanoseconds.