def profiling_level(self):
        result = self.command("profile", -1)

        assert result["was"] >= 0 and result["was"] <= 2
        return result["was"]
Get the database's current profiling level.
dataset/ETHPy150Open mongodb/mongo-python-driver/pymongo/database.py/Database.profiling_level