aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-12-15 16:44:42 +0100
committerGitHub <noreply@github.com>2020-12-15 16:44:42 +0100
commit0dd69b57d88cf06ffb832ea735ae5773df437792 (patch)
tree49663fee80d21b8523fbc6544d655b884fd783eb /searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
parentcdf1de8b05183932fd6f49c26ac1a71e68bc9e2b (diff)
parentdda9a7c020ae24e18b6f7701477b95541cbca109 (diff)
Merge pull request #15819 from vespa-engine/balder/make-the-guard-visible-in-code
- Wire in the guard to make it evident that we have it when making ch…
Diffstat (limited to 'searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
index e48a112db93..8b923c7a372 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
@@ -169,12 +169,12 @@ updateAttributeMetrics(DocumentDBTaggedMetrics &metrics, const DocumentSubDBColl
}
void
-updateMatchingMetrics(DocumentDBTaggedMetrics &metrics, const IDocumentSubDB &ready)
+updateMatchingMetrics(const metrics::MetricLockGuard & guard, DocumentDBTaggedMetrics &metrics, const IDocumentSubDB &ready)
{
MatchingStats totalStats;
for (const auto &rankProfile : metrics.matching.rank_profiles) {
MatchingStats matchingStats = ready.getMatcherStats(rankProfile.first);
- rankProfile.second->update(matchingStats);
+ rankProfile.second->update(guard, matchingStats);
totalStats.add(matchingStats);
}
@@ -283,13 +283,13 @@ updateLidSpaceMetrics(MetricSetType &metrics, const search::IDocumentMetaStore &
}
void
-DocumentDBMetricsUpdater::updateMetrics(DocumentDBTaggedMetrics &metrics)
+DocumentDBMetricsUpdater::updateMetrics(const metrics::MetricLockGuard & guard, DocumentDBTaggedMetrics &metrics)
{
TotalStats totalStats;
ExecutorThreadingServiceStats threadingServiceStats = _writeService.getStats();
updateIndexMetrics(metrics, _subDBs.getReadySubDB()->getSearchableStats(), totalStats);
updateAttributeMetrics(metrics, _subDBs, totalStats);
- updateMatchingMetrics(metrics, *_subDBs.getReadySubDB());
+ updateMatchingMetrics(guard, metrics, *_subDBs.getReadySubDB());
updateSessionCacheMetrics(metrics, _sessionManager);
updateDocumentsMetrics(metrics, _subDBs);
updateDocumentStoreMetrics(metrics, _subDBs, _lastDocStoreCacheStats, totalStats);