summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/multi_plan.cpp
diff options
context:
space:
mode:
authorJason Rassi <rassi@10gen.com>2016-01-14 12:58:13 -0500
committerJason Rassi <rassi@10gen.com>2016-01-14 15:12:38 -0500
commit09b89f0986550443a13af16b76ef04d91120bb2f (patch)
tree977b1fa1965ac1cba4e6b39b430e309636832305 /src/mongo/db/exec/multi_plan.cpp
parent225ac6a226bc34bdae716c17f3b49f5a1a279e4e (diff)
downloadmongo-09b89f0986550443a13af16b76ef04d91120bb2f.tar.gz
SERVER-19377 PlanStage: make work() non-virt, add virt method doWork()
Changes PlanStage::work() to be non-virtual. PlanStage::work() now updates _commonStats and calls new pure virtual method doWork().
Diffstat (limited to 'src/mongo/db/exec/multi_plan.cpp')
-rw-r--r--src/mongo/db/exec/multi_plan.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/mongo/db/exec/multi_plan.cpp b/src/mongo/db/exec/multi_plan.cpp
index 2eba6aede7a..bd0cf272188 100644
--- a/src/mongo/db/exec/multi_plan.cpp
+++ b/src/mongo/db/exec/multi_plan.cpp
@@ -98,10 +98,7 @@ bool MultiPlanStage::isEOF() {
return bestPlan.results.empty() && bestPlan.root->isEOF();
}
-PlanStage::StageState MultiPlanStage::work(WorkingSetID* out) {
- // Adds the amount of time taken by work() to executionTimeMillis.
- ScopedTimer timer(&_commonStats.executionTimeMillis);
-
+PlanStage::StageState MultiPlanStage::doWork(WorkingSetID* out) {
if (_failure) {
*out = _statusMemberId;
return PlanStage::FAILURE;
@@ -113,7 +110,6 @@ PlanStage::StageState MultiPlanStage::work(WorkingSetID* out) {
if (!bestPlan.results.empty()) {
*out = bestPlan.results.front();
bestPlan.results.pop_front();
- _commonStats.advanced++;
return PlanStage::ADVANCED;
}
@@ -144,15 +140,6 @@ PlanStage::StageState MultiPlanStage::work(WorkingSetID* out) {
_backupPlanIdx = kNoSuchPlan;
}
- // Increment stats.
- if (PlanStage::ADVANCED == state) {
- _commonStats.advanced++;
- } else if (PlanStage::NEED_TIME == state) {
- _commonStats.needTime++;
- } else if (PlanStage::NEED_YIELD == state) {
- _commonStats.needYield++;
- }
-
return state;
}