Skip to content
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

Add total time to profiler. #278

Merged
merged 3 commits into from
Oct 26, 2019
Merged
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
12 changes: 11 additions & 1 deletion src/Resources/public/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

}

#gb_profiler .gb_request {
#gb_profiler .gb_request, #gb_profiler .gb_overview {
width: 100%;
margin-bottom: 7px;
border-radius: 6px;
Expand Down Expand Up @@ -87,6 +87,16 @@
border-radius: 4px;
}

#gb_profiler .gb_overview,
#gb_profiler .gb_overview h2,
#gb_profiler .gb_overview table,
#gb_profiler .gb_overview table tr,
#gb_profiler .gb_overview table th,
#gb_profiler .gb_overview table td {
border: 1px solid #c3d9ec;
background-color: #e7f0f7;
}

#gb_profiler .gb_request.gb_request--get,
#gb_profiler .gb_request.gb_request--get h3,
#gb_profiler .gb_request.gb_request--get table,
Expand Down
17 changes: 17 additions & 0 deletions src/Resources/views/profiler.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@
</p>
{% else %}
<div id="gb_profiler">
<h2>Overview</h2>
<div class="gb_overview">
<div class="gb_content">
<table>
<tr>
<th>Total time</th>
<td>
{% if collector.totalTime > 1.0 %}
<span>{{ '%0.2f'|format(collector.totalTime) }} s</span>
{% else %}
<span>{{ '%0.0f'|format(collector.totalTime * 1000) }} ms</span>
{% endif %}
</td>
</tr>
</table>
</div>
</div>
{% for group in collector.logs %}
<h2>Group {{ group.requestName }}</h2>

Expand Down