Skip to content

Commit 2afc0bb

Browse files
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0: Implement microbench test target type
2 parents afa5512 + dfb52e5 commit 2afc0bb

24 files changed

+161
-102
lines changed

.build/build-artifacts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# limitations under the License.
1717

1818
# variables, with defaults
19-
[ "x${CASSANDRA_DIR}" != "x" ] || CASSANDRA_DIR="$(readlink -f $(dirname "$0")/..)"
19+
[ "x${CASSANDRA_DIR}" != "x" ] || CASSANDRA_DIR="$(readlink -f $(dirname -- "$0")/..)"
2020

2121
# pre-conditions
2222
command -v ant >/dev/null 2>&1 || { echo >&2 "ant needs to be installed"; exit 1; }

.build/build-bench.xml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,22 @@
4141
<property name="test.profiler.opts.default" value="event=cpu;threads=true;output=flamegraph;simple=true;ann=true"/>
4242
<property name="test.profiler.output" value="${build.test.dir}/profiler"/>
4343

44-
<target name="-microbench">
44+
<target name="microbench" depends="maybe-build-test">
4545
<jmh/>
4646
</target>
4747

48-
<target name="-microbench-with-profiler" depends="-fetch-async-profiler">
48+
<target name="microbench-test" depends="maybe-build-test" description="test each microbench runs once">
49+
<!-- Only used to test jmh classes run without error. Not to be used for actual performance tests -->
50+
<jmh>
51+
<extra-args>
52+
<arg value="-f"/><arg value="1"/>
53+
<arg value="-wi"/><arg value="0"/>
54+
<arg value="-i"/><arg value="1"/>
55+
</extra-args>
56+
</jmh>
57+
</target>
58+
59+
<target name="microbench-with-profiler" depends="maybe-build-test,-fetch-async-profiler">
4960
<condition property="test.profiler.opts" value="${test.profiler.opts.default}" else="${profiler.opts}">
5061
<or>
5162
<not>
@@ -83,6 +94,10 @@
8394
<jvmarg line="${_std-test-jvmargs}"/>
8495
<jvmarg line="${test.jvm.args}"/>
8596

97+
<!-- total memory must fit within the pod constraints, see comments in .jenkins/Jenkinsfile and dind's container resourceRequestMemory in .jenkins/k8s/jenkins-deployment.yaml -->
98+
<!-- note! this is used for both the JMH runner and VMH fork -->
99+
<jvmarg value="-Xmx1G"/>
100+
86101
<arg value="-foe"/>
87102
<arg value="true"/>
88103
<arg value="-rf"/>
@@ -97,8 +112,9 @@
97112
<extra-args/>
98113

99114
<!-- TODO https://issues.apache.org/jira/browse/CASSANDRA-18873 -->
115+
<!-- The classes listed below are broken, and so currently ignored, see CASSANDRA-18873 -->
100116
<arg value="-e" if:blank="${benchmark.name}"/>
101-
<arg value="ZeroCopyStreamingBench|MutationBench|FastThreadLocalBench" if:blank="${benchmark.name}"/>
117+
<arg value="AtomicBTreePartitionUpdateBench|BTreeSearchIteratorBench|BTreeTransformBench|BTreeUpdateBench|CompactionWideRowBench|FastThreadLocalBench|KeyLookupBench|LatencyTrackingBench|MutationBench|(instance.*Bench)|ReadWriteBench|SSTablePipeCursorBench|SSTableReadingCursorBench|SSTableReadingFileBench|SSTableReadingFileCursorBench|ZeroCopyStreamingBench" if:blank="${benchmark.name}"/>
102118

103119
<arg value=".*microbench.*${benchmark.name}"/>
104120
</java>

.build/build-jars.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# temporary between CASSANDRA-18133 and CASSANDRA-18594
1919

2020
# variables, with defaults
21-
[ "x${CASSANDRA_DIR}" != "x" ] || CASSANDRA_DIR="$(readlink -f $(dirname "$0")/..)"
21+
[ "x${CASSANDRA_DIR}" != "x" ] || CASSANDRA_DIR="$(readlink -f $(dirname -- "$0")/..)"
2222

2323
# pre-conditions
2424
command -v ant >/dev/null 2>&1 || { echo >&2 "ant needs to be installed"; exit 1; }

.build/check-code.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# limitations under the License.
1717

1818
# variables, with defaults
19-
[ "x${CASSANDRA_DIR}" != "x" ] || { CASSANDRA_DIR="$(dirname "$0")/.."; }
19+
[ "x${CASSANDRA_DIR}" != "x" ] || { CASSANDRA_DIR="$(dirname -- "$0")/.."; }
2020

2121
# pre-conditions
2222
command -v ant >/dev/null 2>&1 || { echo >&2 "ant needs to be installed"; exit 1; }

.build/ci/generate-ci-summary.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#
2929

3030
# variables, with defaults
31-
[ "x${CASSANDRA_DIR}" != "x" ] || CASSANDRA_DIR="$(readlink -f $(dirname "$0")/../..)"
31+
[ "x${CASSANDRA_DIR}" != "x" ] || CASSANDRA_DIR="$(readlink -f $(dirname -- "$0")/../..)"
3232
[ "x${DIST_DIR}" != "x" ] || DIST_DIR="${CASSANDRA_DIR}/build"
3333

3434
# pre-conditions

.build/ci/generate-test-report.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#
2525

2626
# variables, with defaults
27-
[ "x${CASSANDRA_DIR}" != "x" ] || CASSANDRA_DIR="$(readlink -f $(dirname "$0")/../..)"
27+
[ "x${CASSANDRA_DIR}" != "x" ] || CASSANDRA_DIR="$(readlink -f $(dirname -- "$0")/../..)"
2828
[ "x${DIST_DIR}" != "x" ] || DIST_DIR="${CASSANDRA_DIR}/build"
2929

3030
# pre-conditions

.build/docker/_build-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
[ $DEBUG ] && set -x
2525

2626
# variables, with defaults
27-
[ "x${CASSANDRA_DIR}" != "x" ] || CASSANDRA_DIR="$(readlink -f $(dirname "$0")/..)"
27+
[ "x${CASSANDRA_DIR}" != "x" ] || CASSANDRA_DIR="$(readlink -f $(dirname -- "$0")/..)"
2828
[ "x${DIST_DIR}" != "x" ] || DIST_DIR="${CASSANDRA_DIR}/build"
2929

3030
# pre-conditions

.build/docker/_build-redhat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
################################
2323

2424
# variables, w/ defaults, w/ checks
25-
[ "x${CASSANDRA_DIR}" != "x" ] || CASSANDRA_DIR="$(readlink -f $(dirname "$0")/..)"
25+
[ "x${CASSANDRA_DIR}" != "x" ] || CASSANDRA_DIR="$(readlink -f $(dirname -- "$0")/..)"
2626
[ "x${DIST_DIR}" != "x" ] || DIST_DIR="${CASSANDRA_DIR}/build"
2727
[ "x${RPM_BUILD_DIR}" != "x" ] || RPM_BUILD_DIR="$(mktemp -d /tmp/rpmbuild.XXXXXX)"
2828

.build/docker/_docker_run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
[ $DEBUG ] && set -x
3030

3131
# variables, with defaults
32-
[ "x${cassandra_dir}" != "x" ] || cassandra_dir="$(readlink -f $(dirname "$0")/../..)"
32+
[ "x${cassandra_dir}" != "x" ] || cassandra_dir="$(readlink -f $(dirname -- "$0")/../..)"
3333
[ "x${build_dir}" != "x" ] || build_dir="${cassandra_dir}/build"
3434
[ "x${m2_dir}" != "x" ] || m2_dir="${HOME}/.m2/repository"
3535
[ -d "${build_dir}" ] || { mkdir -p "${build_dir}" ; }

.build/docker/build-artifacts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
#
1919
# Creates the tarball artifact
2020

21-
$(dirname "$0")/_docker_run.sh bullseye-build.docker build-artifacts.sh $1
21+
$(dirname -- "$0")/_docker_run.sh bullseye-build.docker build-artifacts.sh $1
2222
exit $?

0 commit comments

Comments
 (0)