diff options
author | David Storch <david.storch@10gen.com> | 2017-02-10 11:52:18 -0500 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2017-03-13 09:46:14 -0400 |
commit | 82b16740f8a66093b453a73a04b3b9bd00e5d7a0 (patch) | |
tree | 62d156fc9676526ecbea19cd03ef7a293579c4df /src/mongo/db/query/explain_common.h | |
parent | 73f9e8b8a8422becf8694fe3d82c0e647dc71189 (diff) | |
download | mongo-82b16740f8a66093b453a73a04b3b9bd00e5d7a0.tar.gz |
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.
Diffstat (limited to 'src/mongo/db/query/explain_common.h')
-rw-r--r-- | src/mongo/db/query/explain_common.h | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/src/mongo/db/query/explain_common.h b/src/mongo/db/query/explain_common.h deleted file mode 100644 index 750f207a2a5..00000000000 --- a/src/mongo/db/query/explain_common.h +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (C) 2013-2014 MongoDB Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * As a special exception, the copyright holders give permission to link the - * code of portions of this program with the OpenSSL library under certain - * conditions as described in each individual source file and distribute - * linked combinations including the program with the OpenSSL library. You - * must comply with the GNU Affero General Public License in all respects for - * all of the code used other than as permitted herein. If you modify file(s) - * with this exception, you may extend this exception to your version of the - * file(s), but you are not obligated to do so. If you do not wish to do so, - * delete this exception statement from your version. If you delete this - * exception statement from all source files in the program, then also delete - * it in the license file. - */ - -#pragma once - -#include "mongo/base/status.h" -#include "mongo/bson/bsonobj.h" - -namespace mongo { - -/** - * Utilities used for explain implementations on both mongod and mongos. - */ -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, - - // At this 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, - }; - - /** - * 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 |