ekg-core-0.1.1.7: Tracking of system metrics

Safe HaskellNone
LanguageHaskell2010

System.Metrics.Distribution

Contents

Description

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.

Synopsis

Documentation

data Distribution Source #

An metric for tracking events.

new :: IO Distribution Source #

Create a new distribution.

add :: Distribution -> Double -> IO () Source #

Add a value to the 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.

Gathered statistics

data Stats Source #

Distribution statistics

Instances
Eq Stats Source # 
Instance details

Defined in System.Metrics.Distribution.Internal

Methods

(==) :: Stats -> Stats -> Bool #

(/=) :: Stats -> Stats -> Bool #

Show Stats Source # 
Instance details

Defined in System.Metrics.Distribution.Internal

Methods

showsPrec :: Int -> Stats -> ShowS #

show :: Stats -> String #

showList :: [Stats] -> ShowS #

mean :: Stats -> Double Source #

Sample mean

variance :: Stats -> Double Source #

Biased sample variance

count :: Stats -> Int64 Source #

Event count

sum :: Stats -> Double Source #

Sum of values

min :: Stats -> Double Source #

Min value seen

max :: Stats -> Double Source #

Max value seen