Skip to content

Commit

Permalink
Merge pull request #26 from redhat-performance/handle_warnings
Browse files Browse the repository at this point in the history
Handle warnings
  • Loading branch information
dvalinrh authored May 29, 2024
2 parents 9876bf3 + a017eb9 commit cfeaa46
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pyperf/pyperf_run
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ install_tools()

generate_csv_file()
{
re='^[0-9]+$'
instance=0
float=0
ivalue=0
Expand All @@ -86,16 +85,18 @@ generate_csv_file()
if [ -z "$line" ]; then
let "reduce=$reduce+1"
if [[ $reduce -eq 2 ]]; then
results=`echo "${value_sum}/${res_count}" | bc -l`
printf "%s:%.2f:%s\n" $test_name $results $unit >> ${1}.csv
if [[ $test_name != *"WARNING:"* ]]; then
results=`echo "${value_sum}/${res_count}" | bc -l`
printf "%s:%.2f:%s\n" $test_name $results $unit >> ${1}.csv
fi
reduce=0
res_count=0
value_sum=0
test_name=""
fi
continue
fi
if [[ $line == *"--"* ]] || [[ $line == *"calibrate"* ]] || [[ $line == *"warmup"* ]]; then
if [[ $line == *"--"* ]] || [[ $line == *"calibrate"* ]] || [[ $line == *"warmup"* ]] || [[ $line != *"value"* ]]; then
continue
fi
value=`echo $line | cut -d' ' -f 4`
Expand All @@ -104,7 +105,7 @@ generate_csv_file()
value_sum=`echo "${value}+${value_sum}" | bc -l`
done < "${1}.results"
results=`echo "${value_sum}/${res_count}" | bc -l`
printf "%s:%12.2f:%s\n" $test_name $results $unit >> ${1}.csv
printf "%s:%.2f:%s\n" $test_name $results $unit >> ${1}.csv
}

pip3_install()
Expand Down

0 comments on commit cfeaa46

Please sign in to comment.