Skip to content

Commit cfeaa46

Browse files
authored
Merge pull request #26 from redhat-performance/handle_warnings
Handle warnings
2 parents 9876bf3 + a017eb9 commit cfeaa46

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pyperf/pyperf_run

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ install_tools()
6767

6868
generate_csv_file()
6969
{
70-
re='^[0-9]+$'
7170
instance=0
7271
float=0
7372
ivalue=0
@@ -86,16 +85,18 @@ generate_csv_file()
8685
if [ -z "$line" ]; then
8786
let "reduce=$reduce+1"
8887
if [[ $reduce -eq 2 ]]; then
89-
results=`echo "${value_sum}/${res_count}" | bc -l`
90-
printf "%s:%.2f:%s\n" $test_name $results $unit >> ${1}.csv
88+
if [[ $test_name != *"WARNING:"* ]]; then
89+
results=`echo "${value_sum}/${res_count}" | bc -l`
90+
printf "%s:%.2f:%s\n" $test_name $results $unit >> ${1}.csv
91+
fi
9192
reduce=0
9293
res_count=0
9394
value_sum=0
9495
test_name=""
9596
fi
9697
continue
9798
fi
98-
if [[ $line == *"--"* ]] || [[ $line == *"calibrate"* ]] || [[ $line == *"warmup"* ]]; then
99+
if [[ $line == *"--"* ]] || [[ $line == *"calibrate"* ]] || [[ $line == *"warmup"* ]] || [[ $line != *"value"* ]]; then
99100
continue
100101
fi
101102
value=`echo $line | cut -d' ' -f 4`
@@ -104,7 +105,7 @@ generate_csv_file()
104105
value_sum=`echo "${value}+${value_sum}" | bc -l`
105106
done < "${1}.results"
106107
results=`echo "${value_sum}/${res_count}" | bc -l`
107-
printf "%s:%12.2f:%s\n" $test_name $results $unit >> ${1}.csv
108+
printf "%s:%.2f:%s\n" $test_name $results $unit >> ${1}.csv
108109
}
109110

110111
pip3_install()

0 commit comments

Comments
 (0)