diff options
author | samontea <merciers.merciers@gmail.com> | 2019-06-07 16:11:25 -0400 |
---|---|---|
committer | samontea <merciers.merciers@gmail.com> | 2019-07-10 16:29:06 -0400 |
commit | a4ef14ef41f0700ef07e5b57b0345d2396a44604 (patch) | |
tree | 9fe5a652acecb2b98cb09240b3fc90e47eb66452 /src/mongo/db/catalog/collection_info_cache.h | |
parent | 6bba6446e632b557ccc03834d4d48e90336679fc (diff) | |
download | mongo-a4ef14ef41f0700ef07e5b57b0345d2396a44604.tar.gz |
SERVER-40755 Expose statistics which indicate how many collection scans have executed
Diffstat (limited to 'src/mongo/db/catalog/collection_info_cache.h')
-rw-r--r-- | src/mongo/db/catalog/collection_info_cache.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mongo/db/catalog/collection_info_cache.h b/src/mongo/db/catalog/collection_info_cache.h index 254df201721..8ae84fb3eec 100644 --- a/src/mongo/db/catalog/collection_info_cache.h +++ b/src/mongo/db/catalog/collection_info_cache.h @@ -31,6 +31,7 @@ #include "mongo/db/collection_index_usage_tracker.h" #include "mongo/db/query/plan_cache.h" +#include "mongo/db/query/plan_summary_stats.h" #include "mongo/db/query/query_settings.h" #include "mongo/db/update_index_data.h" @@ -77,6 +78,12 @@ public: virtual CollectionIndexUsageMap getIndexUsageStats() const = 0; /** + * Returns a struct containing information on the number of collection scans that have been + * performed. + */ + virtual CollectionIndexUsageTracker::CollectionScanStats getCollectionScanStats() const = 0; + + /** * Register a newly-created index with the cache. Must be called whenever an index is * built on the associated collection. * @@ -99,10 +106,12 @@ public: /** * Signal to the cache that a query operation has completed. 'indexesUsed' should list the - * set of indexes used by the winning plan, if any. + * set of indexes used by the winning plan, if any. 'summaryStats.collectionScans' and + * 'summaryStats.collectionScansNonTailable' should be the number of collections scans and + * non-tailable collection scans that occured while executing the winning plan. */ virtual void notifyOfQuery(OperationContext* const opCtx, - const std::set<std::string>& indexesUsed) = 0; + const PlanSummaryStats& summaryStats) = 0; virtual void setNs(NamespaceString ns) = 0; }; |