summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/run_aggregate.cpp
diff options
context:
space:
mode:
authorWill Buerger <will.buerger@mongodb.com>2023-03-27 13:12:24 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-03-27 15:03:04 +0000
commitc9e3390833b8a560a0291e3e9587faa164256f0b (patch)
tree5c88ba5911b0b2e2c5dc60592903bd2814a48053 /src/mongo/db/commands/run_aggregate.cpp
parentc9ddb90ef8e0b6cdac2b13fbd58d34b5d312b132 (diff)
downloadmongo-c9e3390833b8a560a0291e3e9587faa164256f0b.tar.gz
SERVER-73933: Consolidate telemetry metrics from clientcursor into OpDebug::AdditiveMetrics
Diffstat (limited to 'src/mongo/db/commands/run_aggregate.cpp')
-rw-r--r--src/mongo/db/commands/run_aggregate.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp
index f837ba98523..88efa301556 100644
--- a/src/mongo/db/commands/run_aggregate.cpp
+++ b/src/mongo/db/commands/run_aggregate.cpp
@@ -1182,12 +1182,11 @@ Status runAggregate(OperationContext* opCtx,
PlanSummaryStats stats;
planExplainer.getSummaryStats(&stats);
curOp->debug().setPlanSummaryMetrics(stats);
- curOp->debug().nreturned = stats.nReturned;
if (keepCursor) {
- collectTelemetryMongod(opCtx, pins[0]);
+ collectTelemetryMongod(opCtx, pins[0], stats.nReturned);
} else {
- collectTelemetryMongod(opCtx, cmdObj);
+ collectTelemetryMongod(opCtx, cmdObj, stats.nReturned);
}
// For an optimized away pipeline, signal the cache that a query operation has completed.