// Using `./mongod --profile=2`
|
//
|
> db.runCommand({profile: 2});
|
{ "was" : 2, "slowms" : 100, "ok" : 1 }
|
> db.getCollectionNames();
|
[ "system.indexes" ]
|
> db.foo.insert({});
|
WriteResult({ "nInserted" : 1 })
|
> db.getCollectionNames();
|
[ "foo", "system.indexes" ]
|
|
|
// Using `./mongod`
|
//
|
> db.runCommand({profile: 2});
|
{ "was" : 0, "slowms" : 100, "ok" : 1 }
|
> db.getCollectionNames();
|
[ "system.indexes", "system.profile" ]
|
> db.foo.insert({});
|
WriteResult({ "nInserted" : 1 })
|
> db.getCollectionNames();
|
[ "foo", "system.indexes", "system.profile" ]
|