libprom  1.2.0
C based libraries to expose metrics in Promtheus exposition format
Typedefs | Functions
prom_metric_sample_histogram.h File Reference

Functions for interacting with histogram metric samples directly. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct pms_histogram pms_histogram_t
 A histogram metric sample.
 

Functions

int pms_histogram_observe (pms_histogram_t *self, double value)
 Find the bucket for the given value in the given prom sample metric histogram and increment the sample assigned to it by 1. More...
 

Detailed Description

Functions for interacting with histogram metric samples directly.

Function Documentation

◆ pms_histogram_observe()

int pms_histogram_observe ( pms_histogram_t self,
double  value 
)

Find the bucket for the given value in the given prom sample metric histogram and increment the sample assigned to it by 1.

Furthermore update its sum and count sample, if found and appropriate.

Parameters
selfWhere to lockup the bucket and sample.
valueThe value to find.
Returns
Non-zero integer value upon failure, 0 otherwise.