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 Source #
Get the current count for the given metric.
Minimal complete definition
class Rate b m a | m -> b, a -> b where Source #
Provides statistics from a histogram that tracks the standard moving average rates.
Minimal complete definition
Methods
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 b m a v | m -> b, a -> b v where Source #
Update a metric by performing wholesale replacement of a value.
Minimal complete definition
Methods
class Clear b m a | m -> b, a -> b 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.
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 Source #
Provides the main interface for retrieving statistics tabulated by a histogram.
Methods
maxVal :: a -> m Double Source #
Gets the highest value encountered thus far.
minVal :: a -> m Double Source #
Gets the lowest value encountered thus far.
mean :: a -> m Double Source #
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.
class Update b m a v | m -> b, a -> b v where Source #
Update statistics tracked by a metric with a new sample.
Minimal complete definition