summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/near.cpp
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2014-12-22 13:01:12 -0500
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2014-12-22 15:22:43 -0500
commit1921c8c3f1cdaf0eebec76d328bc773018594bdf (patch)
treec80d4b6e75cf76cb8ba8d37fd3c35bd76b8b7ad4 /src/mongo/db/exec/near.cpp
parent0ae940b456ceafc3a0d473714c390f95d3a04823 (diff)
downloadmongo-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.cpp4
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;