File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ public function getContents() : string
61
61
return \ob_get_clean (); // @phpstan-ignore-line
62
62
}
63
63
$ count = \count ($ this ->getData ()); ?>
64
- <p>Ran <?= $ count ?> statement<?= $ count === 1 ? '' : 's ' ?> :</p>
64
+ <p>Ran <?= $ count ?> statement<?= $ count === 1 ? '' : 's ' ?>
65
+ in <?= $ this ->getStatementsTime () ?> ms:
66
+ </p>
65
67
<table>
66
68
<thead>
67
69
<tr>
@@ -92,6 +94,16 @@ public function getContents() : string
92
94
return \ob_get_clean (); // @phpstan-ignore-line
93
95
}
94
96
97
+ protected function getStatementsTime () : float
98
+ {
99
+ $ time = .0 ;
100
+ foreach ($ this ->getData () as $ data ) {
101
+ $ total = $ data ['end ' ] - $ data ['start ' ];
102
+ $ time += $ total ;
103
+ }
104
+ return Debugger::roundSecondsToMilliseconds ($ time );
105
+ }
106
+
95
107
protected function showHeader () : string
96
108
{
97
109
$ config = $ this ->database ->getConfig ();
You can’t perform that action at this time.
0 commit comments