Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Metrics.Types
Description
The main accessors for common stateful metric implementation data.
- type Minutes = Int
- class Count b m a | m -> b, a -> b where
- class Rate b m a | m -> b, a -> b where
- class Value b m a v | m -> b, a -> b v where
- class Set b m a v | m -> b, a -> b v where
- class Clear b m a | m -> b, a -> b where
- class Statistics b m a | m -> b, a -> b where
- class Update b m a v | m -> b, a -> b v where
- class TakeSnapshot b m a | m -> b, a -> b where
Documentation
class Count b m a | m -> b, a -> b where #
Get the current count for the given metric.
Minimal complete definition
class Rate b m a | m -> b, a -> b where #
Provides statistics from a histogram that tracks the standard moving average rates.
Minimal complete definition
Methods
oneMinuteRate :: a -> m Double #
Get the average rate of occurrence for some sort of event for the past minute.
fiveMinuteRate :: a -> m Double #
Get the average rate of occurrence for some sort of event for the past five minutes.
fifteenMinuteRate :: a -> m Double #
Get the average rate of occurrence for some sort of event for the past fifteen minutes.
Get the mean rate of occurrence for some sort of event for the entirety of the time that a
has existed.
class Set b m a v | m -> b, a -> b v where #
Update a metric by performing wholesale replacement of a value.
Minimal complete definition
Methods
class Clear b m a | m -> b, a -> b where #
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.
Minimal complete definition
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 b m a | m -> b, a -> b where #
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.
Gets the variance of all values encountered this var.
Instances
(MonadBase b m, PrimMonad b) => Statistics b m (Timer b) # | |
(MonadBase b m, PrimMonad b) => Statistics b m (Histogram b) # | |
class Update b m a v | m -> b, a -> b v where #
Update statistics tracked by a metric with a new sample.
Minimal complete definition
class TakeSnapshot b m a | m -> b, a -> b where #
Take a snapshot (a sorted vector) of samples used for calculating quantile data.
Minimal complete definition
Methods
Get a sample of the values currently in a histogram or type that contains a histogram.
Instances
(MonadBase b m, PrimMonad b) => TakeSnapshot b m (Timer b) # | |
(MonadBase b m, PrimMonad b) => TakeSnapshot b m (Histogram b) # | |