Mmuzaf commented on code in PR #2708: URL: https://github.com/apache/cassandra/pull/2708#discussion_r1333287161
########## .build/build-bench.xml: ########## @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project basedir="." name="apache-cassandra-bench" + xmlns:if="ant:if" xmlns:unless="ant:unless"> + + <property name="async-profiler.version" value="2.9"/> + <condition property="async-profiler.suffix" value="linux-arm64"> + <and> + <os arch="aarch64"/> + <isset property="isLinux"/> + </and> + </condition> + <condition property="async-profiler.suffix" value="linux-x64"> + <and> + <os arch="amd64"/> + <isset property="isLinux"/> + </and> + </condition> + <condition property="async-profiler.suffix" value="macos"> + <isset property="isMac"/> + </condition> + <property name="async-profiler.name" value="async-profiler-${async-profiler.version}-${async-profiler.suffix}"/> + <property name="async-profiler.base" value="${build.dir}/async-profiler"/> + + <property name="test.profiler.opts.default" value="event=cpu;threads=true;output=flamegraph;simple=true;ann=true"/> + <property name="test.profiler.output" value="${build.test.dir}/profiler"/> + + <target name="-microbench"> + <jmh/> + </target> + + <target name="-microbench-with-profiler" depends="-fetch-async-profiler"> + <condition property="test.profiler.opts" value="${test.profiler.opts.default}" else="${profiler.opts}"> + <or> + <not> + <isset property="profiler.opts"/> + </not> + <equals arg1="${profiler.opts}" arg2=""/> + </or> + </condition> + + <property name="async-profiler.lib.path" value="${async-profiler.base}/build/libasyncProfiler.so"/> + + <mkdir dir="${test.profiler.output}"/> + + <jmh> + <extra-args> + <arg value="-prof"/> + <arg value="async:libPath=${async-profiler.lib.path};dir=${test.profiler.output};${test.profiler.opts}"/> + </extra-args> + </jmh> + </target> + + <macrodef name="jmh"> + <element name="extra-args" optional="true"/> + <sequential> + <java classname="org.openjdk.jmh.Main" fork="true" failonerror="true" > + <classpath> + <path refid="cassandra.classpath.test"/> + <pathelement location="${test.classes}"/> + <pathelement location="${test.conf}"/> + <pathelement location="${async-profiler.base}/lib/async-profiler.jar"/> + <pathelement location="${async-profiler.base}/lib/converter.jar"/> + </classpath> + + <jvmarg line="${java-jvmargs}"/> + <jvmarg line="${_std-test-jvmargs}"/> + <jvmarg line="${test.jvm.args}"/> + + <arg value="-foe"/> + <arg value="true"/> + <arg value="-rf"/> + <arg value="json"/> + <arg value="-rff"/> + <arg value="${build.test.dir}/jmh-result.json"/> + <arg value="-v"/> + <arg value="EXTRA"/> + + <arg line="${jmh.args}"/> + + <extra-args/> + + <!-- Broken: ZeroCopyStreamingBench,MutationBench,FastThreadLocalBench (FIXME) --> Review Comment: Do we need to keep this comment? It doesn't shed any light on what exactly is broken. We can also create and issue and leave the issue number here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

