Tracking MongoDB execution times using PHP I am currently working on a project using PHP, I have done research and found that microtime() helps with tracking the time of a query in a MySQL database.. 

how do I do the same for MongoDB, I have a PHP interface and I have also inserted data into the MongoDB database using this but how do I show how long the time of the query took to insert into the database.

PHP uses microtime()
MongoDB uses ????
As per MongoDB BOL Analyze Query Performance usees The cursor.explain("executionStats") and the  db.collection.explain("executionStats") methods provide statistics about the performance of a query. This data output can be useful in measuring if and how a query uses an index.

db.collection.explain() provides information on the execution of other operations, such as db.collection.update().