summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2014-03-28 19:13:37 -0400
committerEliot Horowitz <eliot@10gen.com>2014-03-30 13:01:13 -0400
commitee42f85b2c7497a78b56eb6e8b293305125b4cc2 (patch)
tree392940c3ef9dae0b2a8d7868df31666ad4092230 /jstests
parent7810679187eb5bd82de81cc8f152e36ec38f2c4b (diff)
downloadmongo-ee42f85b2c7497a78b56eb6e8b293305125b4cc2.tar.gz
SERVER-12550: insert has 3 phases:
a) outside of lock generate keys b) inside lock touch btree pages c) do insert
Diffstat (limited to 'jstests')
-rw-r--r--jstests/core/profile4.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/jstests/core/profile4.js b/jstests/core/profile4.js
index 7cf22d9fe78..bbeab90b851 100644
--- a/jstests/core/profile4.js
+++ b/jstests/core/profile4.js
@@ -13,8 +13,9 @@ function profileCursor() {
}
function lastOp() {
- p = profileCursor().sort( { $natural:-1 } ).next();
-// printjson( p );
+ var c = profileCursor().sort( { $natural:-1 } );
+ var p = c.next();
+ //printjson( p );
return p;
}
@@ -48,8 +49,11 @@ try {
[ "keyUpdates", 0 ],
[ "nreturned", 0 ],
[ "responseLength", 20 ] ] );
-
- t.save( {} );
+
+ db.eval( function(){ print( "-----xxx----" ); } );
+
+ x = t.save( {} );
+ x = t.save( {} );
// check write lock stats are set
o = lastOp();
@@ -71,11 +75,11 @@ try {
t.save( {} );
t.save( {} );
- t.find().skip( 1 ).limit( 4 ).itcount();
- checkLastOp( [ [ "ntoreturn", 4 ],
+ t.find().skip( 1 ).limit( 5 ).itcount();
+ checkLastOp( [ [ "ntoreturn", 5 ],
[ "ntoskip", 1 ],
- [ "nscanned", 3 ],
- [ "nreturned", 2 ] ] );
+ [ "nscanned", 4 ],
+ [ "nreturned", 3 ] ] );
t.find().batchSize( 2 ).next();
o = lastOp();