I'm having an execution time problem and recall a friend mentioning some tool that analyses your PHP and reports on timings for each bit, effectively showing you where all the time is being sucked up. Does this ring any bells with anyone? Any tools known of out there to do this? Any help appreciated. Jon
I'm not sure about an external tool, but I've been using the following code (I didn't write it myself, it came from somewhere and I've forgotten where so unfortunately can't give credit): function getmicrotime(){ list($usec, $sec) = explode(' ',microtime()); return ((float)$usec + (float)$sec); } $start = getmicrotime(); // Code to be executed echo 'Execution time was '.round(getmicrotime() - $start, 4).' seconds.'; Code (markup): Instead of echoing, the information could be stored in a text file, stored in a database, or emailed to you.
I use similar code to that above and echo the results using html comments like this: <!-- execution time --> HTML: Brew
For such things there are tools called Stress tools, you can find one most populare is Apache JMeter - jakarta.apache.org/jmeter/