Lines Matching full:counter

14  * @brief Prometheus counter APIs.
26 * @brief Type used to represent a Prometheus counter metric.
29 * * See https://prometheus.io/docs/concepts/metric_types/#counter
32 /** Base of the Prometheus counter metric */
34 /** Value of the Prometheus counter metric */
41 * @brief Prometheus Counter definition.
43 * This macro defines a Counter metric. If you want to make the counter static,
46 * @param _name The counter metric name
47 * @param _desc Counter description
55 * PROMETHEUS_COUNTER_DEFINE(http_request_counter, "HTTP request counter",
76 * @brief Increment the value of a Prometheus counter metric
77 * Increments the value of the specified counter metric by arbitrary amount.
78 * @param counter Pointer to the counter metric to increment.
79 * @param value Amount to increment the counter by.
82 int prometheus_counter_add(struct prometheus_counter *counter, uint64_t value);
85 * @brief Increment the value of a Prometheus counter metric
86 * Increments the value of the specified counter metric by one.
87 * @param counter Pointer to the counter metric to increment.
90 static inline int prometheus_counter_inc(struct prometheus_counter *counter) in prometheus_counter_inc() argument
92 return prometheus_counter_add(counter, 1ULL); in prometheus_counter_inc()
96 * @brief Set the counter value to specific value.
98 * if we cannot add individual increments to the counter but need to periodically
99 * update the counter value. This function will add the difference between the
100 * new value and the old value to the counter.
101 * @param counter Pointer to the counter metric to increment.
102 * @param value New value of the counter.
105 int prometheus_counter_set(struct prometheus_counter *counter, uint64_t value);