From 3658ba58c7d0be0803cbd7480c73d46705c3372d Mon Sep 17 00:00:00 2001 From: Jacek Lewandowski Date: Wed, 20 Sep 2023 11:44:41 +0200 Subject: [PATCH] JMH improvements - faster build and async profiler - Don't create uber jar for microbenchmarks - Add async profiler to jmh tests - Benchmark classes names validation - Add jmh.args property to make it possible passing extra args to JMH - Add missing test/anttasks to idea configuration Patch by Jacek Lewandowski; reviewed by Branimir Lambov, Maxim Muzafarov, Stefan Miklosovic for CASSANDRA-18871 --- .build/build-bench.xml | 136 +++++++++++++++ CHANGES.txt | 1 + build.xml | 121 ++++++------- ide/idea-iml-file.xml | 1 + .../cassandra/anttasks/TestNameCheckTask.java | 163 ++++++++++++++---- test/bin/jmh | 12 +- ...ReadWriteTest.java => ReadWriteBench.java} | 2 +- .../{Sample.java => SampleBench.java} | 2 +- ...hmark.java => ZeroCopyStreamingBench.java} | 2 +- .../{ReadTest.java => ReadBenchBase.java} | 2 +- ...ons.java => ReadSmallPartitionsBench.java} | 2 +- ...ions.java => ReadWidePartitionsBench.java} | 2 +- 12 files changed, 340 insertions(+), 106 deletions(-) create mode 100644 .build/build-bench.xml rename test/microbench/org/apache/cassandra/test/microbench/{ReadWriteTest.java => ReadWriteBench.java} (98%) rename test/microbench/org/apache/cassandra/test/microbench/{Sample.java => SampleBench.java} (99%) rename test/microbench/org/apache/cassandra/test/microbench/{ZeroCopyStreamingBenchmark.java => ZeroCopyStreamingBench.java} (99%) rename test/microbench/org/apache/cassandra/test/microbench/instance/{ReadTest.java => ReadBenchBase.java} (99%) rename test/microbench/org/apache/cassandra/test/microbench/instance/{ReadTestSmallPartitions.java => ReadSmallPartitionsBench.java} (96%) rename test/microbench/org/apache/cassandra/test/microbench/instance/{ReadTestWidePartitions.java => ReadWidePartitionsBench.java} (98%) diff --git a/.build/build-bench.xml b/.build/build-bench.xml new file mode 100644 index 0000000000..3da92d87df --- /dev/null +++ b/.build/build-bench.xml @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CHANGES.txt b/CHANGES.txt index 6c4e0ef6b0..620a637fa0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 4.0.12 + * JMH improvements - faster build and async profiler (CASSANDRA-18871) * Enable 3rd party JDK installations for Debian package (CASSANDRA-18844) * Fix NTS log message when an unrecognized strategy option is passed (CASSANDRA-18679) * Fix BulkLoader ignoring cipher suites options (CASSANDRA-18582) diff --git a/build.xml b/build.xml index 5812360e27..3c39f000c3 100644 --- a/build.xml +++ b/build.xml @@ -63,6 +63,7 @@ + @@ -130,6 +131,18 @@ + + + + + + + + + + + + @@ -586,8 +599,8 @@ - - + + @@ -1248,28 +1261,6 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -1324,17 +1315,41 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1948,35 +1963,12 @@ - - - - - - - - - - - - - - - - - - - - - + + + - - - - - + +