summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2014-07-14 13:30:24 +0200
committerJoachim Breitner <mail@joachim-breitner.de>2014-07-14 13:30:24 +0200
commit300c7217fce003e9a620e297c625ab26f31f6949 (patch)
treef5aae6dcb88bac8fe810954b5d13a163393e20bb /testsuite/driver/testlib.py
parentcfeededff5662a6e2dc0104eb00adcca4d4ae984 (diff)
downloadhaskell-300c7217fce003e9a620e297c625ab26f31f6949.tar.gz
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%).
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r--testsuite/driver/testlib.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index e44f5f54cb..f3bfd58259 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -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