diff options
author | Mathias Stearn <mathias@10gen.com> | 2012-02-09 16:09:06 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2012-02-09 17:57:49 -0500 |
commit | 936fea78727ca9026ce35d6afb8896509ee6e273 (patch) | |
tree | db5a7e9aa8eb92121ebf87a31a2b7a8561a77448 /jstests/profile3.js | |
parent | 5c1fab4a1fe4a97cd54bd31ff0f536a7821aa1ed (diff) | |
download | mongo-936fea78727ca9026ce35d6afb8896509ee6e273.tar.gz |
Add nupdated and nmoved to profile object and slow op logging SERVER-4860
leaving bool moved in profiler object for backwards compatibility
Diffstat (limited to 'jstests/profile3.js')
-rw-r--r-- | jstests/profile3.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/jstests/profile3.js b/jstests/profile3.js index a6574b76f8a..7c6a3a4e782 100644 --- a/jstests/profile3.js +++ b/jstests/profile3.js @@ -13,10 +13,20 @@ try { t.insert( { x : 1 } ); t.findOne( { x : 1 } ); t.find( { x : 1 } ).count(); + t.update( { x : 1 }, {$inc:{a:1}} ); + t.update( { x : 1 }, {$inc:{a:1}} ); + t.update( { x : 0 }, {$inc:{a:1}} ); db.system.profile.find().forEach( printjson ) db.setProfilingLevel(0); + + + assert.eq(db.system.profile.count({nupdated: {$exists:1}}), 3) + assert.eq(db.system.profile.count({nupdated: 1}), 2) + assert.eq(db.system.profile.count({nupdated: 0}), 1) + assert.eq(db.system.profile.count({nmoved: 1}), 1) + db.system.profile.drop(); } |