metrics-0.4.0.1: 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 #

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

histogram :: Reservoir -> Histogram #

Create a histogram using a custom reservoir.

clear :: NominalDiffTime -> Histogram -> Histogram #

Reset all statistics, in addition to the underlying reservoir.

update :: Double -> NominalDiffTime -> Histogram -> Histogram #

Update statistics and the reservoir with a new sample.

mean :: Histogram -> Double #

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

stddev :: Histogram -> Double #

Get the standard deviation of all samples.

variance :: Histogram -> Double #

Get the variance of all samples.

minVal :: Histogram -> Double #

Get the minimum value of all samples.

maxVal :: Histogram -> Double #

Get the maximum value of all samples

count :: Histogram -> Int #

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

snapshot :: Histogram -> Snapshot #

Get a snapshot of the current reservoir's samples.