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 0d079be commit ec5beb2Copy full SHA for ec5beb2
components/stopwatch.rst
@@ -48,6 +48,18 @@ You can also provide a category name to an event::
48
You can consider categories as a way of tagging events. For example, the
49
Symfony Profiler tool uses categories to nicely color-code different events.
50
51
+Usage in symfony
52
+----------------
53
+
54
+In a Controller, do:
55
56
+ $stopwatch = $this->get('debug.stopwatch');
57
+ $stopwatch->start('anEvent');
58
59
+Or inject `Symfony\Component\Stopwatch\Stopwatch` by autowiring.
60
61
+Thereafter this timing can be seen in the profiler.
62
63
Periods
64
-------
65
0 commit comments