Hide your secret files INSIDE photos, videos or other files with OmniHide PRO.

PHP Performance Benchmark Script

Topics

/*

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>" ;

?>
 
Discover upcoming movies
 

2 responses to “PHP Performance Benchmark Script”

  1. verriosasu says:

    genius.

 
 

We’re on Hostgator and we love it

Use coupon BLOGULATE994 and get 9.94$ flat off from any hosting package of your choice!

We're on Hostgator and are extremely happy with the service. Never down, cheap and powerful servers!
Use coupon BLOGULATE994 and get 9.94$ flat off from any hosting package of your choice!

Search Blogulate

Categories