diff options
author | David Storch <david.storch@10gen.com> | 2014-10-07 18:23:21 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2014-10-13 19:59:21 -0400 |
commit | d601b91b6b16be3f93bac2f10952c1e5d273f91f (patch) | |
tree | f8b7daf9d3920ded5567489d0d65df50afed9542 /jstests/sharding/limit_push.js | |
parent | e7a49e50e5a858b02c9c242c943d7559238bb2b6 (diff) | |
download | mongo-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.js | 10 |
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(); - |