| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Metrics.Types
Description
The main accessors for common stateful metric implementation data.
Synopsis
- type Minutes = Int
- class Count (b :: * -> *) m a | m -> b, a -> b where
- class Rate (b :: * -> *) m a | m -> b, a -> b where
- oneMinuteRate :: a -> m Double
- fiveMinuteRate :: a -> m Double
- fifteenMinuteRate :: a -> m Double
- meanRate :: a -> m Double
- class Value (b :: * -> *) m a v | m -> b, a -> b v where
- value :: a -> m v
- class Set (b :: * -> *) m a v | m -> b, a -> b v where
- set :: a -> v -> m ()
- class Clear (b :: * -> *) m a | m -> b, a -> b where
- clear :: a -> m ()
- class Statistics (b :: * -> *) m a | m -> b, a -> b where
- class Update (b :: * -> *) m a v | m -> b, a -> b v where
- update :: a -> v -> m ()
- 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.
Instances
| (MonadBase b m, PrimMonad b) => Count b m (Timer b) # | |
Defined in Data.Metrics.Timer | |
| (MonadBase b m, PrimMonad m) => Count b m (Meter m) # | |
Defined in Data.Metrics.Meter | |
| (MonadBase b m, PrimMonad b) => Count b m (Histogram b) # | |
Defined in Data.Metrics.Histogram | |
| (MonadBase b m, PrimMonad b) => Count b m (Counter b) # | |
Defined in Data.Metrics.Counter | |
class Rate (b :: * -> *) m a | m -> b, a -> b where #
Provides statistics from a histogram that tracks the standard moving average rates.
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.
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.
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.
class TakeSnapshot (b :: * -> *) m a | m -> b, a -> b where #
Take a snapshot (a sorted vector) of samples used for calculating quantile data.
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) # | |
Defined in Data.Metrics.Timer | |
| (MonadBase b m, PrimMonad b) => TakeSnapshot b m (Histogram b) # | |
Defined in Data.Metrics.Histogram | |