Commit 78883095 by Taylor Otwell

Merge pull request #1663 from neoascetic/anbu_fix

Fix bug in ANBU that cause wrong total time showing on SQL tab
parents d293f9c6 a2cafaa3
...@@ -309,7 +309,7 @@ class Connection { ...@@ -309,7 +309,7 @@ class Connection {
*/ */
protected function log($sql, $bindings, $start) protected function log($sql, $bindings, $start)
{ {
$time = number_format((microtime(true) - $start) * 1000, 2); $time = (microtime(true) - $start) * 1000;
Event::fire('laravel.query', array($sql, $bindings, $time)); Event::fire('laravel.query', array($sql, $bindings, $time));
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
@foreach ($queries as $query) @foreach ($queries as $query)
<tr> <tr>
<td class="anbu-table-first"> <td class="anbu-table-first">
{{ $query[1] }}ms {{ number_format($query[1], 2) }}ms
</td> </td>
<td> <td>
<pre>{{ $query[0] }}</pre> <pre>{{ $query[0] }}</pre>
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<a data-anbu-tab="anbu-sql" class="anbu-tab" href="#">SQL <a data-anbu-tab="anbu-sql" class="anbu-tab" href="#">SQL
<span class="anbu-count">{{ count($queries) }}</span> <span class="anbu-count">{{ count($queries) }}</span>
@if (count($queries)) @if (count($queries))
<span class="anbu-count">{{ array_sum(array_map(function($q) { return $q[1]; }, $queries)) }}ms</span> <span class="anbu-count">{{ number_format(array_sum(array_pluck($queries, '1')), 2) }}ms</span>
@endif @endif
</a> </a>
</li> </li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment