I am looking for a way to retrieve the executionStats for aggregations.
executionStats
When using find(), I can retrieve them easily by using explain. Example output:
I was able to do it in the following way:
db.myUserCollection.explain("executionStats").aggregate([{$match: {firstName: "John"} }]);
Reference: https://jira.mongodb.org/browse/SERVER-19758