summaryrefslogtreecommitdiff
path: root/src/mongo/db/collection_index_usage_tracker.cpp
diff options
context:
space:
mode:
authorDaniel Morilha <daniel.morilha@mongodb.com>2022-06-30 13:16:45 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-30 14:11:31 +0000
commitfae8410364c1f02ee62e77076ef60b8ee418368f (patch)
tree9909ee46de6ef7822236a468bfff95a6e61385dd /src/mongo/db/collection_index_usage_tracker.cpp
parent50a8545e444e8bfc7e3892a1319515302b568739 (diff)
downloadmongo-fae8410364c1f02ee62e77076ef60b8ee418368f.tar.gz
SERVER-65987 ServerStatusMetric API refresh
Diffstat (limited to 'src/mongo/db/collection_index_usage_tracker.cpp')
-rw-r--r--src/mongo/db/collection_index_usage_tracker.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/mongo/db/collection_index_usage_tracker.cpp b/src/mongo/db/collection_index_usage_tracker.cpp
index a02f04cd89d..f0fc7873732 100644
--- a/src/mongo/db/collection_index_usage_tracker.cpp
+++ b/src/mongo/db/collection_index_usage_tracker.cpp
@@ -28,13 +28,10 @@
*/
-#include "mongo/platform/basic.h"
-
#include "mongo/db/collection_index_usage_tracker.h"
#include <atomic>
-#include "mongo/base/counter.h"
#include "mongo/db/commands/server_status_metric.h"
#include "mongo/db/index/index_descriptor.h"
#include "mongo/util/assert_util.h"
@@ -45,14 +42,8 @@
namespace mongo {
namespace {
-Counter64 collectionScansCounter;
-Counter64 collectionScansNonTailableCounter;
-
-ServerStatusMetricField<Counter64> displayCollectionScans("queryExecutor.collectionScans.total",
- &collectionScansCounter);
-ServerStatusMetricField<Counter64> displayCollectionScansNonTailable(
- "queryExecutor.collectionScans.nonTailable", &collectionScansNonTailableCounter);
-
+CounterMetric collectionScansCounter("queryExecutor.collectionScans.total");
+CounterMetric collectionScansNonTailableCounter("queryExecutor.collectionScans.nonTailable");
} // namespace
CollectionIndexUsageTracker::CollectionIndexUsageTracker(