Infra Params

Alex Averbuch alex.averbuch at
Fri Jul 8 10:42:06 UTC 2016

I have a minimal example for reproducing this error, it goes like this:

(1) Define @State(Scope.Benchmark) class named Test <--- OK
(2) Define @Benchmark method named nothing() <--- OK
(3) Pass @State instance into @Benchmark method, e.g. public void nothing(
Test test ) <--- ERROR!

The error:

method setUp in class org.db.bench.core.Test cannot be applied to given
  required: org.openjdk.jmh.infra.BenchmarkParams
  reason: actual and formal argument lists differ in length

The code:

@State( Scope.Benchmark )
public class Test
    public void setUp( BenchmarkParams params ){}

    public void nothing( Test test ){}

More information about the jmh-dev mailing list