metrics-0.1.0.0: High-performance application metric tracking

Safe HaskellNone

Data.Metrics.Meter

Description

A meter measures the rate at which a set of events occur:

Meters measure the rate of the events in a few different ways. The mean rate is the average rate of events. It’s generally useful for trivia, but as it represents the total rate for your application’s entire lifetime (e.g., the total number of requests handled, divided by the number of seconds the process has been running), it doesn’t offer a sense of recency. Luckily, meters also record three different exponentially-weighted moving average rates: the 1-, 5-, and 15-minute moving averages.

(Just like the Unix load averages visible in uptime or top.)

Synopsis

Documentation

data Meter m Source

A measure of the rate at which a set of events occurs.

Instances

PrimMonad m => Rate m (Meter m) 
PrimMonad m => Count m (Meter m) 
Register (Meter IO) 

meter :: IO (Meter IO)Source

Create a new meter using an exponentially weighted moving average

mark :: PrimMonad m => Meter m -> m ()Source

Register a single occurrence of an event.

mark' :: PrimMonad m => Meter m -> Int -> m ()Source

Register multiple occurrences of an event.