metrics-0.3.0.2: High-performance application metric tracking

Safe HaskellNone
LanguageHaskell2010

Data.Metrics.Histogram.Internal

Description

The pure interface for histograms. This module is typically not as useful as the stateful implementation since reservoir updates require retrieving the current time.

Synopsis

Documentation

data Histogram Source

A pure histogram that maintains a bounded reservoir of samples and basic statistical data about the samples.

histogram :: Reservoir -> Histogram Source

Create a histogram using a custom reservoir.

clear :: NominalDiffTime -> Histogram -> Histogram Source

Reset all statistics, in addition to the underlying reservoir.

update :: Double -> NominalDiffTime -> Histogram -> Histogram Source

Update statistics and the reservoir with a new sample.

mean :: Histogram -> Double Source

Get the average of all samples since the histogram was created.

stddev :: Histogram -> Double Source

Get the standard deviation of all samples.

variance :: Histogram -> Double Source

Get the variance of all samples.

minVal :: Histogram -> Double Source

Get the minimum value of all samples.

maxVal :: Histogram -> Double Source

Get the maximum value of all samples

count :: Histogram -> Int Source

Get the number of samples that the histogram has been updated with.

snapshot :: Histogram -> Snapshot Source

Get a snapshot of the current reservoir's samples.