Docs HomeMongoDB Manual

db.getProfilingStatus()

db.getProfilingStatus()
Returns:返回值:The current profile level, slowOpThresholdMs setting, and slowOpSampleRate setting.当前profile级别、slowOpThresholdMs设置和slowOpSampleRate设置。Starting in MongoDB 4.4.2, you can set a filter to control which operations are logged by the profiler. 从MongoDB 4.4.2开始,您可以设置一个filter来控制探查器记录哪些操作。When set, any configured filters are also returned by db.getProfilingStatus(), along with a note explaining filter behavior.设置后,db.getProfilingStatus()还会返回任何配置的筛选器,并附带一条说明筛选器行为的注释。
You can set the profiling filter with either:您可以使用以下任一项设置分析筛选器: