This is an automated email from the ASF dual-hosted git repository.

karan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new be0ee2ee33d update version check for profiling to >= 17 (#15686)
be0ee2ee33d is described below

commit be0ee2ee33d0dd37f0336967ec6ac5431a6f2a90
Author: Sam Rash <[email protected]>
AuthorDate: Wed Feb 14 08:14:20 2024 -0800

    update version check for profiling to >= 17 (#15686)
---
 .github/scripts/setup_test_profiling_env.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/.github/scripts/setup_test_profiling_env.sh 
b/.github/scripts/setup_test_profiling_env.sh
index e3dff36867a..b3bf4dc1844 100755
--- a/.github/scripts/setup_test_profiling_env.sh
+++ b/.github/scripts/setup_test_profiling_env.sh
@@ -25,10 +25,17 @@ if [ "$#" -ne 5 ]; then
     echo "usage: $0 <jdk_version> <run_id> <run_number> <run_attempt> <module>"
 fi
 
-if [[ "$1" == "17" ]];
+if [[ "$1" -ge "17" ]];
 then
   curl https://static.imply.io/cp/$JAR_INPUT_FILE -s -o $JAR_OUTPUT_FILE
 
+  # Run 'java -version' and capture the output
+  output=$(java -version 2>&1)
+
+  # Extract the version number using grep and awk
+  jvm_version=$(echo "$output" | grep "version" | awk -F '"' '{print $2}')
+
+
   echo $ENV_VAR=-javaagent:"$PWD"/$JAR_OUTPUT_FILE \
   -Djfr.profiler.http.username=druid-ci \
   -Djfr.profiler.http.password=w3Fb6PW8LIo849mViEkbgA== \
@@ -36,7 +43,8 @@ then
   -Djfr.profiler.tags.run_id=$2 \
   -Djfr.profiler.tags.run_number=$3 \
   -Djfr.profiler.tags.run_attempt=$4 \
-  -Djfr.profiler.tags.module=$5
+  -Djfr.profiler.tags.module=$5 \
+  -Djfr.profiler.tags.jvm_version=$jvm_version
 else
   echo $ENV_VAR=\"\"
 fi


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to