Вопрос

I want to log my query times for each time when a query made.

I'm using mongodb on playframework. Simply I'm thinkinig to substract start and end time.For ex:

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

Is there any better way?

Это было полезно?

Решение

You probably want to use Mongo's DB profiler. That way you'll keep that of your code (less work to maintain it) and it will give you more options to check Mongo behaviour.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top