summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/text_match.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/text_match.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/text_match.cpp')
-rw-r--r--src/mongo/db/exec/text_match.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/mongo/db/exec/text_match.cpp b/src/mongo/db/exec/text_match.cpp
index 37d199011bd..0d94a8a5bfb 100644
--- a/src/mongo/db/exec/text_match.cpp
+++ b/src/mongo/db/exec/text_match.cpp
@@ -74,12 +74,7 @@ const SpecificStats* TextMatchStage::getSpecificStats() const {
return &_specificStats;
}
-PlanStage::StageState TextMatchStage::work(WorkingSetID* out) {
- ++_commonStats.works;
-
- // Adds the amount of time taken by work() to executionTimeMillis.
- ScopedTimer timer(&_commonStats.executionTimeMillis);
-
+PlanStage::StageState TextMatchStage::doWork(WorkingSetID* out) {
if (isEOF()) {
return PlanStage::IS_EOF;
}
@@ -110,21 +105,6 @@ PlanStage::StageState TextMatchStage::work(WorkingSetID* out) {
}
}
- // Increment common stats counters that are specific to the return value of work().
- switch (stageState) {
- case PlanStage::ADVANCED:
- ++_commonStats.advanced;
- break;
- case PlanStage::NEED_TIME:
- ++_commonStats.needTime;
- break;
- case PlanStage::NEED_YIELD:
- ++_commonStats.needYield;
- break;
- default:
- break;
- }
-
return stageState;
}