【问题标题】:java, Calculating mongodb query execution timejava, 计算 mongodb 查询执行时间
【发布时间】:2012-03-15 12:39:34
【问题描述】:

我想记录每次查询时的查询时间。

我在 playframework 上使用 mongodb。只是我想减去开始和结束时间。例如:

a=currenttime();
madequert();
querytime=currenttime()-a;

有没有更好的办法?

【问题讨论】:

    标签: mongodb playframework mongodb-java


    【解决方案1】:

    您可能想使用Mongo's DB profiler。这样你就可以保留你的代码(维护它的工作更少),它会给你更多的选择来检查 Mongo 的行为。

    【讨论】:

      猜你喜欢
      • 2012-11-27
      • 2018-10-03
      • 1970-01-01
      • 1970-01-01
      • 2017-05-10
      • 2019-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多