Re: Speed tests? RAM usage displays?

From: Date: Thu, 20 Jun 2002 21:38:59 +0000
Subject: Re: Speed tests? RAM usage displays?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-103208@lists.php.net to get a copy of this message
Hi! Thursday, June 20, 2002, 10:56:40 PM, you wrote: PS> Is there any way to determine script's memory usage? When you configure and compile you have some option --with-memory-limit something like that and then add \"%{mod_php_memory_usage}n\" in you http.conf of Apache where you define how log files look like. PS> What about execution time in ms (with breakpoints)? PS> And is there way to measure MySQL query speed in ms? u can use microtime function function getMicrotime() { list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); } in your head of your script than call: $start = getMicrotime(); and then in the end of script $stop = getMicrotime(); $diff = $stop - $start; echo "Execution time was: ".$diff; You can also use Benchmark module from PEAR there is also support for markers. -- lp, Uros mailto:uros.gruber@sir-mag.com

« previous php.general (#103208) next »