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