Skip to content

Commit fe36d7f

Browse files
committed
Added total SQL execution time to profiler.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
1 parent 01a7991 commit fe36d7f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

laravel/profiling/profiler.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ background-position:5px -8px;
180180

181181
span.anbu-count
182182
{
183+
text-transform: none !important;
183184
margin-left:0.5em !important;
184185
background-color:#555 !important;
185186
display:inline-block !important;

laravel/profiling/template.blade.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,14 @@
5353

5454
<ul id="anbu-open-tabs" class="anbu-tabs">
5555
<li><a data-anbu-tab="anbu-log" class="anbu-tab" href="#">Log <span class="anbu-count">{{ count($logs) }}</span></a></li>
56-
<li><a data-anbu-tab="anbu-sql" class="anbu-tab" href="#">SQL <span class="anbu-count">{{ count($queries) }}</span></a></li>
56+
<li>
57+
<a data-anbu-tab="anbu-sql" class="anbu-tab" href="#">SQL
58+
<span class="anbu-count">{{ count($queries) }}</span>
59+
@if (count($queries))
60+
<span class="anbu-count">{{ array_sum(array_map(function($q) { return $q[1]; }, $queries)) }}ms</span>
61+
@endif
62+
</a>
63+
</li>
5764
<li class="anbu-tab-right"><a id="anbu-hide" href="#">&#8614;</a></li>
5865
<li class="anbu-tab-right"><a id="anbu-close" href="#">&times;</a></li>
5966
<li class="anbu-tab-right"><a id="anbu-zoom" href="#">&#8645;</a></li>

0 commit comments

Comments
 (0)