db.getProfilingStatus()
db.getProfilingStatus()-
Returns:返回值:The current当前profilelevel,slowOpThresholdMssetting, andslowOpSampleRatesetting.profile级别、slowOpThresholdMs设置和slowOpSampleRate设置。Starting in MongoDB 4.4.2, you can set a从MongoDB 4.4.2开始,您可以设置一个filterto control which operations are logged by the profiler.filter来控制探查器记录哪些操作。When set, any configured filters are also returned by设置后,db.getProfilingStatus(), along with anoteexplaining filter behavior.db.getProfilingStatus()还会返回任何配置的筛选器,并附带一条说明筛选器行为的注释。
You can set the profiling filter with either:您可以使用以下任一项设置分析筛选器:thedb.setProfilingLevel()shell method, ordb.setProfilingLevel()shell方法,或theoperationProfiling.filterconfiguration file option.operationProfiling.filter配置文件选项。