Package org.openjdk.jmh.samples
Class JMHSample_29_StatesDAG.Counter
java.lang.Object
org.openjdk.jmh.samples.JMHSample_29_StatesDAG.Counter
- Enclosing class:
JMHSample_29_StatesDAG
There are weird cases when the benchmark state is more cleanly described
by the set of @States, and those @States reference each other. JMH allows
linking @States in directed acyclic graphs (DAGs) by referencing @States
in helper method signatures. (Note that
JMHSample_28_BlackholeHelpers
is just a special case of that.
Following the interface for @Benchmark calls, all @Setups for
referenced @State-s are fired before it becomes accessible to current @State.
Similarly, no @TearDown methods are fired for referenced @State before
current @State is done with it.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
x
int x
-
-
Constructor Details
-
Counter
public Counter()
-
-
Method Details
-
inc
public int inc() -
dispose
public void dispose()
-