metrics-0.2.1.0: High-performance application metric tracking

Safe HaskellNone

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 -> HistogramSource

Create a histogram using a custom reservoir.

clear :: NominalDiffTime -> Histogram -> HistogramSource

Reset all statistics, in addition to the underlying reservoir.

update :: Double -> NominalDiffTime -> Histogram -> HistogramSource

Update statistics and the reservoir with a new sample.

mean :: Histogram -> DoubleSource

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

stddev :: Histogram -> DoubleSource

Get the standard deviation of all samples.

variance :: Histogram -> DoubleSource

Get the variance of all samples.

minVal :: Histogram -> DoubleSource

Get the minimum value of all samples.

maxVal :: Histogram -> DoubleSource

Get the maximum value of all samples

count :: Histogram -> IntSource

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

snapshot :: Histogram -> SnapshotSource

Get a snapshot of the current reservoir's samples.