|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Fixed-bin histogram exported as a Prometheus histogram: numBins upper bounds binMin + i * binWidth plus an overflow bucket. More...
#include <MetricExporter.hh>
Public Types | |
| using | BucketBoundaries = std::vector< double > |
| Upper bounds of the buckets. | |
Public Member Functions | |
| PromHistogram (unsigned numBins, double binWidth, double binMin) | |
| Set numBins upper bounds starting at binMin with spacing binWidth, and numBins + 1 zeroed counts (the last is the overflow bucket). | |
| void | observe (double value) |
| Count value in the first bucket whose upper bound is at least value (the overflow bucket if none) and add it to the sum. | |
| void | collect (prometheus::MetricFamily &family) |
| Fill the histogram buckets (cumulative counts, upper bounds with infinity for the last), sample count and sum of the first metric in family. | |
| void | clear () |
| Zero all counts and the sum. | |
| uint64_t | counts (unsigned idx) const |
| Return the count of bucket idx. | |
| void | dump () const |
| Print the count of every bucket to stdout. | |
Fixed-bin histogram exported as a Prometheus histogram: numBins upper bounds binMin + i * binWidth plus an overflow bucket.
| using Pds::PromHistogram::BucketBoundaries = std::vector<double> |
Upper bounds of the buckets.
| Pds::PromHistogram::PromHistogram | ( | unsigned | numBins, |
| double | binWidth, | ||
| double | binMin | ||
| ) |
Set numBins upper bounds starting at binMin with spacing binWidth, and numBins + 1 zeroed counts (the last is the overflow bucket).
| void Pds::PromHistogram::clear | ( | ) |
Zero all counts and the sum.
| void Pds::PromHistogram::collect | ( | prometheus::MetricFamily & | family | ) |
Fill the histogram buckets (cumulative counts, upper bounds with infinity for the last), sample count and sum of the first metric in family.
|
inline |
Return the count of bucket idx.
| void Pds::PromHistogram::dump | ( | ) | const |
Print the count of every bucket to stdout.
| void Pds::PromHistogram::observe | ( | double | value | ) |
Count value in the first bucket whose upper bound is at least value (the overflow bucket if none) and add it to the sum.