public class SuperClassInvocationBenchmark extends Object
This benchmark measures the invocation speed of stub method invocations. All classes implement
ExampleClass and call this class's super method invocation. Since it
is not possible to create a subclass with the JDK proxy utilities, the latter is omitted from the benchmark.
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.
| Constructor and Description |
|---|
SuperClassInvocationBenchmark() |
| Modifier and Type | Method and Description |
|---|---|
void |
baseline(Blackhole blackHole)
Performs a benchmark for a casual class as a baseline.
|
void |
benchmarkByteBuddySpecialized(Blackhole blackHole)
Performs a benchmark of a super method invocation using Byte Buddy.
|
void |
benchmarkByteBuddyWithAccessor(Blackhole blackHole)
Performs a benchmark of a super method invocation using Byte Buddy.
|
void |
benchmarkByteBuddyWithPrefix(Blackhole blackHole)
Performs a benchmark of a super method invocation using Byte Buddy.
|
void |
benchmarkByteBuddyWithProxy(Blackhole blackHole)
Performs a benchmark of a super method invocation using Byte Buddy.
|
void |
benchmarkCglib(Blackhole blackHole)
Performs a benchmark of a super method invocation using cglib.
|
void |
benchmarkJavassist(Blackhole blackHole)
Performs a benchmark of a super method invocation using javassist.
|
void |
setUp()
Creates an instance for each code generation library.
|
public void setUp()
throws Exception
ClassByExtensionBenchmark.Exception - Covers the exception declarations of the setup methods.public void baseline(Blackhole blackHole)
blackHole - A black hole for avoiding JIT erasure.public void benchmarkByteBuddyWithProxy(Blackhole blackHole)
blackHole - A black hole for avoiding JIT erasure.public void benchmarkByteBuddyWithAccessor(Blackhole blackHole)
blackHole - A black hole for avoiding JIT erasure.public void benchmarkByteBuddyWithPrefix(Blackhole blackHole)
blackHole - A black hole for avoiding JIT erasure.public void benchmarkByteBuddySpecialized(Blackhole blackHole)
blackHole - A black hole for avoiding JIT erasure.public void benchmarkCglib(Blackhole blackHole)
blackHole - A black hole for avoiding JIT erasure.public void benchmarkJavassist(Blackhole blackHole)
blackHole - A black hole for avoiding JIT erasure.Copyright © 2014–2023. All rights reserved.