From 300c7217fce003e9a620e297c625ab26f31f6949 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Mon, 14 Jul 2014 13:30:24 +0200 Subject: Give performance benchmark deviation also in percents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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%). --- testsuite/driver/testlib.py | 8 ++++++-- 1 file 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 -- cgit v1.2.1