ekg-core-0.1.0.4: Tracking of system metrics

Safe HaskellNone
LanguageHaskell2010

System.Metrics.Counter

Description

This module defines a type for mutable, integer-valued counters. Counters are non-negative, monotonically increasing values and can be used to track e.g. the number of requests served since program start. All operations on counters are thread-safe.

Synopsis

Documentation

data Counter Source

A mutable, integer-valued counter.

new :: IO Counter Source

Create a new, zero initialized, counter.

read :: Counter -> IO Int64 Source

Get the current value of the counter.

inc :: Counter -> IO () Source

Increase the counter by one.

add :: Counter -> Int64 -> IO () Source

Add the argument to the counter.