summaryrefslogtreecommitdiff
path: root/jstests/profile3.js
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2012-02-09 16:09:06 -0500
committerMathias Stearn <mathias@10gen.com>2012-02-09 17:57:49 -0500
commit936fea78727ca9026ce35d6afb8896509ee6e273 (patch)
treedb5a7e9aa8eb92121ebf87a31a2b7a8561a77448 /jstests/profile3.js
parent5c1fab4a1fe4a97cd54bd31ff0f536a7821aa1ed (diff)
downloadmongo-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.js10
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();
}