[commit: nofib] master: Print no change as 0.0% (d9f1d03)

git at git.haskell.org git at git.haskell.org
Wed Jan 29 16:11:57 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d9f1d038c0bb5a95a346024eecd021987f9dc5f9/nofib

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

commit d9f1d038c0bb5a95a346024eecd021987f9dc5f9
Author: Joachim Breitner <breitner at kit.edu>
Date:   Wed Jan 29 17:10:28 2014 +0100

    Print no change as 0.0%
    
    not as +0.0%. Makes the real increases much easier to spot.


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

d9f1d038c0bb5a95a346024eecd021987f9dc5f9
 nofib-analyse/Main.hs |    1 +
 1 file changed, 1 insertion(+)

diff --git a/nofib-analyse/Main.hs b/nofib-analyse/Main.hs
index 8484d71..fa78ebe 100644
--- a/nofib-analyse/Main.hs
+++ b/nofib-analyse/Main.hs
@@ -887,6 +887,7 @@ data BoxValue
 
 showBox :: BoxValue -> String
 showBox (RunFailed stat) = show_stat stat
+showBox (Percentage 100) = " 0.0%" -- pattern matching on Float is bad style, but this is not crucial
 showBox (Percentage f)   = case printf "%.1f%%" (f-100) of
                                xs@('-':_) -> xs
                                xs -> '+':xs



More information about the ghc-commits mailing list