projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
435d4a4
)
Try to get the right output for nofib-analyse
author
Samuel Bronson
<naesten@gmail.com>
Sat, 14 Oct 2006 17:58:55 +0000
(17:58 +0000)
committer
Samuel Bronson
<naesten@gmail.com>
Sat, 14 Oct 2006 17:58:55 +0000
(17:58 +0000)
utils/nofib-analyse/Main.hs
patch
|
blob
|
history
diff --git
a/utils/nofib-analyse/Main.hs
b/utils/nofib-analyse/Main.hs
index
c81cfb4
..
9e298c9
100644
(file)
--- a/
utils/nofib-analyse/Main.hs
+++ b/
utils/nofib-analyse/Main.hs
@@
-17,7
+17,7
@@
import Data.FiniteMap
import System.Console.GetOpt
import System.Exit ( exitWith, ExitCode(..) )
import System.Console.GetOpt
import System.Exit ( exitWith, ExitCode(..) )
-import Numeric ( showFloat, showEFloat, showSigned )
+import Numeric ( showFloat, showFFloat, showSigned )
import Data.Maybe ( isNothing )
import Data.Char
import System.IO
import Data.Maybe ( isNothing )
import Data.Char
import System.IO
@@
-689,14
+689,14
@@
data BoxValue
showBox :: BoxValue -> String
showBox (RunFailed stat) = show_stat stat
showBox (Percentage f) = show_pcntage f
showBox :: BoxValue -> String
showBox (RunFailed stat) = show_stat stat
showBox (Percentage f) = show_pcntage f
-showBox (BoxFloat f) = show f
+showBox (BoxFloat f) = showFFloat (Just 2) f ""
showBox (BoxInt n) = show (n `div` 1024) ++ "k"
showBox (BoxInteger n) = show (n `div` 1024) ++ "k"
showBox (BoxString s) = s
instance Show BoxValue where { show = showBox }
showBox (BoxInt n) = show (n `div` 1024) ++ "k"
showBox (BoxInteger n) = show (n `div` 1024) ++ "k"
showBox (BoxString s) = s
instance Show BoxValue where { show = showBox }
-show_pcntage n = show (n-100) ++ "%"
+show_pcntage n = showFFloat (Just 1) (n-100) "%"
--show_pcntage n = show_float_signed (n-100) ++ "%"
--show_float_signed = showFloat False False True False False Nothing (Just 1)
--show_pcntage n = show_float_signed (n-100) ++ "%"
--show_float_signed = showFloat False False True False False Nothing (Just 1)