diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-08-28 15:14:39 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-08-28 15:14:39 +0000 |
commit | 3a5aa92006f876f5faf57bb0859b159ca841d60b (patch) | |
tree | 240463b7c1bef60dbc47a765277e07bae8008176 /metrics | |
parent | e642d978d6ec001209cd0d9e4c70743e797f0c16 (diff) |
Remove incorrect _doneInitialized check.
Diffstat (limited to 'metrics')
-rw-r--r-- | metrics/src/vespa/metrics/metricmanager.cpp | 2 | ||||
-rw-r--r-- | metrics/src/vespa/metrics/metricsnapshot.h | 4 | ||||
-rw-r--r-- | metrics/src/vespa/metrics/textwriter.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/metrics/src/vespa/metrics/metricmanager.cpp b/metrics/src/vespa/metrics/metricmanager.cpp index 2f6fe4c6ba6..2f04096e86a 100644 --- a/metrics/src/vespa/metrics/metricmanager.cpp +++ b/metrics/src/vespa/metrics/metricmanager.cpp @@ -486,7 +486,7 @@ MetricManager::configure(const MetricLockGuard & , std::unique_ptr<Config> confi _totalMetrics = std::make_shared<MetricSnapshot>("All time snapshot", 0s, _activeMetrics.getMetrics(), _snapshotUnsetMetrics); _totalMetrics->reset(currentTime); } - if (_config.get() == 0 || (_config->consumer.size() != config->consumer.size())) { + if ( !_config || (_config->consumer.size() != config->consumer.size())) { _consumerConfigChanged = true; } else { for (uint32_t i=0; i<_config->consumer.size(); ++i) { diff --git a/metrics/src/vespa/metrics/metricsnapshot.h b/metrics/src/vespa/metrics/metricsnapshot.h index ae0fd92d187..e2cedf018c9 100644 --- a/metrics/src/vespa/metrics/metricsnapshot.h +++ b/metrics/src/vespa/metrics/metricsnapshot.h @@ -71,8 +71,8 @@ public: }; class MetricSnapshotSet { - uint32_t _count; // Number of times we need to add to building period - // before we have a full time window. + const uint32_t _count; // Number of times we need to add to building period + // before we have a full time window. uint32_t _builderCount; // Number of times we've currently added to the // building instance. std::unique_ptr<MetricSnapshot> _current; // The last full period diff --git a/metrics/src/vespa/metrics/textwriter.h b/metrics/src/vespa/metrics/textwriter.h index f23d1cf585c..7feffdf22fc 100644 --- a/metrics/src/vespa/metrics/textwriter.h +++ b/metrics/src/vespa/metrics/textwriter.h @@ -19,7 +19,7 @@ class TextWriter : public MetricVisitor { public: TextWriter(std::ostream& out, vespalib::duration period, const std::string& regex, bool verbose); - ~TextWriter(); + ~TextWriter() override; bool visitSnapshot(const MetricSnapshot&) override; void doneVisitingSnapshot(const MetricSnapshot&) override; |