Skip to content

Commit

Permalink
Add total time to profiler. (#278)
Browse files Browse the repository at this point in the history
[Profiler] Add total time to profiler.
  • Loading branch information
RageZBla authored and gregurco committed Oct 26, 2019
1 parent 51a9b7c commit 11814ce
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
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

0 comments on commit 11814ce

Please sign in to comment.