summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop.cpp
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@10gen.com>2016-04-06 14:45:29 -0400
committerJames Wahlin <james.wahlin@10gen.com>2016-04-20 13:22:35 -0400
commit0f1cf1b71a12d2e41aeea064848ef192bfceddd7 (patch)
treea563d427ab4126a5fb05834f1d9dc9e6c0ed7ae6 /src/mongo/db/curop.cpp
parent5dd37d3fa197e73fab8298e5d748e06393b053b2 (diff)
downloadmongo-0f1cf1b71a12d2e41aeea064848ef192bfceddd7.tar.gz
SERVER-23257 Report keysExamined/docsExamined/hasSortStage where valid
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r--src/mongo/db/curop.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
index dc9f819dc73..6b8618b3843 100644
--- a/src/mongo/db/curop.cpp
+++ b/src/mongo/db/curop.cpp
@@ -40,6 +40,7 @@
#include "mongo/db/cursor_id.h"
#include "mongo/db/json.h"
#include "mongo/db/query/getmore_request.h"
+#include "mongo/db/query/plan_summary_stats.h"
#include "mongo/util/fail_point_service.h"
#include "mongo/util/log.h"
@@ -674,4 +675,13 @@ void OpDebug::append(const CurOp& curop,
execStats.append(b, "execStats");
}
+void OpDebug::setPlanSummaryMetrics(const PlanSummaryStats& planSummaryStats) {
+ keysExamined = planSummaryStats.totalKeysExamined;
+ docsExamined = planSummaryStats.totalDocsExamined;
+ idhack = planSummaryStats.isIdhack;
+ hasSortStage = planSummaryStats.hasSortStage;
+ fromMultiPlanner = planSummaryStats.fromMultiPlanner;
+ replanned = planSummaryStats.replanned;
+}
+
} // namespace mongo