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 01db1c4 commit 973eab5Copy full SHA for 973eab5
profiler/stopwatch.rst
@@ -0,0 +1,17 @@
1
+.. index::
2
+ single: Profiling; Stopwatch
3
+
4
+How to show custom timing
5
+=========================
6
7
+Inject :class:`Symfony\\Component\\Stopwatch\\Stopwatch` by autowiring. Or do ``$stopwatch = $this->get('debug.stopwatch');`` in a Controller.
8
9
+All timing mesurements done by this stopwatch are shown in the profiler on the page performance.
10
11
+short example::
12
13
+ $stopwatch->start('anEvent', 'customCategory');
14
+ $stopwatch->lapse('anEvent');
15
+ $stopwatch->stop('anEvent');
16
17
+:doc:`/component/stopwatch` explains the methods in more details.
0 commit comments