ekg-0.3.1.3: Remote monitoring of processes

Safe Haskell | Safe-Inferred

System.Remote.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

- data Counter
- inc :: Counter -> IO ()
- add :: Counter -> Int -> IO ()

# Documentation

data Counter Source

A mutable, integer-valued counter.

inc :: Counter -> IO ()Source

Increase the counter by one.

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

Increase the counter by the given amount.