use of jenkins.benchmark.jmh.BenchmarkFinder in project configuration-as-code-plugin by jenkinsci.
the class BenchmarkRunner method runJmhBenchmarks.
@Test
public void runJmhBenchmarks() throws Exception {
ChainedOptionsBuilder options = new OptionsBuilder().mode(Mode.AverageTime).warmupIterations(2).timeUnit(TimeUnit.MICROSECONDS).threads(2).forks(2).shouldFailOnError(true).shouldDoGC(true).resultFormat(ResultFormatType.JSON).result("jmh-report.json");
BenchmarkFinder bf = new BenchmarkFinder(getClass());
bf.findBenchmarks(options);
new Runner(options.build()).run();
}
use of jenkins.benchmark.jmh.BenchmarkFinder in project configuration-as-code-plugin by jenkinsci.
the class CascJmhBenchmarkStateTest method testJmhBenchmarks.
@Test
public void testJmhBenchmarks() throws Exception {
// number of iterations is kept to a minimum just to verify that the benchmarks work without spending extra
// time during builds.
ChainedOptionsBuilder optionsBuilder = new OptionsBuilder().forks(1).warmupIterations(0).measurementBatchSize(1).measurementIterations(1).shouldFailOnError(true).result(reportPath).timeUnit(TimeUnit.MICROSECONDS).resultFormat(ResultFormatType.JSON);
new BenchmarkFinder(getClass()).findBenchmarks(optionsBuilder);
new Runner(optionsBuilder.build()).run();
assertTrue(Files.exists(Paths.get(reportPath)));
}
Aggregations