Last active
September 18, 2021 01:01
-
-
Save gharriso/b652961b3431fee8d5ba4786f671942d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongo> function stageTimes(explan) { | |
var prevMS=0; | |
explan.stages.forEach(stg => { | |
print(Object.keys(stg)[0], stg.executionTimeMillisEstimate + 0-prevMS); | |
prevMS=stg.executionTimeMillisEstimate; | |
}); | |
} | |
mongol> stageTimes(explainOut); | |
$cursor 3505 | |
$group 1224 | |
$sort 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment