Class Benchmark

java.lang.Object
org.apache.calcite.util.Benchmark

public class Benchmark extends Object
Helps to run benchmarks by running the same task repeatedly and averaging the running times.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Collects statistics for a test that is run multiple times.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.slf4j.Logger
    Certain tests are enabled only if logging is enabled at debug level or higher.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Benchmark(String description, Function1<Benchmark.Statistician,Void> function, int repeat)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Returns whether performance tests are enabled.
    void
    run()
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOGGER

      public static final org.slf4j.Logger LOGGER
      Certain tests are enabled only if logging is enabled at debug level or higher.
  • Constructor Details

  • Method Details

    • enabled

      public static boolean enabled()
      Returns whether performance tests are enabled.
    • run

      public void run()