| Safe Haskell | None |
|---|
Data.Metrics.Types
Description
The main accessors for common stateful metric implementation data.
- type Minutes = Int
- class Count m a | a -> m where
- class Rate m a | a -> m where
- oneMinuteRate :: a -> m Double
- fiveMinuteRate :: a -> m Double
- fifteenMinuteRate :: a -> m Double
- meanRate :: a -> m Double
- class Value m a v | a -> m v where
- value :: a -> m v
- class Set m a v | a -> m v where
- set :: a -> v -> m ()
- class Clear m a | a -> m where
- clear :: a -> m ()
- class Statistics m a | a -> m where
- class Update m a v | a -> m v where
- update :: a -> v -> m ()
- class TakeSnapshot m a | a -> m where
Documentation
class Rate m a | a -> m whereSource
Provides statistics from a histogram that tracks the standard moving average rates.
Methods
oneMinuteRate :: a -> m DoubleSource
Get the average rate of occurrence for some sort of event for the past minute.
fiveMinuteRate :: a -> m DoubleSource
Get the average rate of occurrence for some sort of event for the past five minutes.
fifteenMinuteRate :: a -> m DoubleSource
Get the average rate of occurrence for some sort of event for the past fifteen minutes.
meanRate :: a -> m DoubleSource
Get the mean rate of occurrence for some sort of event for the entirety of the time that a has existed.
class Set m a v | a -> m v whereSource
Update a metric by performing wholesale replacement of a value.
Methods
class Clear m a | a -> m whereSource
Provides a way to reset metrics. This might be useful in a development environment or to periodically get a clean state for long-running processes.
Methods
Reset the metric to an empty state. In practice, this should be
equivalent to creating a new metric of the same type in-place.
class Statistics m a | a -> m whereSource
Provides the main interface for retrieving statistics tabulated by a histogram.
Methods
Gets the highest value encountered thus far.
Gets the lowest value encountered thus far.
Gets the current average value. This may have slightly different meanings depending on the type of MovingAverage used.
Gets the standard deviation of all values encountered this var.
variance :: a -> m DoubleSource
Gets the variance of all values encountered this var.
Instances
| (Functor m, PrimMonad m) => Statistics m (Timer m) | |
| PrimMonad m => Statistics m (Histogram m) |
class TakeSnapshot m a | a -> m whereSource
Take a snapshot (a sorted vector) of samples used for calculating quantile data.
Methods
snapshot :: a -> m SnapshotSource
Get a sample of the values currently in a histogram or type that contains a histogram.
Instances
| PrimMonad m => TakeSnapshot m (Timer m) | |
| PrimMonad m => TakeSnapshot m (Histogram m) |