summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/map_reduce_agg.cpp
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@mongodb.com>2019-11-21 20:51:49 +0000
committerevergreen <evergreen@mongodb.com>2019-11-21 20:51:49 +0000
commitfe788b0989dd6cbaa1c4ea95e01f1967bb94fdf7 (patch)
treef059529b68ffee2463d2881204323be60fca6f7d /src/mongo/db/commands/map_reduce_agg.cpp
parent457cf7bc256105cd227fa4d362c36df7a6969de8 (diff)
downloadmongo-fe788b0989dd6cbaa1c4ea95e01f1967bb94fdf7.tar.gz
SERVER-44635 MR in Agg: Remove in-line mapReduce execution statistics
Diffstat (limited to 'src/mongo/db/commands/map_reduce_agg.cpp')
-rw-r--r--src/mongo/db/commands/map_reduce_agg.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/mongo/db/commands/map_reduce_agg.cpp b/src/mongo/db/commands/map_reduce_agg.cpp
index fe066c6da0c..f4c61322c03 100644
--- a/src/mongo/db/commands/map_reduce_agg.cpp
+++ b/src/mongo/db/commands/map_reduce_agg.cpp
@@ -41,7 +41,6 @@
#include "mongo/db/commands.h"
#include "mongo/db/commands/map_reduce_agg.h"
#include "mongo/db/commands/map_reduce_javascript_code.h"
-#include "mongo/db/commands/map_reduce_stats.h"
#include "mongo/db/commands/mr_common.h"
#include "mongo/db/curop.h"
#include "mongo/db/db_raii.h"
@@ -97,16 +96,6 @@ auto makeExpressionContext(OperationContext* opCtx, const MapReduce& parsedMr) {
return expCtx;
}
-std::vector<CommonStats> extractStats(const Pipeline& pipeline) {
- std::vector<CommonStats> pipelineStats;
-
- for (const auto& stage : pipeline.getSources()) {
- pipelineStats.push_back(stage->getCommonStats());
- }
-
- return pipelineStats;
-}
-
} // namespace
bool runAggregationMapReduce(OperationContext* opCtx,
@@ -146,14 +135,8 @@ bool runAggregationMapReduce(OperationContext* opCtx,
CurOp::get(opCtx)->debug().setPlanSummaryMetrics(planSummaryStats);
- MapReduceStats mapReduceStats(extractStats(*runnablePipeline),
- MapReduceStats::ResponseType::kUnsharded,
- boost::get_optional_value_or(parsedMr.getVerbose(), false),
- cmdTimer.millis());
-
if (parsedMr.getOutOptions().getOutputType() == OutputType::InMemory) {
- map_reduce_output_format::appendInlineResponse(
- std::move(resultArray), mapReduceStats, &result);
+ map_reduce_output_format::appendInlineResponse(std::move(resultArray), &result);
} else {
// For output to collection, pipeline execution should not return any results.
invariant(resultArray.isEmpty());
@@ -161,7 +144,6 @@ bool runAggregationMapReduce(OperationContext* opCtx,
map_reduce_output_format::appendOutResponse(
parsedMr.getOutOptions().getDatabaseName(),
parsedMr.getOutOptions().getCollectionName(),
- mapReduceStats,
&result);
}