From d6f11b17a0e8784928e67a5482b8e9227b7a5936 Mon Sep 17 00:00:00 2001 From: David Valin Date: Sat, 10 Jan 2026 04:45:38 -0500 Subject: [PATCH 1/5] Update pcp for the workload metrics, so information appears as expected. --- specjbb/openmetrics_specjbb_reset.txt | 8 +++ specjbb/specjbb_run | 100 +++++++++++++++++--------- 2 files changed, 74 insertions(+), 34 deletions(-) create mode 100644 specjbb/openmetrics_specjbb_reset.txt diff --git a/specjbb/openmetrics_specjbb_reset.txt b/specjbb/openmetrics_specjbb_reset.txt new file mode 100644 index 0000000..eb542e1 --- /dev/null +++ b/specjbb/openmetrics_specjbb_reset.txt @@ -0,0 +1,8 @@ +iteration 0 +running 0 +numthreads 0 +runtime NaN +throughput NaN +latency NaN +Warehouse NaN +BOPs NaN diff --git a/specjbb/specjbb_run b/specjbb/specjbb_run index 1cd9f64..dec4176 100755 --- a/specjbb/specjbb_run +++ b/specjbb/specjbb_run @@ -47,6 +47,7 @@ java_exec="/bin/java" test_status="Ran" start_warehouse=0 increment_warehouse=0 +pdir="" tools_git=https://github.com/redhat-performance/test_tools-wrappers @@ -142,6 +143,15 @@ present_wh_results() # and reset the values. # if [ $last_wh -ne $wh ]; then + if [[ $to_use_pcp -eq 1 ]]; then + result2pcp Warehouse ${total_wh} + result2pcp BOPs ${total_bops} + # + # To prevent WH confusion, reset. Do not reset iterations + # + result2pcp Warehouse 0 + result2pcp BOPs 0 + fi echo $total_wh:$total_bops >> $2 total_bops=$val total_wh=$wh @@ -158,6 +168,15 @@ present_wh_results() # Do not forget the last Warehouse count. # echo $total_wh:$total_bops >> $2 + if [[ $to_use_pcp -eq 1 ]]; then + result2pcp Warehouse ${total_wh} + result2pcp BOPs ${total_bops} + # + # To prevent WH confusion, reset. Do not reset iterations + # + result2pcp Warehouse 0 + result2pcp BOPs 0 + fi } # @@ -424,13 +443,6 @@ execute_specjbb() fi done - if [[ $to_use_pcp -eq 1 ]]; then - echo "Send result to PCP archive" - out="${test_to_run}_pcp" - result2pcp nr_jvms_${nr_jvms} ${out} - stop_pcp_subset - fi - if [[ $node_jvms -gt 1 ]]; then kill $controller_pid > /dev/null 2>&1 wait $controller_pid @@ -459,11 +471,32 @@ run_specjbb() # Prepare things for execution. # file=`/$to_home_root/$to_user/tools_bin/get_params_file -d /$to_home_root/$to_user -c ${to_sysname} -t ${test_name}` - # Arrays are 0 based let nr_jvms="$nr_jvms-1" + + if [[ $to_use_pcp -eq 1 ]]; then + source $TOOLS_BIN/pcp/pcp_commands.inc + setup_pcp + pcp_cfg=$TOOLS_BIN/pcp/default.cfg + # + # Set the pcp file and include the number of jvm nodes doing. + # + pcp_out=specjbb_jvms_${node_jvms} + # + # Only set this once. We want all the pcp files in one directory. + # + if [[ $pdir == "" ]]; then + pdir=/tmp/pcp_`date "+%Y.%m.%d-%H.%M.%S"` + fi + start_pcp ${pdir}/ $pcp_out $pcp_cfg + fi + for iterations in 1 `seq 2 1 $to_times_to_run`; do pindex=0 + if [[ $pcp -eq 1 ]]; then + start_pcp_subset + fi + if test -f "$file"; then while IFS= read -r specjbb_opts do @@ -472,26 +505,33 @@ run_specjbb() else execute_specjbb $specjbb_opts fi - done -# -# We need to process the data -# - pushd /tmp > /dev/null - if [[ $RESULTSDIR_TOP == "" ]]; then - RESULTSDIR_TOP=results_${test_name}_${tuned_setting}_$(date "+%Y.%m.%d-%H.%M.%S") - fi - RESULTSDIR=${RESULTSDIR_TOP}/results_${test_name}_${to_tuned_setting}_${node_jvms}_results - # We do not want any old data. - # - mkdir -p ${RESULTSDIR} - if [[ -d results_${test_name}_${to_tuned_setting} ]]; then - mv results_${test_name}_${to_tuned_setting} ${RESULTSDIR} + # + # We need to process the data + # + pushd /tmp > /dev/null + if [[ $RESULTSDIR_TOP == "" ]]; then + RESULTSDIR_TOP=results_${test_name}_${tuned_setting}_$(date "+%Y.%m.%d-%H.%M.%S") + fi + RESULTSDIR=${RESULTSDIR_TOP}/results_${test_name}_${to_tuned_setting}_${node_jvms}_results + # We do not want any old data. + # + mkdir -p ${RESULTSDIR} + if [[ -d results_${test_name}_${to_tuned_setting} ]]; then + mv results_${test_name}_${to_tuned_setting} ${RESULTSDIR} + fi + echo $test_status > ${RESULTSDIR}/test_results_report + timestamp=`date | sed "s/ /_/g"` + mv $run_dir/results_specjbb ${RESULTSDIR}/results_${test_name}_${timestamp} + process_specjbb_data + if [[ $pcp -eq 1 ]]; then + stop_pcp_subset + fi + done + if [[ $pcp -eq 1 ]]; then + stop_pcp + shutdown_pcp fi - echo $test_status > ${RESULTSDIR}/test_results_report - timestamp=`date | sed "s/ /_/g"` - mv $run_dir/results_specjbb ${RESULTSDIR}/results_${test_name}_${timestamp} - process_specjbb_data } usage() @@ -749,14 +789,6 @@ fi # # Iterate over the nodes # -if [[ $to_use_pcp -eq 1 ]]; then - source $TOOLS_BIN/pcp/pcp_commands.inc - setup_pcp - pcp_cfg=$TOOLS_BIN/pcp/default.cfg - pdir=/tmp/pcp_`date "+%Y.%m.%d-%H.%M.%S"` - echo "Start PCP" - start_pcp ${pdir}/ specjbb $pcp_cfg -fi for entry in $nodes; do # From 6e426ac44c55d37918bb1766554180e7d8f39d18 Mon Sep 17 00:00:00 2001 From: David Valin Date: Tue, 20 Jan 2026 11:27:21 -0500 Subject: [PATCH 2/5] Update to use the multi pcps. --- specjbb/openmetrics_specjbb_reset.txt | 1 + specjbb/specjbb_run | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/specjbb/openmetrics_specjbb_reset.txt b/specjbb/openmetrics_specjbb_reset.txt index eb542e1..4fe4935 100644 --- a/specjbb/openmetrics_specjbb_reset.txt +++ b/specjbb/openmetrics_specjbb_reset.txt @@ -4,5 +4,6 @@ numthreads 0 runtime NaN throughput NaN latency NaN +JVMs NaN Warehouse NaN BOPs NaN diff --git a/specjbb/specjbb_run b/specjbb/specjbb_run index dec4176..a5d7b87 100755 --- a/specjbb/specjbb_run +++ b/specjbb/specjbb_run @@ -24,6 +24,7 @@ # # Defined options # +act_jvms=0 java_version=21 RESULTSDIR_TOP="" rtc=0 @@ -144,13 +145,14 @@ present_wh_results() # if [ $last_wh -ne $wh ]; then if [[ $to_use_pcp -eq 1 ]]; then - result2pcp Warehouse ${total_wh} - result2pcp BOPs ${total_bops} + results2pcp_add_value "Warehouse:${total_wh}" + results2pcp_add_value "BOPs:${total_bops}" + results2pcp_add_value "JVMs:${act_jvms}" + results2pcp_add_value_commit # # To prevent WH confusion, reset. Do not reset iterations # - result2pcp Warehouse 0 - result2pcp BOPs 0 + reset_pcp_om fi echo $total_wh:$total_bops >> $2 total_bops=$val @@ -169,13 +171,14 @@ present_wh_results() # echo $total_wh:$total_bops >> $2 if [[ $to_use_pcp -eq 1 ]]; then - result2pcp Warehouse ${total_wh} - result2pcp BOPs ${total_bops} + results2pcp_add_value "Warehouse:${total_wh}" + results2pcp_add_value "BOPs:${total_bops}" + results2pcp_add_value "JVMs:${act_jvms}" + results2pcp_add_value_commit # # To prevent WH confusion, reset. Do not reset iterations # - result2pcp Warehouse 0 - result2pcp BOPs 0 + reset_pcp_om fi } From c845f29d7358137362586d5843b685270d7f62c9 Mon Sep 17 00:00:00 2001 From: David Valin Date: Tue, 20 Jan 2026 13:37:25 -0500 Subject: [PATCH 3/5] Fix $pcp to be $to_use_pcp --- specjbb/specjbb_run | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/specjbb/specjbb_run b/specjbb/specjbb_run index a5d7b87..cb341aa 100755 --- a/specjbb/specjbb_run +++ b/specjbb/specjbb_run @@ -477,26 +477,10 @@ run_specjbb() # Arrays are 0 based let nr_jvms="$nr_jvms-1" - if [[ $to_use_pcp -eq 1 ]]; then - source $TOOLS_BIN/pcp/pcp_commands.inc - setup_pcp - pcp_cfg=$TOOLS_BIN/pcp/default.cfg - # - # Set the pcp file and include the number of jvm nodes doing. - # - pcp_out=specjbb_jvms_${node_jvms} - # - # Only set this once. We want all the pcp files in one directory. - # - if [[ $pdir == "" ]]; then - pdir=/tmp/pcp_`date "+%Y.%m.%d-%H.%M.%S"` - fi - start_pcp ${pdir}/ $pcp_out $pcp_cfg - fi for iterations in 1 `seq 2 1 $to_times_to_run`; do pindex=0 - if [[ $pcp -eq 1 ]]; then + if [[ $to_use_pcp -eq 1 ]]; then start_pcp_subset fi @@ -527,14 +511,10 @@ run_specjbb() timestamp=`date | sed "s/ /_/g"` mv $run_dir/results_specjbb ${RESULTSDIR}/results_${test_name}_${timestamp} process_specjbb_data - if [[ $pcp -eq 1 ]]; then + if [[ $to_use_pcp -eq 1 ]]; then stop_pcp_subset fi done - if [[ $pcp -eq 1 ]]; then - stop_pcp - shutdown_pcp - fi } usage() @@ -792,6 +772,22 @@ fi # # Iterate over the nodes # +if [[ $to_use_pcp -eq 1 ]]; then + source $TOOLS_BIN/pcp/pcp_commands.inc + setup_pcp + pcp_cfg=$TOOLS_BIN/pcp/default.cfg + # + # Set the pcp file and include the number of jvm nodes doing. + # + pcp_out=specjbb_jvms_${node_jvms} + # + # Only set this once. We want all the pcp files in one directory. + # + if [[ $pdir == "" ]]; then + pdir=/tmp/pcp_`date "+%Y.%m.%d-%H.%M.%S"` + fi + start_pcp ${pdir}/ $pcp_out $pcp_cfg +fi for entry in $nodes; do # @@ -814,7 +810,6 @@ for entry in $nodes; do obtain_nodes fi - run_specjbb done if [[ $to_use_pcp -eq 1 ]]; then From 0d1dd74723dd5d2a74733e88219a706172564e8b Mon Sep 17 00:00:00 2001 From: David Valin Date: Wed, 28 Jan 2026 09:53:23 -0500 Subject: [PATCH 4/5] Cahnge csv : to , and add timestamps to csv file --- specjbb/specjbb_run | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/specjbb/specjbb_run b/specjbb/specjbb_run index cb341aa..213221f 100755 --- a/specjbb/specjbb_run +++ b/specjbb/specjbb_run @@ -109,20 +109,17 @@ error_out() exit $2 } -# -# results_specjbb.csv header -# -process_header() -{ - echo "Warehouses:Bops" >> $1 -} - # # For runs with multiple JVMs, we need to sum everything up. Note, # this includes the WH count, as each JVM is running (Total WH)/# JVMs. # present_wh_results() { + in_file=${1} + csv_file=${2} + jvms=${3} + start_time=${4} + end_time=${5} last_wh=0 total_wh=0 total_bops=0 @@ -147,14 +144,15 @@ present_wh_results() if [[ $to_use_pcp -eq 1 ]]; then results2pcp_add_value "Warehouse:${total_wh}" results2pcp_add_value "BOPs:${total_bops}" - results2pcp_add_value "JVMs:${act_jvms}" + results2pcp_add_value "JVMs:${jvms}" results2pcp_add_value_commit # # To prevent WH confusion, reset. Do not reset iterations # reset_pcp_om fi - echo $total_wh:$total_bops >> $2 + data_string=$(build_data_string "$total_wh" "$total_bops" "$jvms" "${start_time}" "${end_time}") + echo $data_string >> $csv_file total_bops=$val total_wh=$wh last_wh=$wh @@ -165,11 +163,12 @@ present_wh_results() # let "total_wh=$total_wh+$wh" let "total_bops=$total_bops+$val" - done < "$1" + done < "${in_file}" # # Do not forget the last Warehouse count. # - echo $total_wh:$total_bops >> $2 + data_string=$(build_data_string "$total_wh" "$total_bops" "$jvms" "${start_time}" "${end_time}") + echo $data_string >> $csv_file if [[ $to_use_pcp -eq 1 ]]; then results2pcp_add_value "Warehouse:${total_wh}" results2pcp_add_value "BOPs:${total_bops}" @@ -187,6 +186,8 @@ present_wh_results() # process_specjbb_data() { + start_time=${1} + slart_time=${2} total_data=$(mktemp /tmp/specjbb_data.XXXXXX) # # Locate the last created specjbb results @@ -202,11 +203,7 @@ process_specjbb_data() pushd $lvl2 > /tmp/null csv_file=`pwd`/results_${test_name}.csv if [ ! -f $csv_file ]; then - $TOOLS_BIN/test_header_info --front_matter --results_file $csv_file --host $to_configuration --sys_type $to_sys_type --tuned $to_tuned_setting --results_version $version --test_name $test_name - # - # Add test meta for the total number of JVMs - # - $TOOLS_BIN/test_header_info --results_file $csv_file --meta_output "Number of jvms: $node_jvms" + $TOOLS_BIN/test_header_info --front_matter --results_file $csv_file --host $to_configuration --sys_type $to_sys_type --tuned $to_tuned_setting --results_version $version --test_name $test_name --field_header "Warehouses,Bops,Numb_JVMs" fi for dir_work in `ls -d SPEC*`; do pushd $dir_work > /dev/null @@ -227,13 +224,6 @@ process_specjbb_data() # Afterwards we will organize the data. # for file_in in `ls SPEC*txt`; do - # - # If first time through, we need to provide the header. - # - if [[ $processed -eq 0 ]]; then - process_header $csv_file - processed=1 - fi wh_found=0 cat $file_in | sed "s/[*]/ /g" > ${file_in}.out while IFS= read -r data_in @@ -262,7 +252,7 @@ process_specjbb_data() # to sum the run up. # sort -n $total_data > ${total_data}_sorted - present_wh_results ${total_data}_sorted $csv_file + present_wh_results ${total_data}_sorted $csv_file $node_jvms ${start_time} ${end_time} rm ${total_data}* popd > /dev/null fi @@ -490,7 +480,9 @@ run_specjbb() execute_specjbb $specjbb_opts done < "$file" else + start_time=$(retrieve_time_stamp) execute_specjbb $specjbb_opts + end_time=$(retrieve_time_stamp) fi # @@ -510,7 +502,7 @@ run_specjbb() echo $test_status > ${RESULTSDIR}/test_results_report timestamp=`date | sed "s/ /_/g"` mv $run_dir/results_specjbb ${RESULTSDIR}/results_${test_name}_${timestamp} - process_specjbb_data + process_specjbb_data $start_time $end_time if [[ $to_use_pcp -eq 1 ]]; then stop_pcp_subset fi From 7191fc38ed8dec9b8efceecc2068e778fe4e5aa8 Mon Sep 17 00:00:00 2001 From: David Valin Date: Wed, 28 Jan 2026 12:35:19 -0500 Subject: [PATCH 5/5] Record numa bindings as part of the openmetrics --- specjbb/openmetrics_specjbb_reset.txt | 1 + specjbb/specjbb_run | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/specjbb/openmetrics_specjbb_reset.txt b/specjbb/openmetrics_specjbb_reset.txt index 4fe4935..0da338b 100644 --- a/specjbb/openmetrics_specjbb_reset.txt +++ b/specjbb/openmetrics_specjbb_reset.txt @@ -7,3 +7,4 @@ latency NaN JVMs NaN Warehouse NaN BOPs NaN +Numa_bound NaN diff --git a/specjbb/specjbb_run b/specjbb/specjbb_run index 213221f..ddec7f8 100755 --- a/specjbb/specjbb_run +++ b/specjbb/specjbb_run @@ -145,6 +145,11 @@ present_wh_results() results2pcp_add_value "Warehouse:${total_wh}" results2pcp_add_value "BOPs:${total_bops}" results2pcp_add_value "JVMs:${jvms}" + if [[ $node_pinning == "y" ]]; then + results2pcp_add_value "Numa_bound:1" + else + results2pcp_add_value "Numa_bound:0" + fi results2pcp_add_value_commit # # To prevent WH confusion, reset. Do not reset iterations @@ -174,6 +179,11 @@ present_wh_results() results2pcp_add_value "BOPs:${total_bops}" results2pcp_add_value "JVMs:${act_jvms}" results2pcp_add_value_commit + if [[ $node_pinning == "y" ]]; then + results2pcp_add_value "Numa_bound:1" + else + results2pcp_add_value "Numa_bound:0" + fi # # To prevent WH confusion, reset. Do not reset iterations #