Tor
0.4.7.0-alpha-dev
|
Header for lib/metrics/metrics_store_entry.c. More...
Go to the source code of this file.
Macros | |
#define | metrics_store_entry_free(entry) FREE_AND_NULL(metrics_store_entry_t, metrics_store_entry_free_, (entry)); |
Typedefs | |
typedef struct metrics_store_entry_t | metrics_store_entry_t |
Functions | |
metrics_store_entry_t * | metrics_store_entry_new (const metrics_type_t type, const char *name, const char *help) |
void | metrics_store_entry_free_ (metrics_store_entry_t *entry) |
int64_t | metrics_store_entry_get_value (const metrics_store_entry_t *entry) |
bool | metrics_store_entry_has_label (const metrics_store_entry_t *entry, const char *label) |
void | metrics_store_entry_add_label (metrics_store_entry_t *entry, const char *label) |
void | metrics_store_entry_reset (metrics_store_entry_t *entry) |
void | metrics_store_entry_update (metrics_store_entry_t *entry, const int64_t value) |
Header for lib/metrics/metrics_store_entry.c.
Definition in file metrics_store_entry.h.
void metrics_store_entry_add_label | ( | metrics_store_entry_t * | entry, |
const char * | label | ||
) |
Add a label into the given entry.
Definition at line 111 of file metrics_store_entry.c.
Referenced by fill_global_bw_limit_values(), fill_oom_values(), and fill_socket_values().
void metrics_store_entry_free_ | ( | metrics_store_entry_t * | entry | ) |
Free a store entry.
Definition at line 46 of file metrics_store_entry.c.
int64_t metrics_store_entry_get_value | ( | const metrics_store_entry_t * | entry | ) |
Return store entry value.
Definition at line 90 of file metrics_store_entry.c.
Referenced by prometheus_format_store_entry().
bool metrics_store_entry_has_label | ( | const metrics_store_entry_t * | entry, |
const char * | label | ||
) |
Return true iff the given entry has the given label.
Definition at line 122 of file metrics_store_entry.c.
metrics_store_entry_t* metrics_store_entry_new | ( | const metrics_type_t | type, |
const char * | name, | ||
const char * | help | ||
) |
Return newly allocated store entry of type COUNTER.
Definition at line 27 of file metrics_store_entry.c.
void metrics_store_entry_reset | ( | metrics_store_entry_t * | entry | ) |
Reset a store entry that is set its metric data to 0.
Definition at line 81 of file metrics_store_entry.c.
void metrics_store_entry_update | ( | metrics_store_entry_t * | entry, |
const int64_t | value | ||
) |
Update a store entry with value.
Definition at line 60 of file metrics_store_entry.c.
Referenced by fill_global_bw_limit_values(), fill_oom_values(), fill_socket_values(), and fill_tcp_exhaustion_values().