Skip to content

Commit 7a8b06f

Browse files
Tip about using stopwatch to show in profiler page
Mention how to get the stopwatch instance for showing the timing on the profiler page.
1 parent 04577e9 commit 7a8b06f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/stopwatch.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ You can also provide a category name to an event::
6060
You can consider categories as a way of tagging events. For example, the
6161
Symfony Profiler tool uses categories to nicely color-code different events.
6262

63+
.. tip::
64+
65+
When you want to show events in the symfony profiler, autowire
66+
`Symfony\Component\Stopwatch\Stopwatch` into your service. Each category
67+
is shown on a separate line.
68+
6369
Periods
6470
-------
6571

0 commit comments

Comments
 (0)