diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-02-28 16:21:45 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-02-28 16:24:38 +0000 |
commit | 2649d128ab777c58ba61a2d9d1c47b12b4500f41 (patch) | |
tree | 58d822ea6f1b9a73e64479d008ba67efb3b20525 /metrics/src/tests/summetrictest.cpp | |
parent | e909dc9c82155489187ca189f5ecb5f99e53325b (diff) |
- Enforce using the correct clock for metrics snapshot.
- Print human readable time in error messages.
- Human readable time in text/plain too.
Diffstat (limited to 'metrics/src/tests/summetrictest.cpp')
-rw-r--r-- | metrics/src/tests/summetrictest.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/metrics/src/tests/summetrictest.cpp b/metrics/src/tests/summetrictest.cpp index 09495ff038d..8e988b65b96 100644 --- a/metrics/src/tests/summetrictest.cpp +++ b/metrics/src/tests/summetrictest.cpp @@ -104,8 +104,7 @@ TEST(SumMetricTest, test_remove) TEST(SumMetricTest, test_start_value) { MetricSnapshot snapshot("active"); - SumMetric<LongValueMetric> sum("foo", {}, "foodesc", - &snapshot.getMetrics()); + SumMetric<LongValueMetric> sum("foo", {}, "foodesc", &snapshot.getMetrics()); LongValueMetric start("start", {}, "", 0); start.set(50); sum.setStartValue(start); @@ -115,7 +114,7 @@ TEST(SumMetricTest, test_start_value) MetricSnapshot copy("copy"); copy.recreateSnapshot(snapshot.getMetrics(), true); - snapshot.addToSnapshot(copy, 100); + snapshot.addToSnapshot(copy, system_time(100s)); LongValueMetric value("value", {}, "", &snapshot.getMetrics()); sum.addMetricToSum(value); |