Make sure you actually compiled the project, letting JMH annotation processors to run and generate the benchmark list for you. From the message you have there, it is apparent the EventRunner.test
had not make it to the benchmark list.
While we are at it, other tidbits:
- Hijacking the JMH Main might be the easy way into the running the benchmark, but we have better Java API for the use cases like that.
- Measuring time and especially printing out the time inside for
@GenerateMicroBenchmark
method is not something you want probably. Instead, you need to let JMH to do timing measurements for you. See e.g. relevant JMH sample. - After you eliminate the printout, you will need to feed the values you got into the blackhole, this the relevant JMH sample.