com.google.caliper
Annotation Type Param


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface Param

To make your benchmark depend on a parameterized value, create a field with the name you want this parameter to be known by, and add this annotation. Caliper will inject a value for this field to each instance it creates. These values come from

Caliper parameters are always strings, but can be converted to other types at the point of injection. If the type of the field this annotation is applied to is not String, then the type class must contain a static fromString(String), decode(String) or valueOf(String) method that returns that type, or a constructor accepting only a String.

Caliper will test every possible combination of parameter values for your benchmark. For example, if you have two parameters, -Dletter=a,b,c -Dnumber=1,2, Caliper will construct six independent "scenarios" and perform measurement for each one.


Optional Element Summary
 String[] value
          One or more default values, as strings, that this parameter should be given if none are specified on the command line.
 

value

public abstract String[] value
One or more default values, as strings, that this parameter should be given if none are specified on the command line. If values are specified on the command line, the defaults given here are all ignored.

Default:
{}


Copyright © 2009-2011 Google, Inc.. All Rights Reserved.