[commit: ghc] master: Give performance benchmark deviation also in percents (300c721)

git at git.haskell.org git at git.haskell.org
Mon Jul 14 11:31:27 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/300c7217fce003e9a620e297c625ab26f31f6949/ghc

>---------------------------------------------------------------

commit 300c7217fce003e9a620e297c625ab26f31f6949
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Mon Jul 14 13:30:24 2014 +0200

    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%).


>---------------------------------------------------------------

300c7217fce003e9a620e297c625ab26f31f6949
 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 e44f5f5..f3bfd58 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
 



More information about the ghc-commits mailing list