The tagged-timers package

[Tags:library, mit]

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


[Skip to Readme]

Properties

Versions 0.1.0.0
Dependencies base (==4.8.*), time (==1.5.*), transformers (==0.4.*), 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 repository head: git clone http://github.com/ucsd-progsys/tagged-timers.git
Uploaded Sun Mar 20 04:48:11 UTC 2016 by ranjitjhala
Distributions NixOS:0.1.0.0
Downloads 54 total (4 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2016-03-20 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for tagged-timers

Readme for tagged-timers-0.1.0.0

README

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.

Example

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