- Reference >
mongoShell Methods >- Native Methods >
- setVerboseShell()
setVerboseShell()¶
On this page
-
setVerboseShell()¶ The
setVerboseShell()method configures themongoshell to print the duration of each operation.setVerboseShell()has the form:setVerboseShell()takes one boolean parameter. Specifytrueor leave the parameter blank to activate the verbose shell. Specifyfalseto deactivate.
Example¶
The following example demonstrates the behavior of the verbose shell:
From the
mongoshell, set verbose shell totrue:With verbose shell set to
true, rundb.collection.aggregate():In addition to returning the results of the operation, the
mongoshell now displays information about the duration of the operation: