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:[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php