mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
110 lines
4.1 KiB
Twig
110 lines
4.1 KiB
Twig
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
|
|
|
|
{% block toolbar %}
|
|
{% set text %}
|
|
<div class="sf-toolbar-info-piece">
|
|
<b>Cache hits</b>
|
|
<span class="sf-toolbar-status sf-toolbar-status-green">{{ collector.summary.hits }}</span>
|
|
</div>
|
|
<div class="sf-toolbar-info-piece">
|
|
<b>Cache misses</b>
|
|
<span class="sf-toolbar-status sf-toolbar-status-red">{{ collector.summary.misses }}</span>
|
|
</div>
|
|
{% endset %}
|
|
{% set icon %}
|
|
<img width="20" height="28" alt="Cache" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcCAYAAABh2p9gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQRJREFUeNpi/P//PwM1ARMDlcGogZQDlpMnT7pxc3NbA9nhQKxOpL5rQLwJiPeBsI6Ozl+YBOOOHTv+AOllQNwtLS39F2owKYZ/gRq8G4i3ggxEToggWzvc3d2Pk+1lNL4fFAs6ODi8JzdS7mMRVyDVoAMHDsANdAPiOCC+jCQvQKqBQB/BDbwBxK5AHA3E/kB8nKJkA8TMQBwLxaBIKQbi70AvTADSBiSadwFXpCikpKQU8PDwkGTaly9fHFigkaKIJid4584dkiMFFI6jkTJII0WVmpHCAixZQEXWYhDeuXMnyLsVlEQKI45qFBQZ8eRECi4DBaAlDqle/8A48ip6gAADANdQY88Uc0oGAAAAAElFTkSuQmCC"/>
|
|
<span class="sf-toolbar-status{% if 75 > collector.summary.hitRatio %} sf-toolbar-status-green{% endif %}">{{ '%0.2f'|format(collector.summary.hitRatio * 100) }} %</span> cache hit ratio
|
|
{% endset %}
|
|
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
|
|
{% endblock %}
|
|
|
|
{% block menu %}
|
|
<span class="label">
|
|
<strong>Cache</strong>
|
|
</span>
|
|
{% endblock %}
|
|
|
|
{% block panel %}
|
|
<h2>Cache: {{ collector.summary.cacheType }}</h2>
|
|
|
|
{% if collector.summary.namespace %}
|
|
<p><strong>Namespace</strong>: {{ collector.summary.namespace }}</p>
|
|
{% endif %}
|
|
|
|
<h3>Server statistics</h3>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Server stat</th>
|
|
<th>Initial value</th>
|
|
<th>Final value</th>
|
|
<th>Delta</th>
|
|
</tr>
|
|
</thead>
|
|
<tr>
|
|
<th scope="row">Hits</th>
|
|
<td>{{ collector.initialProfile.hits }}</td>
|
|
<td>{{ collector.currentProfile.hits }}</td>
|
|
<td>{{ collector.summary.hits }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Misses</th>
|
|
<td>{{ collector.initialProfile.misses }}</td>
|
|
<td>{{ collector.currentProfile.misses }}</td>
|
|
<td>{{ collector.summary.misses }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Calls</th>
|
|
<td>{{ collector.initialProfile.misses + collector.initialProfile.hits }}</td>
|
|
<td>{{ collector.currentProfile.misses + collector.currentProfile.hits }}</td>
|
|
<td>{{ collector.summary.calls }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Uptime</th>
|
|
<td>{{ collector.initialProfile.uptime }}</td>
|
|
<td>{{ collector.currentProfile.uptime }}</td>
|
|
<td>{{ collector.summary.uptimeDelta }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Memory usage</th>
|
|
<td>{{ collector.initialProfile.memUsage }}</td>
|
|
<td>{{ collector.currentProfile.memUsage }}</td>
|
|
<td>{{ collector.summary.memUsageDelta }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Memory available</th>
|
|
<td>{{ collector.initialProfile.memAvailable }}</td>
|
|
<td>{{ collector.currentProfile.memAvailable }}</td>
|
|
<td>{{ collector.summary.memAvailableDelta }}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h3>Call list</h3>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>Call type</th>
|
|
<th>Key</th>
|
|
<th>Hit / Miss</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for call in collector.calls %}
|
|
<tr>
|
|
<td>{{ loop.index }}</td>
|
|
<td>
|
|
{% if call['type'] != 'fetch' %}<strong>{% endif %}
|
|
{{ call['type'] }}
|
|
{% if call['type'] != 'fetch' %}</strong>{% endif %}
|
|
</td>
|
|
<td>{{ call['key'] }}</td>
|
|
<td>{% if call['hit'] %}HIT{% else %}<strong>MISS</strong>{% endif %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock %}
|