diff options
author | David Storch <david.storch@10gen.com> | 2015-12-09 17:48:30 -0500 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2015-12-11 13:33:44 -0500 |
commit | 6670ca3ffaf09f79eff8e4e9f618cd1a13481398 (patch) | |
tree | 35b18e021e91ce8f0e4089c16d0f8f94ec80b202 /jstests/core | |
parent | 218539ae2c5699e95f543f8d247823570c0cb264 (diff) | |
download | mongo-6670ca3ffaf09f79eff8e4e9f618cd1a13481398.tar.gz |
SERVER-21750 clean up getMore logging and profiling
--Omit ntoreturn and ntoskip from the getMore command log line.
--Add nreturned to the getMore command log line.
--Upconvert OP_GET_MORE profiler entries to match getMore cmd.
(cherry picked from commit bb7e1e539da115da4ee1146c79e47c23109dce95)
Diffstat (limited to 'jstests/core')
-rw-r--r-- | jstests/core/profile4.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/jstests/core/profile4.js b/jstests/core/profile4.js index ed290367811..11f09184713 100644 --- a/jstests/core/profile4.js +++ b/jstests/core/profile4.js @@ -157,6 +157,20 @@ try { assert.eq(lastOp.op, "getmore"); assert.eq(lastOp.ns, coll.getFullName()); + // getMore entry created by iterating the cursor should have the same format, regardless of + // readMode. + coll.find().batchSize(3).itcount(); + lastOp = getLastOp(); + assert.eq(lastOp.op, "getmore"); + assert.eq(lastOp.ns, coll.getFullName()); + assert("getMore" in lastOp.query); + assert.eq(lastOp.query.getMore, lastOp.cursorid); + assert.eq(lastOp.query.collection, coll.getName()); + assert.eq(lastOp.query.batchSize, 3) + assert.eq(lastOp.cursorExhausted, true) + assert.eq(lastOp.nreturned, 2); + assert("responseLength" in lastOp); + // Ensure that special $-prefixed OP_QUERY options like $hint and $returnKey get added to the // profiler entry correctly. coll.find().hint({_id: 1}).itcount(); |