Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rewrote profiler layout to feature a wealth of additional information.

  • Loading branch information...
commit 87f05216c518cf97cce6c4338bc439df6f20af34 1 parent 0ff002f
@jhallbachner authored
Showing with 56 additions and 6 deletions.
  1. +56 −6 Resources/views/Profiler/layout.html.twig
View
62 Resources/views/Profiler/layout.html.twig
@@ -3,13 +3,17 @@
{% block toolbar %}
{% set icon %}
<img width="22" height="28" alt="Memory Usage" style="vertical-align: middle;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAcCAYAAABlL09dAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wHGAALFQCM6LQAAAFwSURBVEjH7ZW9S4JRFIefRAoaAmlpbguCiKaGIqjh1FI0SV+vH6G2BmW4RlJG0Rj08RcE0aI3bGqPioagD6IpSEISGiSiBt/ATK+91ynwLBfOOffhx+/cD6jHv40GpVQ7EDXcnxCR+7JgAKVUGhgyAJ8CAyLyWVpw2esC8GEA7gesiopt1btA0AD+AnSISKacYoAYkDMAtwKJSlYgIs/AmuEQLaXUYHHCXdKwBdxqAFlN7UkH7jQ8Hd9z2gZuROTNXZQcBg6AZgPmOxAC2gAvEHXZUC9wZAjNASPAgy2ssdiKa6DX0IEM0GJfluYfHi8txi5qeRdWE/F5wFPpHNf05pQm3Lru4GyAyakJPJ6CmO6unkqtLkdgf8DHxvomyWSKfD7vSLHWipXlOGPjo6RPjglHQo680YJTKYU17ScSnsPyzehamxxZcX55VrjH2Sx7O/t/teKxKlgzrHLgV8AvIodVwQ7iDugTkav6b/8rvgBcMlqf0kD/YAAAAABJRU5ErkJggg=="/>
- <span class="sf-toolbar-status sf-toolbar-status-green">{{ collector.calls }} call{% if collector.calls != 1 %}s{% endif %} / {{ collector.hits }} hits{% if collector.hits != 1 %}s{% endif %}</span>
+ <span class="sf-toolbar-status sf-toolbar-status-green">{{ collector.calls }} call{% if collector.calls != 1 %}s{% endif %} / {{ collector.hits }} hit{% if collector.hits != 1 %}s{% endif %}</span>
{% endset %}
{% set text %}
<div class="sf-toolbar-info-piece">
- <b>Cache Handler</b>
- <span></span>
+ <b>Default Handler</b> <span>{{ collector.default }}</span>
</div>
+ {% for name, details in collector.caches %}
+ <div class="sf-toolbar-info-piece">
+ <b>{{ name }}</b> <span class="sf-toolbar-status sf-toolbar-status-green">{{ details.calls }} / {{ details.hits }}</span>
+ </div>
+ {% endfor %}
{% endset %}
{% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %}
{% endblock %}
@@ -44,11 +48,57 @@
</tr>
</table>
- <h2>Cache Services</h2>
-
{% for name, details in collector.caches %}
- <h3>{{ name }}</h3>
+ <h2>Cache Service: <i>{{ name }}</i></h2>
+ <table>
+ <tr>
+ <th>Handlers</th>
+ <td>{{ details.options.handlers|join(',') }}</td>
+ </tr>
+ <tr>
+ <th>Calls</th>
+ <td>{{ details.calls }}</td>
+ </tr>
+ <tr>
+ <th>Hits</th>
+ <td>{{ details.hits }}</td>
+ </tr>
+ </table>
+
+ <h3>Handler Options</h3>
+ <table>
+ {% for name, options in details.options %}
+ {% if name != 'handlers' %}
+ <tr>
+ <th colspan="2"><h3 style="font-size: 16px; margin-bottom: 0;">{{ name }} settings</h3></th>
+ </tr>
+ {% for oname, ovalue in options %}
+ <tr>
+ <th>{{ oname }}</th>
+ <td>{{ ovalue }}</td>
+ </tr>
+ {% endfor %}
+ {% endif %}
+ {% endfor %}
+ </table>
+
+ <h3>Query Record</h3>
+ <table>
+ <tr>
+ <th>Request Key</th>
+ <th>Hit?</th>
+ <th>Returned Value</th>
+ </tr>
+ {% for query in details.queries %}
+ <tr>
+ <td>{{ query.key }}</td>
+ <td>{{ query.hit }}</td>
+ <td>{{ query.value }}</td>
+ </tr>
+ {% endfor %}
+ </table>
+
{% endfor %}
{% endblock %}
Please sign in to comment.
Something went wrong with that request. Please try again.