summaryrefslogtreecommitdiffstats
path: root/metrics
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-08-14 17:43:41 +0000
committerHenning Baldersheim <balder@oath.com>2018-08-15 08:41:33 +0200
commit451216956ce459f517f0712edf27958d693b7483 (patch)
tree9fec2fb7cd054d8fa7141f3f950fc9e120723267 /metrics
parentd705c3503c9ecbc252dd59d52e425db1d39b1f0e (diff)
Avoid gcc 8 var-tracking-size-limit exceed warning
Diffstat (limited to 'metrics')
-rw-r--r--metrics/src/tests/snapshottest.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/metrics/src/tests/snapshottest.cpp b/metrics/src/tests/snapshottest.cpp
index ab624bb5731..816b3456c7e 100644
--- a/metrics/src/tests/snapshottest.cpp
+++ b/metrics/src/tests/snapshottest.cpp
@@ -68,7 +68,7 @@ SubSubMetricSet::SubSubMetricSet(vespalib::stringref name, const LoadTypeSet& lo
averageSum.addMetricToSum(average1);
averageSum.addMetricToSum(average2);
}
-SubSubMetricSet::~SubSubMetricSet() { }
+SubSubMetricSet::~SubSubMetricSet() = default;
MetricSet*
SubSubMetricSet::clone(std::vector<Metric::UP> &ownerList,
@@ -130,7 +130,7 @@ SubMetricSet::SubMetricSet(vespalib::stringref name, const LoadTypeSet& loadType
setSum.addMetricToSum(set1);
setSum.addMetricToSum(set2);
}
-SubMetricSet::~SubMetricSet() { }
+SubMetricSet::~SubMetricSet() = default;
MetricSet*
SubMetricSet::clone(std::vector<Metric::UP> &ownerList, CopyType copyType,
@@ -177,7 +177,7 @@ TestMetricSet::TestMetricSet(vespalib::stringref name, const LoadTypeSet& loadTy
setSum.addMetricToSum(set1);
setSum.addMetricToSum(set2);
}
-TestMetricSet::~TestMetricSet() { }
+TestMetricSet::~TestMetricSet() = default;
void
TestMetricSet::incValues() {
@@ -196,15 +196,13 @@ struct FakeTimer : public MetricManager::Timer {
} // End of anonymous namespace
-#define ASSERT_VALUE(value, snapshot, name) \
-{ \
- const Metric* _metricValue_((snapshot).getMetrics().getMetric(name)); \
- if (_metricValue_ == 0) { \
- CPPUNIT_FAIL("Metric value '" + std::string(name) \
- + "' not found in snapshot"); \
- } \
- CPPUNIT_ASSERT_EQUAL(value, \
- int32_t(_metricValue_->getLongValue("value"))); \
+void ASSERT_VALUE(int32_t value, const MetricSnapshot & snapshot, const char *name)
+{
+ const Metric* _metricValue_((snapshot).getMetrics().getMetric(name));
+ if (_metricValue_ == 0) {
+ CPPUNIT_FAIL("Metric value '" + std::string(name) + "' not found in snapshot");
+ }
+ CPPUNIT_ASSERT_EQUAL(value, int32_t(_metricValue_->getLongValue("value")));
}
void SnapshotTest::testSnapshotTwoDays()