db.getProfilingStatus()返回: 当前的
profile级别、slowOpThresholdMs设置、slowOpInProgressThresholdMs设置和slowOpSampleRate设置。You can set a
filterto control which operations are logged by the profiler. When set, any configured filters are also returned bydb.getProfilingStatus(), along with anoteexplaining filter behavior.您可以使用以下任一方法设置分析筛选器:
db.setProfilingLevel()shell 方法,或operationProfiling.filter配置文件选项。
兼容性
此方法可用于以下环境中托管的部署:
- MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
重要
This command is not supported in M0 and Flex clusters. For more information, see Unsupported Commands.
MongoDB Enterprise:基于订阅、自我管理的 MongoDB 版本
MongoDB Community:源代码可用、免费使用且可自行管理的 MongoDB 版本