private BeforeAfterProfilerTest beforeAfterProfilerTest = new BeforeAfterProfilerTest();
@Benchmark
public int aroundProfiler(int iter) {
int dummy = 0;
CallStackElement root = null;
for (int i = 0; i < iter; i++) {
root = new CallStackElement("root");
AroundProfiler.setMethodCallRoot(root);
dummy |= aroundProfilerTest.method1();
AroundProfiler.stop(root);
}
if (!root.getChildren().get(0).getSignature().contains("method1")) {
throw new IllegalStateException("profiling did not work");
}
return dummy;
}