ekg-0.3.0.3: Remote monitoring of processes

Safe HaskellSafe-Infered

System.Remote.Gauge

Description

This module defines a type for mutable, integer-valued gauges. Gauges are variable values and can be used to track e.g. the current number of concurrent connections. All operations on gauges are thread-safe.

Synopsis

Documentation

data Gauge Source

A mutable, integer-valued gauge.

Instances

Ref Gauge 

inc :: Gauge -> IO ()Source

Increase the gauge by one.

dec :: Gauge -> IO ()Source

Decrease the gauge by one.

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

Increase the gauge by the given amount.

subtract :: Gauge -> Int -> IO ()Source

Decrease the gauge by the given amount.

set :: Gauge -> Int -> IO ()Source

Set the gauge to the given value.

modify :: (Int -> Int) -> Gauge -> IO ()Source

Set the gauge to the result of applying the given function to the value.