db.setProfilingLevel() in mongoDB

setProfilingLevel(level, slowms?)

This method modifies the current database profiler level used by the database profiling system to capture data about performance.


Syntax:

db.setProfilingLevel(level, slowms?)


Example 1

MongoDB

db.setProfilingLevel(1)

Output

{ "was" : 0, "slowms" : 100, "sampleRate" : 1, "ok" : 1 }


Example 2

MongoDB

db.setProfilingLevel(2)

Output

{ "was" : 1, "slowms" : 100, "sampleRate" : 1, "ok" : 1 }


No comments:

Post a Comment