This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git
commit 248d67c1961628b5d08e2386939d2af81bfe01ea Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Wed May 10 19:11:28 2023 +0200 (chores) performance: break the disruptor tests for easier maintenance --- ...ava => DisruptorMultipleTypesProducerTest.java} | 51 +--------------- .../camel/itest/jmh/DisruptorProducerTest.java | 67 ---------------------- 2 files changed, 1 insertion(+), 117 deletions(-) diff --git a/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/DisruptorProducerTest.java b/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/DisruptorMultipleTypesProducerTest.java similarity index 77% copy from tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/DisruptorProducerTest.java copy to tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/DisruptorMultipleTypesProducerTest.java index 6b6898b..2a1fa03 100644 --- a/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/DisruptorProducerTest.java +++ b/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/DisruptorMultipleTypesProducerTest.java @@ -25,7 +25,7 @@ import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; -public class DisruptorProducerTest { +public class DisruptorMultipleTypesProducerTest { @Test public void launchBenchmark() throws Exception { @@ -78,55 +78,6 @@ public class DisruptorProducerTest { } } - @OutputTimeUnit(TimeUnit.MILLISECONDS) - @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) - @Benchmark - public void send_1(BenchmarkState state, Blackhole bh) { - state.producerTemplate.sendBody(state.endpoint, "test"); - } - - @OutputTimeUnit(TimeUnit.MILLISECONDS) - @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) - @Benchmark - @Threads(2) - public void send_2(BenchmarkState state, Blackhole bh) { - state.producerTemplate.sendBody(state.endpoint, "test"); - } - - - @OutputTimeUnit(TimeUnit.MILLISECONDS) - @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) - @Benchmark - @Threads(4) - public void send_4(BenchmarkState state, Blackhole bh) { - state.producerTemplate.sendBody(state.endpoint, "test"); - } - - @OutputTimeUnit(TimeUnit.MILLISECONDS) - @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) - @Benchmark - @Threads(8) - public void send_8(BenchmarkState state, Blackhole bh) { - state.producerTemplate.sendBody(state.endpoint, "test"); - } - - @OutputTimeUnit(TimeUnit.MILLISECONDS) - @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) - @Benchmark - @Threads(16) - public void send_16(BenchmarkState state, Blackhole bh) { - state.producerTemplate.sendBody(state.endpoint, "test"); - } - - @OutputTimeUnit(TimeUnit.MILLISECONDS) - @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) - @Benchmark - @Threads(32) - public void send_32(BenchmarkState state, Blackhole bh) { - state.producerTemplate.sendBody(state.endpoint, "test"); - } - - @OutputTimeUnit(TimeUnit.MILLISECONDS) @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) @Benchmark diff --git a/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/DisruptorProducerTest.java b/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/DisruptorProducerTest.java index 6b6898b..5b3a6a7 100644 --- a/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/DisruptorProducerTest.java +++ b/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/DisruptorProducerTest.java @@ -125,71 +125,4 @@ public class DisruptorProducerTest { public void send_32(BenchmarkState state, Blackhole bh) { state.producerTemplate.sendBody(state.endpoint, "test"); } - - - @OutputTimeUnit(TimeUnit.MILLISECONDS) - @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) - @Benchmark - public void sendMultipleTypes_1(BenchmarkState state, Blackhole bh) { - state.producerTemplate.sendBody(state.endpoint, "test"); - state.producerTemplate.sendBody(state.endpoint, state.someInt); - state.producerTemplate.sendBody(state.endpoint, state.someLong); - state.producerTemplate.sendBody(state.endpoint, state.sampleFile); - } - - @OutputTimeUnit(TimeUnit.MILLISECONDS) - @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) - @Benchmark - @Threads(2) - public void sendBlockingWithMultipleTypes_2(BenchmarkState state, Blackhole bh) { - state.producerTemplate.sendBody(state.endpoint, "test"); - state.producerTemplate.sendBody(state.endpoint, state.someInt); - state.producerTemplate.sendBody(state.endpoint, state.someLong); - state.producerTemplate.sendBody(state.endpoint, state.sampleFile); - } - - @OutputTimeUnit(TimeUnit.MILLISECONDS) - @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) - @Benchmark - @Threads(4) - public void sendBlockingWithMultipleTypes_4(BenchmarkState state, Blackhole bh) { - state.producerTemplate.sendBody(state.endpoint, "test"); - state.producerTemplate.sendBody(state.endpoint, state.someInt); - state.producerTemplate.sendBody(state.endpoint, state.someLong); - state.producerTemplate.sendBody(state.endpoint, state.sampleFile); - } - - @OutputTimeUnit(TimeUnit.MILLISECONDS) - @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) - @Benchmark - @Threads(8) - public void sendBlockingWithMultipleTypes_8(BenchmarkState state, Blackhole bh) { - state.producerTemplate.sendBody(state.endpoint, "test"); - state.producerTemplate.sendBody(state.endpoint, state.someInt); - state.producerTemplate.sendBody(state.endpoint, state.someLong); - state.producerTemplate.sendBody(state.endpoint, state.sampleFile); - } - - - @OutputTimeUnit(TimeUnit.MILLISECONDS) - @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) - @Benchmark - @Threads(16) - public void sendBlockingWithMultipleTypes_16(BenchmarkState state, Blackhole bh) { - state.producerTemplate.sendBody(state.endpoint, "test"); - state.producerTemplate.sendBody(state.endpoint, state.someInt); - state.producerTemplate.sendBody(state.endpoint, state.someLong); - state.producerTemplate.sendBody(state.endpoint, state.sampleFile); - } - - @OutputTimeUnit(TimeUnit.MILLISECONDS) - @BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SingleShotTime}) - @Benchmark - @Threads(32) - public void sendBlockingWithMultipleTypes_32(BenchmarkState state, Blackhole bh) { - state.producerTemplate.sendBody(state.endpoint, "test"); - state.producerTemplate.sendBody(state.endpoint, state.someInt); - state.producerTemplate.sendBody(state.endpoint, state.someLong); - state.producerTemplate.sendBody(state.endpoint, state.sampleFile); - } }