Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
newtype CounterSample Source #
addAndSample :: Int -> Counter -> IO CounterSample Source #
set :: Int -> Counter -> IO () Source #
Write i
to the counter, if i
is more than the current value. This is
useful for when the count is maintained by a separate system (e.g. GHC's GC
counter).
WARNING: For multiple writers, the most recent one wins, which may not preserve the increasing property. If you have stronger requirements than this, please check with the maintainers. See https://github.com/bitnomial/prometheus/pull/44 for discussion.