Module

System.Metrics.Histogram

Package
purescript-metrics
Repository
abhin4v/purescript-metrics

#Histogram Source

data Histogram :: Type

A mutable distribution of values in a stream of data.

#Summary Source

newtype Summary

Summary of the distribution of the measurements in the histogram. Contains:

  • min: minimum
  • max: maximum
  • sum: sum
  • variance: variance
  • mean: mean
  • stdDev: standard deviation
  • count: count
  • median: median
  • p75: 75th percentile
  • p95: 95th percentile
  • p99: 99th percentile
  • p999: 99.9th percentile

Constructors

Instances

#newWithExponentialDecaySampling Source

newWithExponentialDecaySampling :: forall eff. Int -> Number -> Eff (ref :: REF | eff) Histogram

Creates a new histogram with exponential decay sampling with given size and alpha.

#newWithUniformSampling Source

newWithUniformSampling :: forall eff. Int -> Eff (ref :: REF | eff) Histogram

Creates a new histogram with uniform sampling with the given size.

#clear Source

clear :: forall eff. Histogram -> Eff (ref :: REF | eff) Unit

Clears the histogram.

#update Source

update :: forall eff. Histogram -> Number -> Eff (ref :: REF | eff) Unit

Updates the histogram with the given measurement.

#percentiles Source

percentiles :: forall eff. Histogram -> Array Number -> Eff (ref :: REF | eff) (Maybe (Array Number))

Returns the percentiles of the measurements in the histogram for the given percentiles array. Returns 'Nothing' if there are no measurements.

#variance Source

variance :: forall eff. Histogram -> Eff (ref :: REF | eff) (Maybe Number)

Returns the variance of the measurements in the histogram. Returns 'Nothing' if there are no measurements.

#mean Source

mean :: forall eff. Histogram -> Eff (ref :: REF | eff) (Maybe Number)

Returns the mean of the measurements in the histogram. Returns 'Nothing' if there are no measurements.

#stdDev Source

stdDev :: forall eff. Histogram -> Eff (ref :: REF | eff) (Maybe Number)

Returns the standard deviation of the measurements in the histogram. Returns 'Nothing' if there are no measurements.

#min Source

min :: forall eff. Histogram -> Eff (ref :: REF | eff) (Maybe Number)

Returns the minimum of the measurements in the histogram. Returns 'Nothing' if there are no measurements.

#max Source

max :: forall eff. Histogram -> Eff (ref :: REF | eff) (Maybe Number)

Returns the maximum of the measurements in the histogram. Returns 'Nothing' if there are no measurements.

#sum Source

sum :: forall eff. Histogram -> Eff (ref :: REF | eff) (Maybe Number)

Returns the sum of the measurements in the histogram. Returns 'Nothing' if there are no measurements.

#count Source

count :: forall eff. Histogram -> Eff (ref :: REF | eff) Int

Returns the count of measurements in the histogram.

#read Source

read :: forall eff. Histogram -> Eff (ref :: REF | eff) Summary

Returns the summary of the measurements in the histogram.