Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.)
Documentation
A measure of the rate at which a set of events occurs.
mkMeter :: PrimMonad m => m NominalDiffTime -> m (Meter m) Source #
Create a meter using a custom function for retrieving the current time.
This is mostly exposed for testing purposes: prefer using "meter" if possible.
module Data.Metrics.Types