Package org.openjdk.jmh.annotations
Annotation Type Setup
-
@Target(METHOD) @Retention(RUNTIME) public @interface Setup
Setup marks the fixture method to be run before the benchmark.
Since fixture methods manage the
State
lifecycles,Setup
can only be declared inState
classes. TheSetup
method will be executed by a thread which has the access toState
, and it is not defined which thread exactly. Note that meansTearDown
may be executed by a different thread, ifState
is shared between the threads.Uses may optionally provide the
Level
at which the fixture method should run.- See Also:
State