@Test public void test() { SimpleValidationWithoutShortCircuit bench = new SimpleValidationWithoutShortCircuit(); bench.testSimpleBeanValidation( new ValidationState(), new Blackhole("Today's password is swordfish. " + "I understand instantiating Blackholes directly is dangerous.")); }
@Benchmark @BenchmarkMode(Mode.Throughput) @OutputTimeUnit(TimeUnit.MILLISECONDS) @Fork(value = 1) @Threads(50) @Warmup(iterations = 5) @Measurement(iterations = 5) public void testSimpleBeanValidation(ValidationState state, Blackhole blackHole) { BenchmarkSetup benchmarkSetup = new BenchmarkSetup(BenchmarkModelWrapper::new, state); Result result = state.rule.executeOn(benchmarkSetup.model); assertThat(getActualViolationCount(result)).isEqualTo(benchmarkSetup.expectedViolationCount); blackHole.consume(result); }
SimpleValidationWithoutShortCircuit { @Benchmark @BenchmarkMode(Mode.Throughput) @OutputTimeUnit(TimeUnit.MILLISECONDS) @Fork(value = 1) @Threads(50) @Warmup(iterations = 5) @Measurement(iterations = 5) public void testSimpleBeanValidation(ValidationState state, Blackhole blackHole) { BenchmarkSetup benchmarkSetup = new BenchmarkSetup(BenchmarkModelWrapper::new, state); Result result = state.rule.executeOn(benchmarkSetup.model); assertThat(getActualViolationCount(result)).isEqualTo(benchmarkSetup.expectedViolationCount); blackHole.consume(result); } }
SimpleValidationWithoutShortCircuit { @Benchmark @BenchmarkMode(Mode.Throughput) @OutputTimeUnit(TimeUnit.MILLISECONDS) @Fork(value = 1) @Threads(50) @Warmup(iterations = 5) @Measurement(iterations = 5) public void testSimpleBeanValidation(ValidationState state, Blackhole blackHole) { BenchmarkSetup benchmarkSetup = new BenchmarkSetup(BenchmarkModelWrapper::new, state); Result result = state.rule.executeOn(benchmarkSetup.model); assertThat(getActualViolationCount(result)).isEqualTo(benchmarkSetup.expectedViolationCount); blackHole.consume(result); }  }
SimpleValidationWithoutShortCircuit { @Benchmark @BenchmarkMode(Mode.Throughput) @OutputTimeUnit(TimeUnit.MILLISECONDS) @Fork(value = 1) @Threads(50) @Warmup(iterations = 5) @Measurement(iterations = 5) public void testSimpleBeanValidation(ValidationState state, Blackhole blackHole) { BenchmarkSetup benchmarkSetup = new BenchmarkSetup(BenchmarkModelWrapper::new, state); Result result = state.rule.executeOn(benchmarkSetup.model); assertThat(getActualViolationCount(result)).isEqualTo(benchmarkSetup.expectedViolationCount); blackHole.consume(result); }  @Benchmark @BenchmarkMode(Mode.Throughput) @OutputTimeUnit(TimeUnit.MILLISECONDS) @Fork(value = 1) @Threads(50) @Warmup(iterations = 5) @Measurement(iterations = 5) void testSimpleBeanValidation(ValidationState state, Blackhole blackHole); }
SimpleValidationWithoutShortCircuit { @Benchmark @BenchmarkMode(Mode.Throughput) @OutputTimeUnit(TimeUnit.MILLISECONDS) @Fork(value = 1) @Threads(50) @Warmup(iterations = 5) @Measurement(iterations = 5) public void testSimpleBeanValidation(ValidationState state, Blackhole blackHole) { BenchmarkSetup benchmarkSetup = new BenchmarkSetup(BenchmarkModelWrapper::new, state); Result result = state.rule.executeOn(benchmarkSetup.model); assertThat(getActualViolationCount(result)).isEqualTo(benchmarkSetup.expectedViolationCount); blackHole.consume(result); }  @Benchmark @BenchmarkMode(Mode.Throughput) @OutputTimeUnit(TimeUnit.MILLISECONDS) @Fork(value = 1) @Threads(50) @Warmup(iterations = 5) @Measurement(iterations = 5) void testSimpleBeanValidation(ValidationState state, Blackhole blackHole);  }