Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top