Simple wrappers for timing IO actions (single-threaded) http://github.com/ucsd-progsys/tagged-timers

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

MIT licensed by Ranjit Jhala
Maintained by jhala@cs.ucsd.edu


tagged-timers is a simple package for timing different IO that occur within a program and grouping the results according to dynamically generated String tags.


For a simple example of usage, see examples/Example.hs

main :: IO ()
main = do
  t <- T.create
  T.time t "cat" (act "cat" 5)
  T.time t "dog" (act "dog" 2)
  r <- T.result t
  putStrLn $ "Time Result: " ++ show r

which, when executed, yields the following behavior:

Prelude> :l examples/Example.hs
*Main> main
Starting action cat
Oh so sleepy...
(5 seconds later)
Finished action cat
Starting action dog
Oh so sleepy...
(2 seconds later)
Finished action dog
Time Result: [("cat",5.003739s),("dog",2.003825s)]
Depends on 4 packages:
Used by 1 package:
comments powered byDisqus