diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2014-12-22 13:01:12 -0500 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2014-12-22 15:22:43 -0500 |
commit | 1921c8c3f1cdaf0eebec76d328bc773018594bdf (patch) | |
tree | c80d4b6e75cf76cb8ba8d37fd3c35bd76b8b7ad4 /src/mongo/db/exec/near.cpp | |
parent | 0ae940b456ceafc3a0d473714c390f95d3a04823 (diff) | |
download | mongo-1921c8c3f1cdaf0eebec76d328bc773018594bdf.tar.gz |
SERVER-16633 Add timer to geo near stage to track execution time
Diffstat (limited to 'src/mongo/db/exec/near.cpp')
-rw-r--r-- | src/mongo/db/exec/near.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/exec/near.cpp b/src/mongo/db/exec/near.cpp index 8b318921f54..9c0e8d43ec6 100644 --- a/src/mongo/db/exec/near.cpp +++ b/src/mongo/db/exec/near.cpp @@ -30,6 +30,7 @@ #include "mongo/db/exec/near.h" +#include "mongo/db/exec/scoped_timer.h" #include "mongo/db/exec/working_set_common.h" #include "mongo/util/assert_util.h" @@ -93,6 +94,9 @@ namespace mongo { ++_stats->common.works; + // Adds the amount of time taken by work() to executionTimeMillis. + ScopedTimer timer(&_stats->common.executionTimeMillis); + WorkingSetID toReturn = WorkingSet::INVALID_ID; Status error = Status::OK(); PlanStage::StageState nextState = PlanStage::NEED_TIME; |