Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is @GenerateMicroBenchmark missing in JMH and what is its replacement?

I tried to create benchmarks with JMH and all tutorials i found refer to @GenerateMicroBenchmark.

But i cannot find it in jmh-core:1.11.3.

If it was removed, what is its replacement and what is the idiomatic way to create benchmarks without that annotation.

like image 735
Hendrik Jander Avatar asked Jan 17 '16 13:01

Hendrik Jander


1 Answers

Following the documentation here http://openjdk.java.net/projects/code-tools/jmh/

The first example has

@Benchmark
public void wellHelloThere() {
    // this method was intentionally left blank.
}

It appears the annotation you mention was renamed 2-3 years ago.

like image 132
Peter Lawrey Avatar answered Sep 23 '22 04:09

Peter Lawrey