diff options
author | Eric Milkie <milkie@10gen.com> | 2014-03-05 11:40:18 -0500 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2014-03-10 07:39:35 -0400 |
commit | 0f83758b8547f7c5aed49aa8a8558fe1c3c8b36b (patch) | |
tree | 234762b48338e5dfbf20fe0c7f8b81946458c985 /jstests | |
parent | 0a5193f04847dd5d1b449cff26bf91e308020785 (diff) | |
download | mongo-0f83758b8547f7c5aed49aa8a8558fe1c3c8b36b.tar.gz |
SERVER-12762 make a new curop for each insert in a batch insert
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/core/profile4.js | 9 | ||||
-rw-r--r-- | jstests/profile4.js | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/jstests/core/profile4.js b/jstests/core/profile4.js index 5b9a0a66be2..ce211045cd4 100644 --- a/jstests/core/profile4.js +++ b/jstests/core/profile4.js @@ -53,7 +53,14 @@ try { // check write lock stats are set o = lastOp(); - assert.eq('insert', o.op); + if (db.getMongo().writeMode() == 'commands') { + // insert write commands are profiled both as individual inserts and as a write command + assert.eq('command', o.op); + } + else { + assert.eq('insert', o.op); + } + assert.eq( 0, o.lockStats.timeLockedMicros.r ); assert.lt( 0, o.lockStats.timeLockedMicros.w ); assert.eq( 0, o.lockStats.timeAcquiringMicros.r ); diff --git a/jstests/profile4.js b/jstests/profile4.js index 5b9a0a66be2..e9b315e2ae2 100644 --- a/jstests/profile4.js +++ b/jstests/profile4.js @@ -53,6 +53,7 @@ try { // check write lock stats are set o = lastOp(); + assert.eq('insert', o.op); assert.eq( 0, o.lockStats.timeLockedMicros.r ); assert.lt( 0, o.lockStats.timeLockedMicros.w ); |