Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9a0201d

Browse filesBrowse files
committed
Merge branch 'development'
2 parents 1196b3d + 04c399a commit 9a0201d
Copy full SHA for 9a0201d

1 file changed

+13-1Lines changed: 13 additions & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/Debug/DatabaseCollector.php‎

Copy file name to clipboardExpand all lines: src/Debug/DatabaseCollector.php
+13-1Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ public function getContents() : string
6161
return \ob_get_clean(); // @phpstan-ignore-line
6262
}
6363
$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>
6567
<table>
6668
<thead>
6769
<tr>
@@ -92,6 +94,16 @@ public function getContents() : string
9294
return \ob_get_clean(); // @phpstan-ignore-line
9395
}
9496

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+
95107
protected function showHeader() : string
96108
{
97109
$config = $this->database->getConfig();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.