New feature: Injecting BlackHoles/Controls into Setup/Teardowns (or even the States themselves)
Aleksey Shipilev
aleksey.shipilev at oracle.com
Tue Apr 22 21:21:15 UTC 2014
Hi,
We are churning our backlog here, and one of the features we committed
to bleeding edge workspace is the support for injectable Blackholes and
Controls into @Setup/@TearDown methods. This should be useful, for
example, in the cases when you have to put the Blackhole/Control into
the instantiatiable object, as in [1].
But really, it feels like a special case of injecting the @State object
into @Setup/@TearDown, and once [1] is supported, it seems
straight-forward to also support the arbitrary DAGs of @States. It seems
useful for the cases where you want to centralize the specimens in the
global state, and cache the per-worker specimens in local states, as in
[2]. I am a bit on the fence for supporting this, so this feature is
experimental. If you know the examples where this feature is must-have
(or, have a better sample for [2]), please let us know, and we can adopt
it as the supported one.
Thanks,
-Aleksey.
[1]
http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_28_BlackholeHelpers.java
[2]
http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_29_StatesDAG.java
More information about the jmh-dev
mailing list