Skip to content

Commit

Permalink
Fix error when query time is above 999ms (#29)
Browse files Browse the repository at this point in the history
* fix: error when query time is above 999ms

* fix: error when query time is above 999ms
  • Loading branch information
cyrildewit authored Mar 16, 2020
1 parent 4f108dc commit 0992ca4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/views/collectors/queries.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
if ($query->content['slow'] ?? false) {
$num_slow++;
}
$query_time += $query->content['time'] ?? 0;
$query_time += (float) str_replace(',', '', $query->content['time']) ?? 0;
$queries[$query->content['hash'] ?? $query->content['sql']] = $query->content['sql'];
}

Expand Down Expand Up @@ -57,7 +57,7 @@
</td>

<td title="{{ $path }}:{{ $query->content['line'] }}">
{{ number_format($query->content['time'], 2) }}ms<br/>
{{ number_format((float) str_replace(',', '', $query->content['time']), 2) }}ms<br/>
<small>{{ strlen($path) > 32 ? '..' . substr($path, -30) : $path }}:{{ $query->content['line'] }}</small>
</td>
</tr>
Expand Down

0 comments on commit 0992ca4

Please sign in to comment.