summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/plan_explainer_sbe.cpp
diff options
context:
space:
mode:
authorRuoxin Xu <ruoxin.xu@mongodb.com>2022-07-26 13:50:05 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-26 16:34:14 +0000
commitb650ffdb53cd642f43a9105e0478b922e65f08cd (patch)
tree54ba804ec00b15120100166fcd9ef92930c8624b /src/mongo/db/query/plan_explainer_sbe.cpp
parent1dbab74005fb10825d3cd11b796257f0daae1ba7 (diff)
downloadmongo-b650ffdb53cd642f43a9105e0478b922e65f08cd.tar.gz
Revert "SERVER-67101 Support microsecond precision in ScopedTimer"
This reverts commit e7d2be0dae29265e2a6efafd4753debf11b9e96f.
Diffstat (limited to 'src/mongo/db/query/plan_explainer_sbe.cpp')
-rw-r--r--src/mongo/db/query/plan_explainer_sbe.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/mongo/db/query/plan_explainer_sbe.cpp b/src/mongo/db/query/plan_explainer_sbe.cpp
index e14eebb59b4..fea5b81cea4 100644
--- a/src/mongo/db/query/plan_explainer_sbe.cpp
+++ b/src/mongo/db/query/plan_explainer_sbe.cpp
@@ -238,18 +238,9 @@ void statsToBSONHelper(const sbe::PlanStageStats* stats,
// Some top-level exec stats get pulled out of the root stage.
bob->appendNumber("nReturned", static_cast<long long>(stats->common.advances));
- // Include the execution time if it was recorded.
- if (stats->common.executionTime.precision == QueryExecTimerPrecision::kMillis) {
- bob->appendNumber(
- "executionTimeMillisEstimate",
- durationCount<Milliseconds>(stats->common.executionTime.executionTimeEstimate));
- } else if (stats->common.executionTime.precision == QueryExecTimerPrecision::kMicros) {
- bob->appendNumber(
- "executionTimeMillisEstimate",
- durationCount<Milliseconds>(stats->common.executionTime.executionTimeEstimate));
- bob->appendNumber(
- "executionTimeMicros",
- durationCount<Microseconds>(stats->common.executionTime.executionTimeEstimate));
+ // Include executionTimeMillis if it was recorded.
+ if (stats->common.executionTimeMillis) {
+ bob->appendNumber("executionTimeMillisEstimate", *stats->common.executionTimeMillis);
}
bob->appendNumber("opens", static_cast<long long>(stats->common.opens));
bob->appendNumber("closes", static_cast<long long>(stats->common.closes));