Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 where Source
Provides statistics from a histogram that tracks the standard moving average rates.
oneMinuteRate :: a -> m Double Source
Get the average rate of occurrence for some sort of event for the past minute.
fiveMinuteRate :: a -> m Double Source
Get the average rate of occurrence for some sort of event for the past five minutes.
fifteenMinuteRate :: a -> m Double Source
Get the average rate of occurrence for some sort of event for the past fifteen minutes.
meanRate :: a -> m Double Source
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 where Source
Update a metric by performing wholesale replacement of a value.
class Clear m a | a -> m where Source
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.
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 where Source
Provides the main interface for retrieving statistics tabulated by a histogram.
maxVal :: a -> m Double Source
Gets the highest value encountered thus far.
minVal :: a -> m Double Source
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.
stddev :: a -> m Double Source
Gets the standard deviation of all values encountered this var.
variance :: a -> m Double Source
Gets the variance of all values encountered this var.
(Functor m, PrimMonad m) => Statistics m (Timer m) | |
PrimMonad m => Statistics m (Histogram m) |
class TakeSnapshot m a | a -> m where Source
Take a snapshot (a sorted vector) of samples used for calculating quantile data.
snapshot :: a -> m Snapshot Source
Get a sample of the values currently in a histogram or type that contains a histogram.
PrimMonad m => TakeSnapshot m (Timer m) | |
PrimMonad m => TakeSnapshot m (Histogram m) |