@Test
    void testJmhBenchmarks() throws Exception {
        assumeFalse(
                Functions.isWindows() && System.getenv("CI") != null,
                "TODO Cannot run program C:\\openjdk-11\\bin\\java.exe: CreateProcess error=206, The filename or extension is too long");
        // 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)));
    }
Runs sample benchmarks from JUnit tests.
test-harness/src/test/java/io/jenkins/plugins/casc/CascJmhBenchmarkStateTest.java