pnowojski commented on code in PR #90:
URL: https://github.com/apache/flink-benchmarks/pull/90#discussion_r1616223910
##########
benchmark.sh:
##########
@@ -0,0 +1,54 @@
+#!/usr/bin/env bash
Review Comment:
I would mark this as executable.
##########
benchmark.sh:
##########
@@ -0,0 +1,48 @@
+#!/usr/bin/env bash
+
+JAVA_ARGS=()
+JMH_ARGS=()
+BINARY="java"
+BENCHMARK_PATTERN=
+
+while getopts ":j:c:b:e:p:a:m:h" opt; do
+ case $opt in
+ j) JAVA_ARGS+=("${OPTARG}")
+ ;;
+ c) CLASSPATH_ARG="${OPTARG}"
+ ;;
+ b) BINARY="${OPTARG}"
+ ;;
+ p) PROFILER_ARG="${OPTARG:+-prof ${OPTARG}}"
+ # conditional prefixing inspired by
https://stackoverflow.com/a/40771884/1389220
+ ;;
+ a) JMH_ARGS+=("${OPTARG}")
+ ;;
+ e) BENCHMARK_EXCLUDES="${OPTARG:+-e ${OPTARG}}"
+ ;;
+ m) BENCHMARK_PATTERN="${OPTARG}"
+ echo "parsing -m"
+ ;;
+ h)
+ 1>&2 cat << EOF
+usage: TODO
+EOF
+ exit 1
+ ;;
+ \?) echo "Invalid option -$opt ${OPTARG}" >&2
+ exit 1
+ ;;
+ esac
+done
+shift "$(($OPTIND -1))"
Review Comment:
I would suggest to use python or java wrapper instead of bash, if only for
the sake of being able to use a nice args library. For example take a look at
https://github.com/apache/flink-benchmarks/blob/master/regression_report.py or
some other python script in this repo's root.
##########
pom.xml:
##########
@@ -290,25 +291,31 @@ under the License.
<configuration>
<skip>${skipTests}</skip>
<classpathScope>test</classpathScope>
-
<executable>${executableJava}</executable>
+
<executable>${basedir}/benchmark.sh</executable>
Review Comment:
Are the executable commands the same? There are some scripts (in
[jenkins](https://github.com/apache/flink-benchmarks/tree/master/jenkinsfiles)?)
that are relaying for those commands to behave the way they were behaving. If
something changes, they would have to be changed as well.
--
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]