symfony/symfony — pull request #7953 by WouterJ (2013-05-06 19:17:21+00:00)
Title: [TwigBundle] Created stopwatch tag for profiling templates

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | to be done

This PR adds a new tag to Twig which you can use to time parts of a template and see it in the timing tab of the profiler.

Usage:

````jinja
{% stopwatch foo %}
... some things that gets timed
{% endstopwatch %}
````

This feature is based on the idea of @lsmith77 (see also our twitter conversation: https://twitter.com/lsmith/status/330772561413672962 )