#include <Status.hpp>
Public Member Functions | |
StatusTracker (const std::shared_ptr< prometheus::Registry > ®, const std::string &name, uint64_t metricID=0) | |
void | incrementActive () |
void | decrementActive () |
void | incrementSuccess () |
void | incrementFail () |
Private Attributes | |
prometheus::Gauge * | _activeCtr |
Active number of events. | |
prometheus::Counter * | _totalCtr |
Total number of counters. | |
prometheus::Counter * | _successCtr |
Number of success. | |
prometheus::Counter * | _failedCtr |
Number of fail. | |
Class for tracking the status of events and counting successes and failures.
Definition at line 9 of file Status.hpp.
StatusTracker::StatusTracker | ( | const std::shared_ptr< prometheus::Registry > & | reg, |
const std::string & | name, | ||
uint64_t | metricID = 0 ) |
Construct a new Status Tracker
[in] | reg | Registry to prometheus |
[in] | name | Name of the metric |
[in] | metricID | ID to append to metric names |
Definition at line 6 of file Status.cpp.
void StatusTracker::decrementActive | ( | ) |
Decrement number of current events
Definition at line 34 of file Status.cpp.
void StatusTracker::incrementActive | ( | ) |
Increment number of current events
Definition at line 32 of file Status.cpp.
void StatusTracker::incrementFail | ( | ) |
Increment number of fail
Definition at line 46 of file Status.cpp.
void StatusTracker::incrementSuccess | ( | ) |
Increment number of success
Definition at line 36 of file Status.cpp.
|
private |
Active number of events.
Definition at line 11 of file Status.hpp.
|
private |
Number of fail.
Definition at line 14 of file Status.hpp.
|
private |
Number of success.
Definition at line 13 of file Status.hpp.
|
private |
Total number of counters.
Definition at line 12 of file Status.hpp.