public class TrivialClassCreationBenchmark extends Object
A benchmark for creating plain subclasses of Object that do not override any methods. This benchmark
intends to measure the general overhead of each library.
Note that this class defines all values that are accessed by benchmark methods as instance fields. This way, the JIT compiler's capability of constant folding is limited in order to produce more comparable test results.
| Modifier and Type | Field and Description |
|---|---|
static Class<?> |
BASE_CLASS
The base class to be subclassed in all benchmarks.
|
| Constructor and Description |
|---|
TrivialClassCreationBenchmark() |
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
baseline()
Returns a non-instrumented class as a baseline.
|
Class<?> |
benchmarkByteBuddy()
Performs a benchmark for a trivial class creation using Byte Buddy.
|
Class<?> |
benchmarkCglib()
Performs a benchmark for a trivial class creation using cglib.
|
Class<?> |
benchmarkJavassist()
Performs a benchmark for a trivial class creation using javassist proxies.
|
Class<?> |
benchmarkJdkProxy()
Performs a benchmark for a trivial class creation using the Java Class Library's utilities.
|
public static final Class<?> BASE_CLASS
public Class<?> baseline()
Object.public Class<?> benchmarkByteBuddy()
public Class<?> benchmarkCglib()
public Class<?> benchmarkJavassist()
public Class<?> benchmarkJdkProxy()
Copyright © 2014–2023. All rights reserved.