Browse Source

Added total SQL execution time to profiler.

Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
Taylor Otwell 12 years ago
parent
commit
fe36d7fdfb
2 changed files with 9 additions and 1 deletions
  1. 1 0
      laravel/profiling/profiler.css
  2. 8 1
      laravel/profiling/template.blade.php

+ 1 - 0
laravel/profiling/profiler.css

@@ -180,6 +180,7 @@ background-position:5px -8px;
 
 
 span.anbu-count
 span.anbu-count
 {
 {
+	text-transform: none !important;
 	margin-left:0.5em !important;
 	margin-left:0.5em !important;
 	background-color:#555 !important;
 	background-color:#555 !important;
 	display:inline-block !important;
 	display:inline-block !important;

+ 8 - 1
laravel/profiling/template.blade.php

@@ -53,7 +53,14 @@
 
 
 	<ul id="anbu-open-tabs" class="anbu-tabs">
 	<ul id="anbu-open-tabs" class="anbu-tabs">
 		<li><a data-anbu-tab="anbu-log" class="anbu-tab" href="#">Log <span class="anbu-count">{{ count($logs) }}</span></a></li>
 		<li><a data-anbu-tab="anbu-log" class="anbu-tab" href="#">Log <span class="anbu-count">{{ count($logs) }}</span></a></li>
-		<li><a data-anbu-tab="anbu-sql" class="anbu-tab" href="#">SQL <span class="anbu-count">{{ count($queries) }}</span></a></li>
+		<li>
+			<a data-anbu-tab="anbu-sql" class="anbu-tab" href="#">SQL 
+				<span class="anbu-count">{{ count($queries) }}</span>
+				@if (count($queries))
+				<span class="anbu-count">{{ array_sum(array_map(function($q) { return $q[1]; }, $queries)) }}ms</span>
+				@endif
+			</a>
+		</li>
 		<li class="anbu-tab-right"><a id="anbu-hide" href="#">&#8614;</a></li>
 		<li class="anbu-tab-right"><a id="anbu-hide" href="#">&#8614;</a></li>
 		<li class="anbu-tab-right"><a id="anbu-close" href="#">&times;</a></li>
 		<li class="anbu-tab-right"><a id="anbu-close" href="#">&times;</a></li>
 		<li class="anbu-tab-right"><a id="anbu-zoom" href="#">&#8645;</a></li>
 		<li class="anbu-tab-right"><a id="anbu-zoom" href="#">&#8645;</a></li>