summaryrefslogtreecommitdiff
path: root/jstests/sharding/shard2.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/shard2.js
parente7a49e50e5a858b02c9c242c943d7559238bb2b6 (diff)
downloadmongo-d601b91b6b16be3f93bac2f10952c1e5d273f91f.tar.gz
SERVER-14875 explain helpers for the shell
Diffstat (limited to 'jstests/sharding/shard2.js')
-rw-r--r--jstests/sharding/shard2.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/sharding/shard2.js b/jstests/sharding/shard2.js
index a229c4dc4b1..41b46158167 100644
--- a/jstests/sharding/shard2.js
+++ b/jstests/sharding/shard2.js
@@ -140,12 +140,13 @@ placeCheck( 7 );
db.foo.find().sort( { _id : 1 } ).forEach( function(z){ print( z._id ); } )
-zzz = db.foo.find().explain();
+zzz = db.foo.find().explain("executionStats").executionStats;
assert.eq( 0 , zzz.totalKeysExamined , "EX1a" )
assert.eq( 6 , zzz.nReturned , "EX1b" )
assert.eq( 6 , zzz.totalDocsExamined , "EX1c" )
-zzz = db.foo.find().hint( { _id : 1 } ).sort( { _id : 1 } ).explain();
+zzz = db.foo.find().hint( { _id : 1 } ).sort( { _id : 1 } )
+ .explain("executionStats").executionStats;
assert.eq( 6 , zzz.totalKeysExamined , "EX2a" )
assert.eq( 6 , zzz.nReturned , "EX2b" )
assert.eq( 6 , zzz.totalDocsExamined , "EX2c" )