mongo笔记

获取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")

 

上一篇:题解 CF1495E Qingshan and Daniel


下一篇:二、描述统计(descriptive statistics)