Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines a type for tracking statistics about a series
of events. An event could be handling of a request and the value
associated with the event -- the value you'd pass to add
-- could
be the amount of time spent serving that request (e.g. in
milliseconds). All operations are thread safe.
- data Distribution
- new :: IO Distribution
- add :: Distribution -> Double -> IO ()
- addN :: Distribution -> Double -> Int64 -> IO ()
- read :: Distribution -> IO Stats
- data Stats
- mean :: Stats -> Double
- variance :: Stats -> Double
- count :: Stats -> Int64
- sum :: Stats -> Double
- min :: Stats -> Double
- max :: Stats -> Double
Documentation
data Distribution Source #
An metric for tracking events.
new :: IO Distribution Source #
Create a new distribution.
addN :: Distribution -> Double -> Int64 -> IO () Source #
Add the same value to the distribution N times.
read :: Distribution -> IO Stats Source #
Get the current statistical summary for the event being tracked.