summaryrefslogtreecommitdiff
path: root/jstests/sharding/limit_push.js
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2014-10-07 18:23:21 -0400
committerDavid Storch <david.storch@10gen.com>2014-10-13 19:59:21 -0400
commitd601b91b6b16be3f93bac2f10952c1e5d273f91f (patch)
treef8b7daf9d3920ded5567489d0d65df50afed9542 /jstests/sharding/limit_push.js
parente7a49e50e5a858b02c9c242c943d7559238bb2b6 (diff)
downloadmongo-d601b91b6b16be3f93bac2f10952c1e5d273f91f.tar.gz
SERVER-14875 explain helpers for the shell
Diffstat (limited to 'jstests/sharding/limit_push.js')
-rw-r--r--jstests/sharding/limit_push.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/sharding/limit_push.js b/jstests/sharding/limit_push.js
index d0bd259780b..ad9d8b9a383 100644
--- a/jstests/sharding/limit_push.js
+++ b/jstests/sharding/limit_push.js
@@ -35,17 +35,17 @@ assert.eq( 60 , db.limit_push.find( q ).count() , "Did not find 60 documents" );
// Now make sure that the explain shos that each shard is returning a single document as indicated
// by the "n" element for each shard
-exp = db.limit_push.find( q ).sort( { x:-1} ).limit(1).explain();
+exp = db.limit_push.find( q ).sort( { x:-1} ).limit(1).explain("executionStats");
printjson( exp )
-assert.eq("ParallelSort", exp.clusteredType, "Not a ParallelSort");
+var execStages = exp.executionStats.executionStages;
+assert.eq("SHARD_MERGE_SORT", execStages.stage, "Expected SHARD_MERGE_SORT as root stage");
var k = 0;
-for (var j in exp.shards) {
- assert.eq( 1 , exp.shards[j][0].executionStats.nReturned,
+for (var j in execStages.shards) {
+ assert.eq( 1 , execStages.shards[j].executionStages.nReturned,
"'n' is not 1 from shard000" + k.toString());
k++
}
s.stop();
-