aboutsummaryrefslogtreecommitdiffstats
path: root/metrics
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-02-23 11:19:30 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-02-23 11:19:30 +0000
commit31006e5945dd26d28d0157829862f61c405435ca (patch)
tree39dfe6a95b4489c1d61f0fad2023d2cb2ebf2de7 /metrics
parent9190653f24b07563ca70d1fb0263b8f3e9c8440f (diff)
Add metirc for buckets pending move.
Diffstat (limited to 'metrics')
-rw-r--r--metrics/src/vespa/metrics/countmetric.h6
-rw-r--r--metrics/src/vespa/metrics/countmetric.hpp8
2 files changed, 9 insertions, 5 deletions
diff --git a/metrics/src/vespa/metrics/countmetric.h b/metrics/src/vespa/metrics/countmetric.h
index de34e9330e6..02a6827d1ce 100644
--- a/metrics/src/vespa/metrics/countmetric.h
+++ b/metrics/src/vespa/metrics/countmetric.h
@@ -54,11 +54,9 @@ public:
CountMetric(const CountMetric<T, SumOnAdd>& other, CopyType, MetricSet* owner);
- ~CountMetric();
+ ~CountMetric() override;
- MetricValueClass::UP getValues() const override {
- return MetricValueClass::UP(new Values(_values.getValues()));
- }
+ MetricValueClass::UP getValues() const override;
void set(T value);
void inc(T value = 1);
diff --git a/metrics/src/vespa/metrics/countmetric.hpp b/metrics/src/vespa/metrics/countmetric.hpp
index 8b5c226a5f5..dfdc2586a05 100644
--- a/metrics/src/vespa/metrics/countmetric.hpp
+++ b/metrics/src/vespa/metrics/countmetric.hpp
@@ -23,7 +23,13 @@ CountMetric<T, SumOnAdd>::CountMetric(const CountMetric<T, SumOnAdd>& other,
}
template <typename T, bool SumOnAdd>
-CountMetric<T, SumOnAdd>::~CountMetric() { }
+CountMetric<T, SumOnAdd>::~CountMetric() = default;
+
+template <typename T, bool SumOnAdd>
+MetricValueClass::UP
+CountMetric<T, SumOnAdd>::getValues() const {
+ return std::make_unique<Values>(_values.getValues());
+}
template <typename T, bool SumOnAdd>
CountMetric<T, SumOnAdd>&