@Benchmark @BenchmarkMode(Mode.All) @Warmup(iterations = 0) @Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS) public void test1() { Fixtures.work(); sameVM = true; }
@Benchmark @BenchmarkMode(Mode.All) @Warmup(iterations = 0) @Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS) @Threads(4) public void test(MyState state) { Assert.assertEquals("Run", 1, state.value); Fixtures.work(); }
@Benchmark @BenchmarkMode(Mode.All) @Warmup(iterations = 0) @Measurement(iterations = 2, time = 100, timeUnit = TimeUnit.MILLISECONDS) @Fork(1) @Threads(2) public void test() { Fixtures.work(); countInvocations.incrementAndGet(); }