ekg-0.4.0.15: Remote monitoring of processes

Safe Haskell | Safe
Language | Haskell98

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.

N.B. This module exists to maintain backwards compatibility with older versions of this library. New code should use the `System.Metrics.Gauge` module from the ekg-core package instead.

Synopsis

- data Gauge
- inc :: Gauge -> IO ()
- dec :: Gauge -> IO ()
- add :: Gauge -> Int64 -> IO ()
- subtract :: Gauge -> Int64 -> IO ()
- set :: Gauge -> Int64 -> IO ()

# Documentation

data Gauge Source #

A mutable, integer-valued gauge.

inc :: Gauge -> IO () Source #

Increase the gauge by one.

dec :: Gauge -> IO () Source #

Decrease the gauge by one.

add :: Gauge -> Int64 -> IO () Source #

Increase the gauge by the given amount.

subtract :: Gauge -> Int64 -> IO () Source #

Decrease the gauge by the given amount.

set :: Gauge -> Int64 -> IO () Source #

Set the gauge to the given value.