Poco::Prometheus

class GaugeSample

File Information

Library: Prometheus
Package: Core
Header: Poco/Prometheus/Gauge.h

Member Summary

Member Functions: dec, inc, set, setToCurrentTime, timestamp, value

Constructors

GaugeSample

GaugeSample() = default;

Creates the GaugeSample.

Destructor

~GaugeSample

~GaugeSample() = default;

Destroys the GaugeSample.

Member Functions

dec inline

void dec(
    double v = 1.0
);

Decrements the Gauge's current value.

inc inline

void inc(
    double v = 1.0
);

Increments the Gauge's current value.

set inline

void set(
    double v
);

Sets the Gauge's current value.

set

void set(
    Poco::Clock::ClockVal v
);

Sets the Gauge's current value to the given Clock value, converted to seconds.

setToCurrentTime inline

void setToCurrentTime();

Sets the Gauge's current value to the current epoch time (seconds since midnight January 1st 1970).

timestamp inline

Poco::Timestamp timestamp() const;

Returns the sample's timestamp, which in this implementation is always 0.

value inline

double value() const;

Returns the Gauge's current value.