summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/run_aggregate.cpp
diff options
context:
space:
mode:
authorMaddie Zechar <mez2113@columbia.edu>2023-01-13 15:46:50 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-01-13 17:42:35 +0000
commit4a97c2be5fb3dd35290f9924bbd662212b00737b (patch)
tree6be85eedc2c1d8c8001f73d46885e7a6dbf11988 /src/mongo/db/commands/run_aggregate.cpp
parentd4c7b6f75bbf52ea6a4e6e0c6a850b4207f6556c (diff)
downloadmongo-4a97c2be5fb3dd35290f9924bbd662212b00737b.tar.gz
SERVER-71143: rewrite planning time metric to be maintained/stored by CurOp/OpDebug
Diffstat (limited to 'src/mongo/db/commands/run_aggregate.cpp')
-rw-r--r--src/mongo/db/commands/run_aggregate.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp
index 6118665ef31..1a8ede92757 100644
--- a/src/mongo/db/commands/run_aggregate.cpp
+++ b/src/mongo/db/commands/run_aggregate.cpp
@@ -630,12 +630,9 @@ std::vector<std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>> createLegacyEx
// There are separate ExpressionContexts for each exchange pipeline, so make sure to
// pass the pipeline's ExpressionContext to the plan executor factory.
auto pipelineExpCtx = pipelineIt->getContext();
- auto planningTimeElapsed = pipelineExpCtx->opCtx->getElapsedQueryPlanningTime();
execs.emplace_back(
plan_executor_factory::make(std::move(pipelineExpCtx),
std::move(pipelineIt),
- planningTimeElapsed, /* metric stored in PlanExplainer
- via PlanExecutor construction*/
aggregation_request_helper::getResumableScanType(
request, liteParsedPipeline.hasChangeStream())));
}
@@ -949,7 +946,7 @@ Status runAggregate(OperationContext* opCtx,
expCtx->startExpressionCounters();
auto pipeline = Pipeline::parse(request.getPipeline(), expCtx);
- opCtx->beginPlanningTimer();
+ curOp->beginQueryPlanningTimer();
expCtx->stopExpressionCounters();
if (!request.getAllowDiskUse().value_or(true)) {