Skip to content

Commit

Permalink
Layout: Also show how much time the web server took
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-schindler committed May 12, 2023
1 parent 892be62 commit 56af2cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/views/base/LayoutView.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ public function render(): void
</main>

<footer>
<p>generated in <?= number_format((microtime(true) - $GLOBALS['start']) * 1000, 2) ?> ms</p>
<?php
$executionTime = (microtime(true) - $GLOBALS['start']) * 1000;
$timeSinceReq = ($GLOBALS['start'] - $_SERVER['REQUEST_TIME_FLOAT']) * 1000
?>
<p>generated in <?= number_format($executionTime, 2) ?> ms ; server ate <?= number_format($timeSinceReq, 2) ?> ms</p>
</footer>
</body>

Expand Down

0 comments on commit 56af2cf

Please sign in to comment.