Package com.google.caliper.model
Enum InstrumentType
- java.lang.Object
-
- java.lang.Enum<InstrumentType>
-
- com.google.caliper.model.InstrumentType
-
- All Implemented Interfaces:
Serializable,Comparable<InstrumentType>
public enum InstrumentType extends Enum<InstrumentType>
Enumeration of the available types of instruments for running benchmarks.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLOCATION_MACROAllocation macrobenchmark instrument.ALLOCATION_MICROAllocation microbenchmark instrument.ARBITRARY_MEASUREMENTArbitrary measurement instrument.RUNTIME_MACRORuntime macrobenchmark instrument.RUNTIME_MICRORuntime microbenchmark instrument.RUNTIME_PICORuntime picobenchmark instrument.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InstrumentTypevalueOf(String name)Returns the enum constant of this type with the specified name.static InstrumentType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RUNTIME_MICRO
public static final InstrumentType RUNTIME_MICRO
Runtime microbenchmark instrument.
-
RUNTIME_MACRO
public static final InstrumentType RUNTIME_MACRO
Runtime macrobenchmark instrument.
-
RUNTIME_PICO
public static final InstrumentType RUNTIME_PICO
Runtime picobenchmark instrument.
-
ALLOCATION_MICRO
public static final InstrumentType ALLOCATION_MICRO
Allocation microbenchmark instrument.
-
ALLOCATION_MACRO
public static final InstrumentType ALLOCATION_MACRO
Allocation macrobenchmark instrument.
-
ARBITRARY_MEASUREMENT
public static final InstrumentType ARBITRARY_MEASUREMENT
Arbitrary measurement instrument.
-
-
Method Detail
-
values
public static InstrumentType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (InstrumentType c : InstrumentType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static InstrumentType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-