I am trying to use the @Param
annotation on a field with the command line args of the form: "-Dmyparamname=val1,val2,val3" and it is not working. I am using caliper-0.5-rc1.jar. My actual usage looks like:
java -classpath "mylongclasspath" MyBenchmarkClass -Jjit=-client,-server -Dprovider=CGLIB,JAVASSIST,JAVAPROXY
My benchmark class has the following:
public class MyBenchmarkClass extends SimpleBenchmark {
@Param
private String provider;
...
}
But when I run I am only getting options for the jit, but not for the -Dprovider:
0% Scenario{vm=java, trial=0, benchmark=M1, jit=-server} 30.40 ns; ?=0.13 ns @ 3 trials
17% Scenario{vm=java, trial=0, benchmark=M2, jit=-server} 31.42 ns; ?=0.08 ns @ 3
etc., eventually repeating all benchmarks with "jit=-client"
I would have expected to see:
0% Scenario{vm=java, trial=0, benchmark=M1, jit=-server provider=CGLIB} ...etc.
I have tried all sorts of options: including quotes around the values in the command arg, providing them as a static field of type List internally, etc. There is never any indication that it is attempting to iterate over supplied values of "provider".
Any thoughts on what I am doing wrong?
It looks like the 0.5-rc1 build (the only thing in Maven Central) is the problem. I swiped a preliminary 1.0 build from another project (I didn't want to have to download the whole project and Maven and build it).