I am looking for a way to retrieve the executionStats
for aggregations.
When using find(), I can retrieve them easily by using explain. Example output:
Currently(MongoDB 3.2) aggregation does not support executionStats, with explain option in aggreagation you get some data related to query but there is no executionStats in it. It is proposed and you can check its status here
https://jira.mongodb.org/browse/SERVER-19758
Please upvote the issue if you want to implement this soon.