Class AbstractSharedExecutorMicrobenchmark


  • public class AbstractSharedExecutorMicrobenchmark
    extends AbstractMicrobenchmarkBase
    This harness facilitates the sharing of an executor between JMH and Netty and thus avoid measuring context switching in microbenchmarks.
    • Field Detail

      • JVM_ARGS

        protected static final String[] JVM_ARGS
    • Constructor Detail

      • AbstractSharedExecutorMicrobenchmark

        public AbstractSharedExecutorMicrobenchmark()
    • Method Detail

      • executor

        public static void executor​(io.netty5.channel.EventLoop eventLoop)
        Set the executor (in the form of an EventLoop) which JMH will use.

        This must be called before JMH requires an executor to execute objects.

        Parameters:
        eventLoop - Used as an executor by JMH to run benchmarks.
      • handleUnexpectedException

        public static void handleUnexpectedException​(Throwable t)