Commit 300c7217 authored by Joachim Breitner's avatar Joachim Breitner
Browse files

Give performance benchmark deviation also in percents

this makes it easier to spot a “just over the mark” change (e.g. +5.1%),
compared to a more radical jump (e.g. +15%).
parent cfeededf
......@@ -1040,8 +1040,10 @@ def checkStats(stats_file, range_fields):
result = failBecause('no such stats field')
val = int(m.group(1))
lowerBound = trunc( expected * ((100 - float(dev))/100));
upperBound = trunc(0.5 + ceil(expected * ((100 + float(dev))/100)));
lowerBound = trunc( expected * ((100 - float(dev))/100))
upperBound = trunc(0.5 + ceil(expected * ((100 + float(dev))/100)))
deviation = round(((val * 100)/ expected) - 100, 1)
if val < lowerBound:
print field, 'value is too low:'
......@@ -1064,6 +1066,8 @@ def checkStats(stats_file, range_fields):
display(' Lower bound ' + field + ':', lowerBound, '')
display(' Upper bound ' + field + ':', upperBound, '')
display(' Actual ' + field + ':', val, '')
if val != expected:
display(' Deviation ' + field + ':', deviation, '%')
return result
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment