ekg-core-0.1.0.4: Tracking of system metrics

Safe HaskellNone
LanguageHaskell2010

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

new :: IO Gauge Source

Create a new, zero initialized, gauge.

read :: Gauge -> IO Int64 Source

Get the current value of the 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.