10000 [WebProfilerBundle] changed label of peak memory usage in the time & … · tomasjav/symfony@89fb079 · GitHub
[go: up one dir, main page]

Skip to content

Commit 89fb079

Browse files
Loziknicolas-grekas
authored andcommitted
[WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
1 parent fe5eacd commit 89fb079

File tree

2 files changed

+5
-5
lines changed
  • src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector

2 files changed

+5
-5
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
{% set status_color = (collector.memory / 1024 / 1024) > 50 ? 'yellow' : '' %}
66
{{ include('@WebProfiler/Icon/memory.svg') }}
77
<span class="sf-toolbar-value">{{ '%.1f'|format(collector.memory / 1024 / 1024) }}</span>
8-
<span class="sf-toolbar-label">MB</span>
8+
<span class="sf-toolbar-label">MiB</span>
99
{% endset %}
1010

1111
{% set text %}
1212
<div class="sf-toolbar-info-piece">
1313
<b>Peak memory usage</b>
14-
<span>{{ '%.1f'|format(collector.memory / 1024 / 1024) }} MB</span>
14+
<span>{{ '%.1f'|format(collector.memory / 1024 / 1024) }} MiB</span>
1515
</div>
1616

1717
<div class="sf-toolbar-info-piece">
1818
<b>PHP memory limit</b>
19-
<span>{{ collector.memoryLimit == -1 ? 'Unlimited' : '%.0f MB'|format(collector.memoryLimit / 1024 / 1024) }}</span>
19+
<span>{{ collector.memoryLimit == -1 ? 'Unlimited' : '%.0f MiB'|format(collector.memoryLimit / 1024 / 1024) }}</span>
2020
</div>
2121
{% endset %}
2222

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
{% if profile.collectors.memory %}
6666
<div class="metric">
67-
<span class="value">{{ '%.2f'|format(profile.collectors.memory.memory / 1024 / 1024) }} <span class="unit">MB</span></span>
67+
<span class="value">{{ '%.2f'|format(profile.collectors.memory.memory / 1024 / 1024) }} <span class="unit">MiB</span></span>
6868
<span class="label">Peak memory usage</span>
6969
</div>
7070
{% endif %}
@@ -386,7 +386,7 @@
386386
ctx.fillStyle = "#444";
387387
ctx.font = "12px sans-serif";
388388
text = event.name;
389-
ms = " " + (event.duration < 1 ? event.duration : parseInt(event.duration, 10)) + " ms / " + event.memory + " MB";
389+
ms = " " + (event.duration < 1 ? event.duration : parseInt(event.duration, 10)) + " ms / " + event.memory + " MiB";
390390
if (x + event.starttime * ratio + ctx.measureText(text + ms).width > width) {
391391
ctx.textAlign = "end";
392392
ctx.font = "10px sans-serif";

0 commit comments

Comments
 (0)
0