/*
PHP Performance Benchmark Script
Copyright 2003 : PHP Consulting
There are two settings:
First, set $file to be the server and page that you want to benchmark.
Secondly, set $iter to be the number of times you want it loaded.
*/
error_reporting(E_ALL ^ E_NOTICE); //For disabling non fatal error outputs
$file = "http://127.0.0.1/Joomla/index.php"; //Location to file
$iter = 5; //No of times to check
function getmtime()
{
$a = explode (' ',microtime());
return(double) $a[0] + $a[1];
}
for ($i = 0; $i < $iter; $i++)
{
$start = getmtime();
file ($file);
$loadtime += getmtime() - $start ;
$intertime = getmtime() - $start ;
echo $intertime . "<br>" ;
$avgload = $loadtime / $iter;
}
echo "<p><b>Average" . $avgload . "</b>" ;
?>
genius.