8000 Improved the design of the metrics in the profiler by javiereguiluz · Pull Request #20294 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Improved the design of the metrics in the profiler #20294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
< F800 td class="blob-code blob-code-inner blob-code-hunk">@@ -73,14 +82,7 @@
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,19 @@
<span class="label">Symfony initialization</span>
</div>

{% if profile.collectors.memory %}
<div class="metric">
<span class="value">{{ '%.2f'|format(profile.collectors.memory.memory / 1024 / 1024) }} <span class="unit">MB</span></span>
<span class="label">Peak memory usage</span>
</div>
{% endif %}

{% if profile.children|length > 0 %}
<div class="metric-divider"></div>

<div class="metric">
<span class="value">{{ profile.children|length }}</span>
<span class="label">Sub-Requests</span>
<span class="label">Sub-Request{{ profile.children|length > 1 ? 's' }}</span>
</div>

{% set subrequests_time = 0 %}
Expand All

<div class="metric">
<span class="value">{{ subrequests_time }} <span class="unit">ms</span></span>
<span class="label">Sub-Requests time</span>
</div>
{% endif %}

{% if profile.collectors.memory %}
<div class="metric">
<span class="value">{{ '%.2f'|format(profile.collectors.memory.memory / 1024 / 1024) }} <span class="unit">MB</span></span>
<span class="label">Peak memory usage</span>
<span class="label">Sub-Request{{ profile.children|length > 1 ? 's' }} time</span>
</div>
{% endif %}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,12 @@ table tbody ul {
{# Metrics
------------------------------------------------------------------------- #}
.metrics {
margin: 1em 0;
margin: 1em 0 0;
overflow: auto;
}
.metrics .metric {
float: left;
margin-right: 1em;
margin: 0 1em 1em 0;
}

.metric {
Expand Down Expand Up @@ -310,6 +310,12 @@ table tbody ul {
vertical-align: middle;
}

.metric-divider {
float: left;
margin: 0 1em;
min-height: 1px; {# required to apply 'margin' to an empty 'div' #}
}

{# Cards
------------------------------------------------------------------------- #}
.card {
Expand Down
0