From 82b16740f8a66093b453a73a04b3b9bd00e5d7a0 Mon Sep 17 00:00:00 2001 From: David Storch Date: Fri, 10 Feb 2017 11:52:18 -0500 Subject: SERVER-19758 add support for "executionStats" and "allPlansExecution" to agg explain Like other explainable commands, aggregate can now be explained using the explain command, e.g. db.runCommand({explain: {aggregate: ...}, verbosity: "executionStats"}). The existing explain:true flag corresponds to "queryPlanner" mode and is still supported. However, explain:true cannot be specified when explaining aggregate via the explain command. Additional execution information is provided only in the $cursor section of the aggregation explain output. Having aggregation stages themselves track and report execution info is further work. --- src/mongo/db/pipeline/document_source_coll_stats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mongo/db/pipeline/document_source_coll_stats.cpp') diff --git a/src/mongo/db/pipeline/document_source_coll_stats.cpp b/src/mongo/db/pipeline/document_source_coll_stats.cpp index 30ebb4916fc..56ebaca69e3 100644 --- a/src/mongo/db/pipeline/document_source_coll_stats.cpp +++ b/src/mongo/db/pipeline/document_source_coll_stats.cpp @@ -126,7 +126,7 @@ bool DocumentSourceCollStats::isValidInitialSource() const { return true; } -Value DocumentSourceCollStats::serialize(bool explain) const { +Value DocumentSourceCollStats::serialize(boost::optional explain) const { return Value(Document{{getSourceName(), _collStatsSpec}}); } -- cgit v1.2.1