We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8df8e4 commit 1d85ccbCopy full SHA for 1d85ccb
components/stopwatch.rst
@@ -120,3 +120,16 @@ method and specifying the id of the section to be reopened::
120
$stopwatch->openSection('routing');
121
$stopwatch->start('building_config_tree');
122
$stopwatch->stopSection('routing');
123
+
124
125
+Printing a Summary
126
+------------------
127
128
+The event can easily be printed to display a summary::
129
130
+ $stopwatch = new Stopwatch();
131
+ $stopwatch->start();
132
+ // ... do some work here
133
+ $output->writeln($stopwatch->stop()); // prints something like default: 14.00 MiB - 2056 ms
134
135
+This gives you a brief summary of the used memory an elapsed time.
0 commit comments