Package org.openjdk.jmh.generators.core
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.
GeneratorSourceis used to feed the generator with the required metadata.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringJMH_GENERATED_SUBPACKAGE
-
Constructor Summary
Constructors Constructor Description BenchmarkGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete(GeneratorSource source, GeneratorDestination destination)Finish generating the benchmarks.voidgenerate(GeneratorSource source, GeneratorDestination destination)Execute the next phase of benchmark generation.
-
-
-
Field Detail
-
JMH_GENERATED_SUBPACKAGE
protected static final String JMH_GENERATED_SUBPACKAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 fromdestination- 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 usedestination- generator destination to write the results to
-
-