📅  最后修改于: 2022-03-11 14:45:14.928000             🧑  作者: Mango
from pymongo
import MongoClient
client = MongoClient()
db = client.test
# print collection statistics
# events is the collection name here
print(db.command("collstats", "events"))
# print database statistics
print(db.command("dbstats"))