summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/explain_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/explain_common.h')
-rw-r--r--src/mongo/db/query/explain_common.h69
1 files changed, 34 insertions, 35 deletions
diff --git a/src/mongo/db/query/explain_common.h b/src/mongo/db/query/explain_common.h
index 05bd975295f..f76c6d348cf 100644
--- a/src/mongo/db/query/explain_common.h
+++ b/src/mongo/db/query/explain_common.h
@@ -33,45 +33,44 @@
namespace mongo {
+/**
+ * Utilities used for explain implementations on both mongod and mongos.
+ */
+class ExplainCommon {
+public:
/**
- * Utilities used for explain implementations on both mongod and mongos.
+ * The various supported verbosity levels for explain. The order is
+ * significant: the enum values are assigned in order of increasing verbosity.
*/
- class ExplainCommon {
- public:
- /**
- * The various supported verbosity levels for explain. The order is
- * significant: the enum values are assigned in order of increasing verbosity.
- */
- enum Verbosity {
- // At all verbosities greater than or equal to QUERY_PLANNER, we display information
- // about the plan selected and alternate rejected plans. Does not include any execution-
- // related info. String alias is "queryPlanner".
- QUERY_PLANNER = 0,
-
- // At all verbosities greater than or equal to EXEC_STATS, we display a section of
- // output containing both overall execution stats, and stats per stage in the
- // execution tree. String alias is "execStats".
- EXEC_STATS = 1,
+ enum Verbosity {
+ // At all verbosities greater than or equal to QUERY_PLANNER, we display information
+ // about the plan selected and alternate rejected plans. Does not include any execution-
+ // related info. String alias is "queryPlanner".
+ QUERY_PLANNER = 0,
- // At this second-highest verbosity level, we generate the execution stats for each
- // rejected plan as well as the winning plan. String alias is "allPlansExecution".
- EXEC_ALL_PLANS = 2,
- };
+ // At all verbosities greater than or equal to EXEC_STATS, we display a section of
+ // output containing both overall execution stats, and stats per stage in the
+ // execution tree. String alias is "execStats".
+ EXEC_STATS = 1,
- /**
- * Converts an explain verbosity to its string representation.
- */
- static const char* verbosityString(ExplainCommon::Verbosity verbosity);
+ // At this second-highest verbosity level, we generate the execution stats for each
+ // rejected plan as well as the winning plan. String alias is "allPlansExecution".
+ EXEC_ALL_PLANS = 2,
+ };
- /**
- * Does some basic validation of the command BSON, and retrieves the explain verbosity.
- *
- * Returns a non-OK status if parsing fails.
- *
- * On success, populates "verbosity".
- */
- static Status parseCmdBSON(const BSONObj& cmdObj, ExplainCommon::Verbosity* verbosity);
+ /**
+ * Converts an explain verbosity to its string representation.
+ */
+ static const char* verbosityString(ExplainCommon::Verbosity verbosity);
- };
+ /**
+ * Does some basic validation of the command BSON, and retrieves the explain verbosity.
+ *
+ * Returns a non-OK status if parsing fails.
+ *
+ * On success, populates "verbosity".
+ */
+ static Status parseCmdBSON(const BSONObj& cmdObj, ExplainCommon::Verbosity* verbosity);
+};
-} // namespace
+} // namespace