ekg-core-0.1.1.0: 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

An metric for tracking events.

new :: IO Distribution

Create a new distribution.

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

Add a value to the distribution.

addN :: Distribution -> Double -> Int64 -> IO ()

Add the same value to the distribution N times.

read :: Distribution -> IO Stats

Get the current statistical summary for the event being tracked.

Gathered statistics

data Stats

Distribution statistics

Instances

mean :: Stats -> Double

Sample mean

variance :: Stats -> Double

Biased sample variance

count :: Stats -> Int64

Event count

sum :: Stats -> Double

Sum of values

min :: Stats -> Double

Min value seen

max :: Stats -> Double

Max value seen