Interface JMHSample_28_BlackholeHelpers.Worker

  • Enclosing class:
    JMHSample_28_BlackholeHelpers

    public static interface JMHSample_28_BlackholeHelpers.Worker
    Sometimes you need the black hole not in @Benchmark method, but in helper methods, because you want to pass it through to the concrete implementation which is instantiated in helper methods. In this case, you can request the black hole straight in the helper method signature. This applies to both @Setup and @TearDown methods, and also to other JMH infrastructure objects, like Control. Below is the variant of JMHSample_08_DeadCode test, but wrapped in the anonymous classes.
    • Method Detail

      • work

        void work()