Package org.openjdk.jmh.annotations
Enum Scope
- java.lang.Object
-
- java.lang.Enum<Scope>
-
- org.openjdk.jmh.annotations.Scope
-
- All Implemented Interfaces:
Serializable
,Comparable<Scope>
public enum Scope extends Enum<Scope>
State
scope.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Scope
valueOf(String name)
Returns the enum constant of this type with the specified name.static Scope[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Benchmark
public static final Scope Benchmark
-
Group
public static final Scope Group
Group state scope.
With group scope, all instances of the same type will be shared across all threads within the same group. Each thread group will be supplied with its own state object.
Setup
andTearDown
methods on this state object would be performed by one of the group threads, and only once perLevel
. No other threads would ever touch the state object.- See Also:
Group
-
Thread
public static final Scope Thread
Thread state scope.
With thread scope, all instances of the same type are distinct, even if multiple state objects are injected in the same benchmark
Setup
andTearDown
methods on this state object would be performed by single worker thread exclusively, and only once perLevel
. No other threads would ever touch the state object.
-
-
Method Detail
-
values
public static Scope[] 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 (Scope c : Scope.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Scope 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
-
-