]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/third_party/prometheus-cpp/core/src/counter.cc
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / third_party / prometheus-cpp / core / src / counter.cc
CommitLineData
1e59de90
TL
1#include "prometheus/counter.h"
2
3namespace prometheus {
4
5void Counter::Increment() { gauge_.Increment(); }
6
7void Counter::Increment(const double val) {
8 if (val < 0.0) {
9 return;
10 }
11 gauge_.Increment(val);
12}
13
14double Counter::Value() const { return gauge_.Value(); }
15
16ClientMetric Counter::Collect() const {
17 ClientMetric metric;
18 metric.counter.value = Value();
19 return metric;
20}
21
22} // namespace prometheus