From 7a8b06fd92bcbdf56004e17a12609a966bc8f1a7 Mon Sep 17 00:00:00 2001 From: Simon Heimberg Date: Wed, 5 Sep 2018 10:56:43 +0200 Subject: [PATCH] Tip about using stopwatch to show in profiler page Mention how to get the stopwatch instance for showing the timing on the profiler page. --- components/stopwatch.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/stopwatch.rst b/components/stopwatch.rst index 9da437589c0..197d7f71a86 100644 --- a/components/stopwatch.rst +++ b/components/stopwatch.rst @@ -60,6 +60,12 @@ You can also provide a category name to an event:: You can consider categories as a way of tagging events. For example, the Symfony Profiler tool uses categories to nicely color-code different events. +.. tip:: + + When you want to show events in the symfony profiler, autowire + `Symfony\Component\Stopwatch\Stopwatch` into your service. Each category + is shown on a separate line. + Periods -------