admin管理员组文章数量:1305115
I'd like to measure the PHP page generation time for my Wordpress sites, preferrably without any plugin.
Which PHP files would you edit to do this?
I was thinking about adding this in index.php
:
<?php
$generation_time_start = microtime(true);
and in the footer.php
(add in very small text font with CSS)
<?php
$generation_time_end = microtime(true);
echo ($generation_time_end - $generation_time_start)*1000;
Is this a reliable way to measure the page generation time?
How would you do it?
本文标签: performanceHow do you measure the PHP generation time of your Wordpress pages
版权声明:本文标题:performance - How do you measure the PHP generation time of your Wordpress pages? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741797801a2398039.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论