Skip to content

Commit d09bcf3

Browse files
committed
Added deletes
1 parent 9e12fac commit d09bcf3

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/cache.html.twig

+10-2
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,21 @@
6666
<span class="label">Total hits</span>
6767
</div>
6868
<div class="metric">
69-
<span class="value">{{ collector.totals['hits/reads'] }}</span>
70-
<span class="label">Hits/reads</span>
69+
<span class="value">{{ collector.totals.misses }}</span>
70+
<span class="label">Total misses</span>
7171
</div>
7272
<div class="metric">
7373
<span class="value">{{ collector.totals.writes }}</span>
7474
<span class="label">Total writes</span>
7575
</div>
76+
<div class="metric">
77+
<span class="value">{{ collector.totals.deletes }}</span>
78+
<span class="label">Total deletes</span>
79+
</div>
80+
<div class="metric">
81+
<span class="value">{{ collector.totals['hits/reads'] }}</span>
82+
<span class="label">Hits/reads</span>
83+
</div>
7684
</div>
7785

7886
{% for name, calls in collector.calls %}

src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,15 @@ private function calculateStatistics()
160160
private function calculateTotalStatistics()
161161
{
162162
$statistics = $this->getStatistics();
163-
$totals = array('calls' => 0, 'time' => 0, 'reads' => 0, 'hits' => 0, 'misses' => 0, 'writes' => 0);
163+
$totals = array(
164+
'calls' => 0,
165+
'time' => 0,
166+
'reads' => 0,
167+
'hits' => 0,
168+
'misses' => 0,
169+
'writes' => 0,
170+
'deletes' => 0,
171+
);
164172
foreach ($statistics as $name => $values) {
165173
foreach ($totals as $key => $value) {
166174
$totals[$key] += $statistics[$name][$key];

0 commit comments

Comments
 (0)