On this page本页内容
setVerboseShell
()¶The setVerboseShell()
method configures the mongo
shell to print the duration of each operation.
setVerboseShell()
has the form:
setVerboseShell()
takes one boolean parameter. Specify true
or leave the parameter blank to activate the verbose shell. Specify false
to deactivate.
The following example demonstrates the behavior of the verbose shell:
mongo
shell, set verbose shell to true
:
true
, run db.collection.aggregate()
:
mongo
shell now displays information about the duration of the operation: