@Test public void testJavassistBenchmark() throws Exception { stubInvocationBenchmark.benchmarkJavassist(blackHole); }
@Benchmark @OperationsPerInvocation(20) public void benchmarkJavassist(Blackhole blackHole) { blackHole.consume(javassistInstance.method(booleanValue)); blackHole.consume(javassistInstance.method(byteValue)); blackHole.consume(javassistInstance.method(shortValue)); blackHole.consume(javassistInstance.method(intValue)); blackHole.consume(javassistInstance.method(charValue)); blackHole.consume(javassistInstance.method(intValue)); blackHole.consume(javassistInstance.method(longValue)); blackHole.consume(javassistInstance.method(floatValue)); blackHole.consume(javassistInstance.method(doubleValue)); blackHole.consume(javassistInstance.method(stringValue)); blackHole.consume(javassistInstance.method(booleanValue, booleanValue, booleanValue)); blackHole.consume(javassistInstance.method(byteValue, byteValue, byteValue)); blackHole.consume(javassistInstance.method(shortValue, shortValue, shortValue)); blackHole.consume(javassistInstance.method(intValue, intValue, intValue)); blackHole.consume(javassistInstance.method(charValue, charValue, charValue)); blackHole.consume(javassistInstance.method(intValue, intValue, intValue)); blackHole.consume(javassistInstance.method(longValue, longValue, longValue)); blackHole.consume(javassistInstance.method(floatValue, floatValue, floatValue)); blackHole.consume(javassistInstance.method(doubleValue, doubleValue, doubleValue)); blackHole.consume(javassistInstance.method(stringValue, stringValue, stringValue)); }
StubInvocationBenchmark { @Benchmark @OperationsPerInvocation(20) public void benchmarkJavassist(Blackhole blackHole) { blackHole.consume(javassistInstance.method(booleanValue)); blackHole.consume(javassistInstance.method(byteValue)); blackHole.consume(javassistInstance.method(shortValue)); blackHole.consume(javassistInstance.method(intValue)); blackHole.consume(javassistInstance.method(charValue)); blackHole.consume(javassistInstance.method(intValue)); blackHole.consume(javassistInstance.method(longValue)); blackHole.consume(javassistInstance.method(floatValue)); blackHole.consume(javassistInstance.method(doubleValue)); blackHole.consume(javassistInstance.method(stringValue)); blackHole.consume(javassistInstance.method(booleanValue, booleanValue, booleanValue)); blackHole.consume(javassistInstance.method(byteValue, byteValue, byteValue)); blackHole.consume(javassistInstance.method(shortValue, shortValue, shortValue)); blackHole.consume(javassistInstance.method(intValue, intValue, intValue)); blackHole.consume(javassistInstance.method(charValue, charValue, charValue)); blackHole.consume(javassistInstance.method(intValue, intValue, intValue)); blackHole.consume(javassistInstance.method(longValue, longValue, longValue)); blackHole.consume(javassistInstance.method(floatValue, floatValue, floatValue)); blackHole.consume(javassistInstance.method(doubleValue, doubleValue, doubleValue)); blackHole.consume(javassistInstance.method(stringValue, stringValue, stringValue)); } }
StubInvocationBenchmark { @Benchmark @OperationsPerInvocation(20) public void benchmarkJavassist(Blackhole blackHole) { blackHole.consume(javassistInstance.method(booleanValue)); blackHole.consume(javassistInstance.method(byteValue)); blackHole.consume(javassistInstance.method(shortValue)); blackHole.consume(javassistInstance.method(intValue)); blackHole.consume(javassistInstance.method(charValue)); blackHole.consume(javassistInstance.method(intValue)); blackHole.consume(javassistInstance.method(longValue)); blackHole.consume(javassistInstance.method(floatValue)); blackHole.consume(javassistInstance.method(doubleValue)); blackHole.consume(javassistInstance.method(stringValue)); blackHole.consume(javassistInstance.method(booleanValue, booleanValue, booleanValue)); blackHole.consume(javassistInstance.method(byteValue, byteValue, byteValue)); blackHole.consume(javassistInstance.method(shortValue, shortValue, shortValue)); blackHole.consume(javassistInstance.method(intValue, intValue, intValue)); blackHole.consume(javassistInstance.method(charValue, charValue, charValue)); blackHole.consume(javassistInstance.method(intValue, intValue, intValue)); blackHole.consume(javassistInstance.method(longValue, longValue, longValue)); blackHole.consume(javassistInstance.method(floatValue, floatValue, floatValue)); blackHole.consume(javassistInstance.method(doubleValue, doubleValue, doubleValue)); blackHole.consume(javassistInstance.method(stringValue, stringValue, stringValue)); }  }
StubInvocationBenchmark { @Benchmark @OperationsPerInvocation(20) public void benchmarkJavassist(Blackhole blackHole) { blackHole.consume(javassistInstance.method(booleanValue)); blackHole.consume(javassistInstance.method(byteValue)); blackHole.consume(javassistInstance.method(shortValue)); blackHole.consume(javassistInstance.method(intValue)); blackHole.consume(javassistInstance.method(charValue)); blackHole.consume(javassistInstance.method(intValue)); blackHole.consume(javassistInstance.method(longValue)); blackHole.consume(javassistInstance.method(floatValue)); blackHole.consume(javassistInstance.method(doubleValue)); blackHole.consume(javassistInstance.method(stringValue)); blackHole.consume(javassistInstance.method(booleanValue, booleanValue, booleanValue)); blackHole.consume(javassistInstance.method(byteValue, byteValue, byteValue)); blackHole.consume(javassistInstance.method(shortValue, shortValue, shortValue)); blackHole.consume(javassistInstance.method(intValue, intValue, intValue)); blackHole.consume(javassistInstance.method(charValue, charValue, charValue)); blackHole.consume(javassistInstance.method(intValue, intValue, intValue)); blackHole.consume(javassistInstance.method(longValue, longValue, longValue)); blackHole.consume(javassistInstance.method(floatValue, floatValue, floatValue)); blackHole.consume(javassistInstance.method(doubleValue, doubleValue, doubleValue)); blackHole.consume(javassistInstance.method(stringValue, stringValue, stringValue)); }  @Setup void setUp(); @Benchmark @OperationsPerInvocation(20) void baseline(Blackhole blackHole); @Benchmark @OperationsPerInvocation(20) void benchmarkByteBuddy(Blackhole blackHole); @Benchmark @OperationsPerInvocation(20) void benchmarkCglib(Blackhole blackHole); @Benchmark @OperationsPerInvocation(20) void benchmarkJavassist(Blackhole blackHole); @Benchmark @OperationsPerInvocation(20) void benchmarkJdkProxy(Blackhole blackHole); }
StubInvocationBenchmark { @Benchmark @OperationsPerInvocation(20) public void benchmarkJavassist(Blackhole blackHole) { blackHole.consume(javassistInstance.method(booleanValue)); blackHole.consume(javassistInstance.method(byteValue)); blackHole.consume(javassistInstance.method(shortValue)); blackHole.consume(javassistInstance.method(intValue)); blackHole.consume(javassistInstance.method(charValue)); blackHole.consume(javassistInstance.method(intValue)); blackHole.consume(javassistInstance.method(longValue)); blackHole.consume(javassistInstance.method(floatValue)); blackHole.consume(javassistInstance.method(doubleValue)); blackHole.consume(javassistInstance.method(stringValue)); blackHole.consume(javassistInstance.method(booleanValue, booleanValue, booleanValue)); blackHole.consume(javassistInstance.method(byteValue, byteValue, byteValue)); blackHole.consume(javassistInstance.method(shortValue, shortValue, shortValue)); blackHole.consume(javassistInstance.method(intValue, intValue, intValue)); blackHole.consume(javassistInstance.method(charValue, charValue, charValue)); blackHole.consume(javassistInstance.method(intValue, intValue, intValue)); blackHole.consume(javassistInstance.method(longValue, longValue, longValue)); blackHole.consume(javassistInstance.method(floatValue, floatValue, floatValue)); blackHole.consume(javassistInstance.method(doubleValue, doubleValue, doubleValue)); blackHole.consume(javassistInstance.method(stringValue, stringValue, stringValue)); }  @Setup void setUp(); @Benchmark @OperationsPerInvocation(20) void baseline(Blackhole blackHole); @Benchmark @OperationsPerInvocation(20) void benchmarkByteBuddy(Blackhole blackHole); @Benchmark @OperationsPerInvocation(20) void benchmarkCglib(Blackhole blackHole); @Benchmark @OperationsPerInvocation(20) void benchmarkJavassist(Blackhole blackHole); @Benchmark @OperationsPerInvocation(20) void benchmarkJdkProxy(Blackhole blackHole);  }