summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/group_cmd.cpp
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@10gen.com>2015-06-14 16:13:57 -0400
committerJames Wahlin <james.wahlin@10gen.com>2015-09-03 16:20:17 -0400
commitae9df7fb11cf359686699aeb9539cb6dc35de675 (patch)
tree239705229d7cfc7d06089a007e2d746ce235287d /src/mongo/db/commands/group_cmd.cpp
parent2e205e7ee08004436a3f5f1750eb253b15e9027e (diff)
downloadmongo-ae9df7fb11cf359686699aeb9539cb6dc35de675.tar.gz
SERVER-2227 Addition of index usage statistics
Diffstat (limited to 'src/mongo/db/commands/group_cmd.cpp')
-rw-r--r--src/mongo/db/commands/group_cmd.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/commands/group_cmd.cpp b/src/mongo/db/commands/group_cmd.cpp
index 60b340be3e5..88a9169599f 100644
--- a/src/mongo/db/commands/group_cmd.cpp
+++ b/src/mongo/db/commands/group_cmd.cpp
@@ -32,6 +32,7 @@
#include "mongo/db/auth/action_type.h"
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/auth/privilege.h"
+#include "mongo/db/catalog/collection.h"
#include "mongo/db/commands.h"
#include "mongo/db/db_raii.h"
#include "mongo/db/exec/group.h"
@@ -161,6 +162,12 @@ private:
invariant(planExecutor->isEOF());
+ PlanSummaryStats summaryStats;
+ Explain::getSummaryStats(*planExecutor, &summaryStats);
+ if (coll) {
+ coll->infoCache()->notifyOfQuery(txn, summaryStats.indexesUsed);
+ }
+
invariant(STAGE_GROUP == planExecutor->getRootStage()->stageType());
GroupStage* groupStage = static_cast<GroupStage*>(planExecutor->getRootStage());
const GroupStats* groupStats =