ekg-core-0.1.0.1: Tracking of system metrics

Safe HaskellNone

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 DistributionSource

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 StatsSource

Get the current statistical summary for the event being tracked.

Gathered statistics

data Stats Source

Distribution statistics

Instances

mean :: Stats -> DoubleSource

Sample mean

variance :: Stats -> DoubleSource

Biased sample variance

count :: Stats -> Int64Source

Event count

sum :: Stats -> DoubleSource

Sum of values

min :: Stats -> DoubleSource

Min value seen

max :: Stats -> DoubleSource

Max value seen