Annotation Type Param
-
@Inherited @Target(FIELD) @Retention(RUNTIME) public @interface Param
Marks the configurable parameter in the benchmark.
Paramfields should be non-final fields, and should only reside inStateclasses. JMH will inject the value into the annotated field before anySetupmethod is called. It is not guaranteed the field value would be accessible in any initializer or any constructor ofState.Parameters are acceptable on any primitive type, primitive wrapper type, a String, or an Enum. The annotation value is given in String, and will be coerced as required to match the field type.
Parameters should normally provide the default values which make benchmark runnable even without the explicit parameters set for the run. The only exception is
ParamoverEnum, which will implicitly have the default value set encompassing all enum constants.When multiple
Param-s are needed for the benchmark run, JMH will compute the outer product of all the parameters in the run.
-
-
Field Summary
Fields Modifier and Type Fields Description static StringBLANK_ARGS
-