Page Generation Time (your thoughts?)
| From: | Cosenza, Mario | Date: | Tue, 08 Aug 2000 18:14:19 +0000 |
| Subject: | Page Generation Time (your thoughts?) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10746@lists.php.net to get a copy of this message | ||
Is microtime() the best way to calculate the page generation time?
Considering there are a lot of DB calls, included files, etc. I was
wondering how long it took to build the page.
I (basically) did the following...
$start=explode(" ", microtime());
<HTML>
...a bunch of DB calls & PHP code & HTML code...
</HTML>
$finish=explode(" ", microtime());
echo "Page Generated in" . $finish[0]-$start[0] . "seconds";
Is this the best (most accurate) way to do this?
All the DB calls, includes, etc. should be completed by the end of the page,
right?
Thanks,
Mario