Skip to content

Commit

Permalink
Show time as milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Jan 6, 2025
1 parent 59366a1 commit d75bd30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions phpmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- cleancode -->
<rule ref="rulesets/cleancode.xml">
<exclude name="BooleanArgumentFlag"/>
<exclude name="StaticAccess"/>
</rule>
<!-- codesize -->
<rule ref="rulesets/codesize.xml/TooManyPublicMethods">
Expand Down
5 changes: 3 additions & 2 deletions src/Debug/DatabaseCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Framework\Database\Database;
use Framework\Debug\Collector;
use Framework\Debug\Debugger;

/**
* Class DatabaseCollector.
Expand Down Expand Up @@ -65,7 +66,7 @@ public function getContents() : string
<thead>
<tr>
<th>#</th>
<th title="Seconds">Time</th>
<th title="Milliseconds">Time</th>
<th>Statement</th>
<th title="Affected rows or Rows in set">Rows</th>
</tr>
Expand All @@ -74,7 +75,7 @@ public function getContents() : string
<?php foreach ($this->getData() as $index => $item): ?>
<tr>
<td><?= $index + 1 ?></td>
<td><?= \round($item['end'] - $item['start'], 6) ?></td>
<td><?= Debugger::roundSecondsToMilliseconds($item['end'] - $item['start']) ?></td>
<td>
<pre><code class="language-sql"><?=
\htmlentities($item['statement'])
Expand Down

0 comments on commit d75bd30

Please sign in to comment.