SamBarker commented on code in PR #90:
URL: https://github.com/apache/flink-benchmarks/pull/90#discussion_r1618157436
##########
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 had a go at doing it in python
https://github.com/SamBarker/flink-benchmarks/blob/generate-flamegraphs-py/run-benchmarks.py
life got quite funky trying to pass `--add-opens` to something that actually
understood long arguments.
I can merge that into this PR if preferred but I'm not sure it actually
improves things here.
The other option might be to look at
[ap-loader](https://github.com/jvm-profiling-tools/ap-loader) which would allow
us to ensure that the native libraries are available.
--
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]