【发布时间】:2012-03-15 12:39:34
【问题描述】:
我想记录每次查询时的查询时间。
我在 playframework 上使用 mongodb。只是我想减去开始和结束时间。例如:
a=currenttime();
madequert();
querytime=currenttime()-a;
有没有更好的办法?
【问题讨论】:
标签: mongodb playframework mongodb-java
我想记录每次查询时的查询时间。
我在 playframework 上使用 mongodb。只是我想减去开始和结束时间。例如:
a=currenttime();
madequert();
querytime=currenttime()-a;
有没有更好的办法?
【问题讨论】:
标签: mongodb playframework mongodb-java
您可能想使用Mongo's DB profiler。这样你就可以保留你的代码(维护它的工作更少),它会给你更多的选择来检查 Mongo 的行为。
【讨论】: