diff options
author | Jason Rassi <rassi@10gen.com> | 2016-01-14 12:58:13 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2016-01-14 15:12:38 -0500 |
commit | 09b89f0986550443a13af16b76ef04d91120bb2f (patch) | |
tree | 977b1fa1965ac1cba4e6b39b430e309636832305 /src/mongo/db/exec/sort_key_generator.cpp | |
parent | 225ac6a226bc34bdae716c17f3b49f5a1a279e4e (diff) | |
download | mongo-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/sort_key_generator.cpp')
-rw-r--r-- | src/mongo/db/exec/sort_key_generator.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mongo/db/exec/sort_key_generator.cpp b/src/mongo/db/exec/sort_key_generator.cpp index 26e9d6886db..22237b02353 100644 --- a/src/mongo/db/exec/sort_key_generator.cpp +++ b/src/mongo/db/exec/sort_key_generator.cpp @@ -281,15 +281,9 @@ bool SortKeyGeneratorStage::isEOF() { return child()->isEOF(); } -PlanStage::StageState SortKeyGeneratorStage::work(WorkingSetID* out) { - ++_commonStats.works; - - // Adds the amount of time taken by work() to executionTimeMillis. - ScopedTimer timer(&_commonStats.executionTimeMillis); - +PlanStage::StageState SortKeyGeneratorStage::doWork(WorkingSetID* out) { if (!_sortKeyGen) { _sortKeyGen = stdx::make_unique<SortKeyGenerator>(_sortSpec, _query); - ++_commonStats.needTime; return PlanStage::NEED_TIME; } @@ -312,10 +306,6 @@ PlanStage::StageState SortKeyGeneratorStage::work(WorkingSetID* out) { if (stageState == PlanStage::IS_EOF) { _commonStats.isEOF = true; - } else if (stageState == PlanStage::NEED_TIME) { - ++_commonStats.needTime; - } else if (stageState == PlanStage::NEED_YIELD) { - ++_commonStats.needYield; } return stageState; |