-
Notifications
You must be signed in to change notification settings - Fork 555
Proposal to add PageGen time to each page #440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
UPdate footer creation as follows: <footer>
<div class="container footer-content">
<div class="row-fluid">
<ul class="footmenu">
<li><a href="/copyright.php">Copyright © 2001-2021 The PHP Group</a></li>
<li><a href="/my.php">My PHP.net</a></li>
<li><a href="/contact.php">Contact</a></li>
<li><a href="/sites.php">Other PHP.net sites</a></li>
<li><a href="/privacy.php">Privacy policy</a></li>
<li><a href="https://github.com/php/web-php/blob/master/manual%2Fen%2Ffunction.random-inc.php">View Source</a></li>
<li>(PageGen 0.736984 Seconds)</li>
</ul>
</div>
</div>
</footer> |
In every file (unless it can be batched with included) //PageGen
$tt = microtime(true); And, at the conclusion of the page generation, as practical as possible, <li>(PageGen <?php $tt = number_format(rtrim(sprintf("%.20f", (microtime(true) - $tt)), "0"),6,'.',',');
echo $tt; ?> Seconds)</li> |
Ideally, this would have six decimal places if less than one second, and two decimals if more than one second. |
Or, usiung the new method place this code as near as practical to the conclusion of page generation. <li>(PageGen <?php $tt = number_format(rtrim(sprintf("%.20f", (microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'])), "0"),6,'.',',');
if (strpos(($tt."0"), "0") != 0) {
$tt = number_format($tt,2,'.',',');
}
echo $tt; ?> Seconds)</li> |
Why? Are there any other popular sites which still do this? |
No, thanks. |
Sure, but if there are more front page results. This site had #1 position sometimes and front page always. We had these sorts of products here also with ESET |
I also don't see a good reason to expose page timings. |
For various reasons including search indexing and server performance include PageGen time in the footer of each generated page.
The text was updated successfully, but these errors were encountered: