tagged-timers: Simple wrappers for timing IO actions (single-threaded)

[ library, mit, system ] [ Propose Tags ]

Library for tagging IO actions and getting logs of total time spent per tag.

[Skip to Readme]




Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS]
Dependencies base (>=4.8 && <4.9), time (>=1.5 && <1.6), transformers (>=0.4 && <0.5), unordered-containers [details]
License MIT
Author Ranjit Jhala
Maintainer jhala@cs.ucsd.edu
Category System
Home page http://github.com/ucsd-progsys/tagged-timers
Source repo head: git clone http://github.com/ucsd-progsys/tagged-timers.git
Uploaded by ranjitjhala at 2016-03-20T04:48:11Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 781 total (4 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-03-20 [all 1 reports]

Readme for tagged-timers-

[back to package description]


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)]