Struct Stats
Base stats class that helps define other stats classes.class
Usage is Stats!(ConcreateStatsValue, ConcreateStatsLabel) concreate_stats;
struct Stats(ValueType, LabelType)
;
Fields
Name | Type | Description |
SEPARATOR
|
void | Separator used by Prometheus
|
stats_maps
|
ValueType[string] | Contains the stats
|
Methods
Name | Description |
clear
()
|
Clears stats
|
getStats
()
|
Function that prepares and returns the metrics with the corresponding
labels
|
increaseMetricBy
(amount, labels_packed)
|
Increases the metric's value by some amount and attach some labels to it
|
setMetricTo
(amount, labels_packed)
|
Sets the metric's value to some amount and attach some labels to it
|
Parameters
Name | Description |
ValueType | fields of this struct will correspond to metric names |
LabelType | fields of this struct will correspond to label names |