Class BenchmarkGenerator

java.lang.Object
org.openjdk.jmh.generators.core.BenchmarkGenerator

public class BenchmarkGenerator extends Object
Benchmark generator.

Benchmark generator is the agnostic piece of code which generates synthetic Java code for JMH benchmarks. GeneratorSource is used to feed the generator with the required metadata.

  • Field Details

  • Constructor Details

    • BenchmarkGenerator

      public BenchmarkGenerator()
  • Method Details

    • generate

      public void generate(GeneratorSource source, GeneratorDestination destination)
      Execute the next phase of benchmark generation. Multiple calls to this method are acceptable, even with the difference sources
      Parameters:
      source - generator source to get the metadata from
      destination - generator destination to write the results to
    • complete

      public void complete(GeneratorSource source, GeneratorDestination destination)
      Finish generating the benchmarks. Must be called at the end of generation.
      Parameters:
      source - source generator to use
      destination - generator destination to write the results to