diff options
Diffstat (limited to 'jstests/profile3.js')
-rw-r--r-- | jstests/profile3.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/jstests/profile3.js b/jstests/profile3.js new file mode 100644 index 0000000..a6574b7 --- /dev/null +++ b/jstests/profile3.js @@ -0,0 +1,26 @@ + +t = db.profile3; +t.drop(); + +try { + db.setProfilingLevel(0); + + db.system.profile.drop(); + assert.eq( 0 , db.system.profile.count() ) + + db.setProfilingLevel(2); + + t.insert( { x : 1 } ); + t.findOne( { x : 1 } ); + t.find( { x : 1 } ).count(); + + db.system.profile.find().forEach( printjson ) + + db.setProfilingLevel(0); + db.system.profile.drop(); + +} +finally { + db.setProfilingLevel(0); +} + |