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_graph_lookup.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/pipeline/document_source_graph_lookup.h') diff --git a/src/mongo/db/pipeline/document_source_graph_lookup.h b/src/mongo/db/pipeline/document_source_graph_lookup.h index 6e94e98b4af..8c14a2ab8fa 100644 --- a/src/mongo/db/pipeline/document_source_graph_lookup.h +++ b/src/mongo/db/pipeline/document_source_graph_lookup.h @@ -45,7 +45,9 @@ public: const char* getSourceName() const final; void dispose() final; BSONObjSet getOutputSorts() final; - void serializeToArray(std::vector& array, bool explain = false) const final; + void serializeToArray( + std::vector& array, + boost::optional explain = boost::none) const final; /** * Returns the 'as' path, and possibly the fields modified by an absorbed $unwind. @@ -107,7 +109,7 @@ private: boost::optional maxDepth, boost::optional> unwindSrc); - Value serialize(bool explain = false) const final { + Value serialize(boost::optional explain = boost::none) const final { // Should not be called; use serializeToArray instead. MONGO_UNREACHABLE; } -- cgit v1.2.1