Package io.netty5.microbench.util
Class AbstractSharedExecutorMicrobenchmark
- java.lang.Object
-
- io.netty5.microbench.util.AbstractMicrobenchmarkBase
-
- io.netty5.microbench.util.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractSharedExecutorMicrobenchmark.DelegateHarnessExecutorThis executor allows Netty and JMH to share a common executor.
-
Field Summary
Fields Modifier and Type Field Description protected static intDEFAULT_FORKSprotected static String[]JVM_ARGS-
Fields inherited from class io.netty5.microbench.util.AbstractMicrobenchmarkBase
BASE_JVM_ARGS, DEFAULT_MEASURE_ITERATIONS, DEFAULT_WARMUP_ITERATIONS
-
-
Constructor Summary
Constructors Constructor Description AbstractSharedExecutorMicrobenchmark()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidexecutor(io.netty5.channel.EventLoop eventLoop)Set the executor (in the form of anEventLoop) which JMH will use.static voidhandleUnexpectedException(Throwable t)protected String[]jvmArgs()-
Methods inherited from class io.netty5.microbench.util.AbstractMicrobenchmarkBase
getMeasureIterations, getReportDir, getWarmupIterations, newOptionsBuilder, removeAssertions, run
-
-
-
-
Field Detail
-
DEFAULT_FORKS
protected static final int DEFAULT_FORKS
- See Also:
- Constant Field Values
-
JVM_ARGS
protected static final String[] JVM_ARGS
-
-
Method Detail
-
executor
public static void executor(io.netty5.channel.EventLoop eventLoop)
Set the executor (in the form of anEventLoop) 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.
-
jvmArgs
protected String[] jvmArgs()
- Specified by:
jvmArgsin classAbstractMicrobenchmarkBase
-
handleUnexpectedException
public static void handleUnexpectedException(Throwable t)
-
-