php page generation time
by Gabi SolomonAfter a few tinkering i wrote this bit of code that i use on almost all my websites to determine the page generation time. It's relatively simple but it does the job. you just call the function once at the begining of the script and once at the end .... end voila
.
PHP:
-
function script_generation ( $round = 7 ) {
-
} else {
-
$GLOBALS['script_start_time'] = $usec + $sec;
-
}
-
}// FUNCTION USAGE
-
script_generation();
-
$gen_time=script_generation ( 5 );
-
echo "This script took $time seconds to generate";

