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

I tried to create tests with JMH , and all the tutorials I found relate to @GenerateMicroBenchmark.

But I can not find it in jmh-core: 1.11.3.

If it has been removed, what is its replacement and what is the idiomatic way to create tests without this annotation.

+4
source share
1 answer

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

In the first example

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

It seems that the annotation you mentioned was renamed 2-3 years ago.

+8
source

Source: https://habr.com/ru/post/1624662/


All Articles