获取stats

from pymongo import MongoClient

client = MongoClient()
db = client.test

# print collection statistics
print db.command("collstats", "events")
print(db.command("collstats", "messages")["storageSize"])
# print database statistics print db.command("dbstats")

 

posted on 2021-07-07 16:24  Go_Forward  阅读(19)  评论(0编辑  收藏  举报