metrics-0.4.1.1: High-performance application metric tracking

Safe HaskellNone
LanguageHaskell2010

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
      • 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

                  type Minutes = Int #

                  Histogram moving averages are tracked (by default) on minute scale.

                  class Count (b :: * -> *) m a | m -> b, a -> b where #

                  Get the current count for the given metric.

                  Minimal complete definition

                  count

                  Methods

                  count :: a -> m Int #

                  retrieve a count

                  Instances
                  (MonadBase b m, PrimMonad b) => Count b m (Timer b) # 
                  Instance details

                  Defined in Data.Metrics.Timer

                  Methods

                  count :: Timer b -> m Int #

                  (MonadBase b m, PrimMonad m) => Count b m (Meter m) # 
                  Instance details

                  Defined in Data.Metrics.Meter

                  Methods

                  count :: Meter m -> m Int #

                  (MonadBase b m, PrimMonad b) => Count b m (Histogram b) # 
                  Instance details

                  Defined in Data.Metrics.Histogram

                  Methods

                  count :: Histogram b -> m Int #

                  (MonadBase b m, PrimMonad b) => Count b m (Counter b) # 
                  Instance details

                  Defined in Data.Metrics.Counter

                  Methods

                  count :: Counter b -> m Int #

                  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.

                  meanRate :: a -> m Double #

                  Get the mean rate of occurrence for some sort of event for the entirety of the time that a has existed.

                  Instances
                  Rate IO IO (Meter IO) # 
                  Instance details

                  Defined in Data.Metrics.Meter

                  (MonadBase b m, PrimMonad b) => Rate b m (Timer b) # 
                  Instance details

                  Defined in Data.Metrics.Timer

                  class Value (b :: * -> *) m a v | m -> b, a -> b v where #

                  Gets the current value from a simple metric (i.e. a Counter or a Gauge)

                  Minimal complete definition

                  value

                  Methods

                  value :: a -> m v #

                  Instances
                  (MonadBase b m, PrimMonad b) => Value b m (Gauge b) Double # 
                  Instance details

                  Defined in Data.Metrics.Gauge

                  Methods

                  value :: Gauge b -> m Double #

                  (MonadBase b m, PrimMonad b) => Value b m (Counter b) Int # 
                  Instance details

                  Defined in Data.Metrics.Counter

                  Methods

                  value :: Counter b -> m Int #

                  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

                  set

                  Methods

                  set :: a -> v -> m () #

                  Replace the current value of a simple metric (i.e. a Counter or a Gauge)

                  Instances
                  (MonadBase b m, PrimMonad b) => Set b m (Counter b) Int # 
                  Instance details

                  Defined in Data.Metrics.Counter

                  Methods

                  set :: Counter b -> Int -> m () #

                  (MonadBase b m, PrimMonad b) => Set b m (Gauge b) (b Double) # 
                  Instance details

                  Defined in Data.Metrics.Gauge

                  Methods

                  set :: Gauge b -> b Double -> m () #

                  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

                  clear

                  Methods

                  clear :: a -> m () #

                  Reset the metric to an empty state. In practice, this should be equivalent to creating a new metric of the same type in-place.

                  Instances
                  (MonadBase b m, PrimMonad b) => Clear b m (Timer b) # 
                  Instance details

                  Defined in Data.Metrics.Timer

                  Methods

                  clear :: Timer b -> m () #

                  (MonadBase b m, PrimMonad b) => Clear b m (Histogram b) # 
                  Instance details

                  Defined in Data.Metrics.Histogram

                  Methods

                  clear :: Histogram b -> m () #

                  (MonadBase b m, PrimMonad b) => Clear b m (Counter b) # 
                  Instance details

                  Defined in Data.Metrics.Counter

                  Methods

                  clear :: Counter b -> m () #

                  class Statistics (b :: * -> *) m a | m -> b, a -> b where #

                  Provides the main interface for retrieving statistics tabulated by a histogram.

                  Minimal complete definition

                  maxVal, minVal, mean, stddev, variance

                  Methods

                  maxVal :: a -> m Double #

                  Gets the highest value encountered thus far.

                  minVal :: a -> m Double #

                  Gets the lowest value encountered thus far.

                  mean :: a -> m Double #

                  Gets the current average value. This may have slightly different meanings depending on the type of MovingAverage used.

                  stddev :: a -> m Double #

                  Gets the standard deviation of all values encountered this var.

                  variance :: a -> m Double #

                  Gets the variance of all values encountered this var.

                  Instances
                  (MonadBase b m, PrimMonad b) => Statistics b m (Timer b) # 
                  Instance details

                  Defined in Data.Metrics.Timer

                  Methods

                  maxVal :: Timer b -> m Double #

                  minVal :: Timer b -> m Double #

                  mean :: Timer b -> m Double #

                  stddev :: Timer b -> m Double #

                  variance :: Timer b -> m Double #

                  (MonadBase b m, PrimMonad b) => Statistics b m (Histogram b) # 
                  Instance details

                  Defined in Data.Metrics.Histogram

                  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

                  update

                  Methods

                  update :: a -> v -> m () #

                  Feed a metric another value.

                  Instances
                  (MonadBase b m, PrimMonad b) => Update b m (Timer b) Double # 
                  Instance details

                  Defined in Data.Metrics.Timer

                  Methods

                  update :: Timer b -> Double -> m () #

                  (MonadBase b m, PrimMonad b) => Update b m (Histogram b) Double # 
                  Instance details

                  Defined in Data.Metrics.Histogram

                  Methods

                  update :: Histogram b -> Double -> m () #

                  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

                  snapshot

                  Methods

                  snapshot :: a -> m Snapshot #

                  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) # 
                  Instance details

                  Defined in Data.Metrics.Timer

                  Methods

                  snapshot :: Timer b -> m Snapshot #

                  (MonadBase b m, PrimMonad b) => TakeSnapshot b m (Histogram b) # 
                  Instance details

                  Defined in Data.Metrics.Histogram

                  Methods

                  snapshot :: Histogram b -> m Snapshot #