Files
mongo/jstests/profile3.js
2011-08-17 11:15:09 -04:00

27 lines
433 B
JavaScript

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);
}