Skip to content

Commit

Permalink
Merge pull request #11 from redhat-performance/add_units
Browse files Browse the repository at this point in the history
Add units
  • Loading branch information
dvalinrh authored Aug 8, 2022
2 parents 72d2205 + 3e311e4 commit a431bda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyperf/pyperf_run
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ generate_csv_file()
let "reduce=$reduce+1"
if [[ $reduce -eq 2 ]]; then
results=`echo "${value_sum}/${res_count}" | bc -l`
printf "%s %.2f\n" $test_name $results >> ${1}.csv
printf "%s:%.2f:%s\n" $test_name $results $unit >> ${1}.csv
reduce=0
res_count=0
value_sum=0
Expand All @@ -89,11 +89,12 @@ generate_csv_file()
continue
fi
value=`echo $line | cut -d' ' -f 4`
unit=`echo $line | cut -d' ' -f 5`
let "res_count=${res_count}+1"
value_sum=`echo "${value}+${value_sum}" | bc -l`
done < "${1}.results"
results=`echo "${value_sum}/${res_count}" | bc -l`
printf "%s %12.2f\n" $test_name $results >> ${1}.csv
printf "%s:%12.2f:%s\n" $test_name $results $unit >> ${1}.csv
}

#
Expand Down

0 comments on commit a431bda

Please sign in to comment.