|
definition: |
printTiming :: [(ProcessInfo,Int)] -> [(ProcessInfo,Int)] -> IO ()
printTiming startPInfos stopPInfos = do
putStrLn $ "Run time: "
++ (showInfoDiff startPInfos stopPInfos RunTime) ++ " msec."
putStrLn $ "Elapsed time: "
++ (showInfoDiff startPInfos stopPInfos ElapsedTime) ++ " msec."
putStrLn $ "Garbage collections: "
++ (showInfoDiff startPInfos stopPInfos GarbageCollections)
where
showInfoDiff infos1 infos2 item =
maybe "n/a"
(\i1 -> show (maybe 0 id (lookup item infos2) - i1))
(lookup item infos1)
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
show timing w.r.t. some process infos at the start and stop point of a computation: |
|
failfree: |
(_, _) |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,_) |-> _}
|
|
name: |
printTiming |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
[(Debug.Profile.ProcessInfo, Prelude.Int)] -> [(Debug.Profile.ProcessInfo, Prelude.Int)] -> Prelude.IO () |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |