monad-metrics 0.2.1.4 → 0.2.2.0
raw patch · 3 files changed
+19/−3 lines, 3 filesdep ~hashabledep ~mtldep ~textPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hashable, mtl, text, transformers
API changes (from Hackage documentation)
+ Control.Monad.Metrics: gaugeDecrement :: (MonadIO m, MonadMetrics m) => Text -> m ()
+ Control.Monad.Metrics: gaugeIncrement :: (MonadIO m, MonadMetrics m) => Text -> m ()
Files
- CHANGELOG.md +2/−2
- monad-metrics.cabal +1/−1
- src/Control/Monad/Metrics.hs +16/−0
CHANGELOG.md view
@@ -1,8 +1,8 @@ # Change Log -## v0.2.1.4+## v0.2.2.0 -- Bump `hashable` upper bound.+- Add `gaugeIncrement` and `gaugeDecrement` functions [#16](https://github.com/parsonsmatt/monad-metrics/pull/16) ## v0.2.1.1
monad-metrics.cabal view
@@ -1,5 +1,5 @@ name: monad-metrics-version: 0.2.1.4+version: 0.2.2.0 synopsis: A convenient wrapper around EKG metrics description: A convenient wrapper for collecting application metrics. Please see the README.md for more information. homepage: https://github.com/parsonsmatt/monad-metrics#readme
src/Control/Monad/Metrics.hs view
@@ -36,6 +36,8 @@ , counter' , gauge , gauge'+ , gaugeIncrement+ , gaugeDecrement , distribution , timed , timed'@@ -202,6 +204,20 @@ -- * /Since v0.1.0.0/ gauge :: (MonadIO m, MonadMetrics m) => Text -> Int -> m () gauge = gauge'++-- | See 'System.Metrics.Distribution.Gauge.dec'.+--+-- @since 0.2.2.0+gaugeDecrement :: (MonadIO m, MonadMetrics m) => Text -> m ()+gaugeDecrement name =+ modifyMetric (\g -> const $ Gauge.dec g) id EKG.createGauge _metricsGauges name ()++-- | See 'System.Metrics.Distribution.Gauge.inc'.+--+-- @since 0.2.2.0+gaugeIncrement :: (MonadIO m, MonadMetrics m) => Text -> m ()+gaugeIncrement name =+ modifyMetric (\g -> const $ Gauge.inc g) id EKG.createGauge _metricsGauges name () -- | Record the time taken to perform the named action. The number is -- stored in a 'System.Metrics.Distribution.Distribution' and is converted