From 3780933fb43bc357d94e196e3011b3599d3d87bc Mon Sep 17 00:00:00 2001 From: WouterJ Date: Tue, 10 Sep 2013 21:51:03 +0200 Subject: [PATCH] Documented Stopwatch Helper --- cookbook/templating/PHP.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cookbook/templating/PHP.rst b/cookbook/templating/PHP.rst index a3454abbb29..759e124e0d2 100644 --- a/cookbook/templating/PHP.rst +++ b/cookbook/templating/PHP.rst @@ -310,6 +310,21 @@ portable. Thanks to this helper, you can move the application root directory anywhere under your web root directory without changing anything in your template's code. +Profiling Templates +~~~~~~~~~~~~~~~~~~~ + +Using the ``stopwatch`` helper, you are able to time parts of your template +and display it on the timeline of the WebProfilerBundle:: + + start('foo') ?> + ... things that gets timed + stop('foo') ?> + +.. tip:: + + If you use the same name more than once in your template, the times are + grouped on the same line in the timeline. + Output Escaping ---------------