summaryrefslogtreecommitdiff
path: root/jstests/core/profile4.js
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2015-12-09 17:48:30 -0500
committerDavid Storch <david.storch@10gen.com>2015-12-11 13:28:20 -0500
commitbb7e1e539da115da4ee1146c79e47c23109dce95 (patch)
tree8515a87718fc373e8d3fe2772b539c0b12046a70 /jstests/core/profile4.js
parentf28df29ac82f17778f46c010a311198bec28b9b7 (diff)
downloadmongo-bb7e1e539da115da4ee1146c79e47c23109dce95.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.
Diffstat (limited to 'jstests/core/profile4.js')
-rw-r--r--jstests/core/profile4.js14
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();