http://mail.openjdk.java.net/pipermail/jmh-dev/2014-August/001329.html
Providing a base class with:
class SuperClass {
@Benchmark
public void myBenchmark() { ... }
}
...and the subclass with the same:
class SubClass extends SuperClass {
@Benchmark
public void myBenchmark() { ... }
}
Yields the cryptic message:
Internal error: multiple methods per @Group, but not all methods have @Group
(or, in recent JMH versions, "Duplicate @Benchmark method. JMH needs an uniquely named method, regardless of the arguments list.")
This is because the @Benchmark lookup code treats both methods are distinct methods, and tries to put them in the same group.
Providing a base class with:
class SuperClass {
@Benchmark
public void myBenchmark() { ... }
}
...and the subclass with the same:
class SubClass extends SuperClass {
@Benchmark
public void myBenchmark() { ... }
}
Yields the cryptic message:
Internal error: multiple methods per @Group, but not all methods have @Group
(or, in recent JMH versions, "Duplicate @Benchmark method. JMH needs an uniquely named method, regardless of the arguments list.")
This is because the @Benchmark lookup code treats both methods are distinct methods, and tries to put them in the same group.