diff --git a/specjbb/openmetrics_specjbb_reset.txt b/specjbb/openmetrics_specjbb_reset.txt new file mode 100644 index 0000000..0da338b --- /dev/null +++ b/specjbb/openmetrics_specjbb_reset.txt @@ -0,0 +1,10 @@ +iteration 0 +running 0 +numthreads 0 +runtime NaN +throughput NaN +latency NaN +JVMs NaN +Warehouse NaN +BOPs NaN +Numa_bound NaN diff --git a/specjbb/specjbb_run b/specjbb/specjbb_run index 1cd9f64..ddec7f8 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 @@ -47,6 +48,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 @@ -107,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 @@ -142,7 +141,23 @@ present_wh_results() # and reset the values. # if [ $last_wh -ne $wh ]; then - echo $total_wh:$total_bops >> $2 + if [[ $to_use_pcp -eq 1 ]]; then + 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 + # + reset_pcp_om + fi + 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 @@ -153,11 +168,27 @@ 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}" + 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 + # + reset_pcp_om + fi } # @@ -165,6 +196,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 @@ -180,11 +213,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 @@ -205,13 +234,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 @@ -240,7 +262,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 @@ -424,13 +446,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,39 +474,49 @@ 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" + + for iterations in 1 `seq 2 1 $to_times_to_run`; do pindex=0 + if [[ $to_use_pcp -eq 1 ]]; then + start_pcp_subset + fi + if test -f "$file"; then while IFS= read -r specjbb_opts do execute_specjbb $specjbb_opts done < "$file" else + start_time=$(retrieve_time_stamp) execute_specjbb $specjbb_opts + end_time=$(retrieve_time_stamp) 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} - 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 + # + # 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 $start_time $end_time + if [[ $to_use_pcp -eq 1 ]]; then + stop_pcp_subset + fi + done } usage() @@ -753,9 +778,17 @@ 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 + # + # 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 @@ -779,7 +812,6 @@ for entry in $nodes; do obtain_nodes fi - run_specjbb done if [[ $to_use_pcp -eq 1 ]]; then