Created
May 10, 2018 02:05
-
-
Save sarjarapu/bc56677b7e5542917b9bff9b7f7b14fc to your computer and use it in GitHub Desktop.
A JavaScript function to execute currentOp in a while loop to capture operations over a period of time.
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
var i = 0; | |
while(i++<10) { | |
printjson(db.currentOp()); | |
// sleep for 10 ms if required. | |
sleep(10) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment