Skip to content

Commit d75bd30

Browse files
committed
Show time as milliseconds
1 parent 59366a1 commit d75bd30

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

phpmd.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<!-- cleancode -->
44
<rule ref="rulesets/cleancode.xml">
55
<exclude name="BooleanArgumentFlag"/>
6+
<exclude name="StaticAccess"/>
67
</rule>
78
<!-- codesize -->
89
<rule ref="rulesets/codesize.xml/TooManyPublicMethods">

src/Debug/DatabaseCollector.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
use Framework\Database\Database;
1313
use Framework\Debug\Collector;
14+
use Framework\Debug\Debugger;
1415

1516
/**
1617
* Class DatabaseCollector.
@@ -65,7 +66,7 @@ public function getContents() : string
6566
<thead>
6667
<tr>
6768
<th>#</th>
68-
<th title="Seconds">Time</th>
69+
<th title="Milliseconds">Time</th>
6970
<th>Statement</th>
7071
<th title="Affected rows or Rows in set">Rows</th>
7172
</tr>
@@ -74,7 +75,7 @@ public function getContents() : string
7475
<?php foreach ($this->getData() as $index => $item): ?>
7576
<tr>
7677
<td><?= $index + 1 ?></td>
77-
<td><?= \round($item['end'] - $item['start'], 6) ?></td>
78+
<td><?= Debugger::roundSecondsToMilliseconds($item['end'] - $item['start']) ?></td>
7879
<td>
7980
<pre><code class="language-sql"><?=
8081
\htmlentities($item['statement'])

0 commit comments

Comments
 (0)