summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source.cpp
diff options
context:
space:
mode:
authorBikash Chandra <bikash.chandra@mongodb.com>2021-08-26 18:51:06 +0530
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-04 03:49:07 +0000
commite201049a0ddd15704c348863e75d7f1473ae0beb (patch)
treef3d3ec16250b9cdb2d629f50bbdf1fd6d2aeeec0 /src/mongo/db/pipeline/document_source.cpp
parent4a5690123c82851503acac889d1c8e7537522972 (diff)
downloadmongo-e201049a0ddd15704c348863e75d7f1473ae0beb.tar.gz
SERVER-53771 Facet summary stats added
Diffstat (limited to 'src/mongo/db/pipeline/document_source.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/document_source.cpp b/src/mongo/db/pipeline/document_source.cpp
index b4cf3a59362..f86e99022da 100644
--- a/src/mongo/db/pipeline/document_source.cpp
+++ b/src/mongo/db/pipeline/document_source.cpp
@@ -74,6 +74,15 @@ struct ParserRegistration {
static StringMap<ParserRegistration> parserMap;
} // namespace
+void accumulatePipelinePlanSummaryStats(const Pipeline& pipeline,
+ PlanSummaryStats& planSummaryStats) {
+ for (auto&& source : pipeline.getSources()) {
+ if (auto specificStats = source->getSpecificStats()) {
+ specificStats->accumulate(planSummaryStats);
+ }
+ }
+}
+
void DocumentSource::registerParser(
string name,
Parser parser,