Re: [PHP] Determine overhead of PHP script.

2002-06-02 Thread Analysis Solutions
JH: On Sat, Jun 01, 2002 at 10:29:38PM -0400, John Holmes wrote: Is there a way to determine the overhead or memory usage of a PHP script as it runs? You could do some sort of exec() or system() type call. For example, on a NetBSD (and similar unix type machines) you can do ps -o

Re: [PHP] Determine overhead of PHP script.

2002-06-02 Thread Rasmus Lerdorf
PHP has a built-in mechanism for logging high-watermark memory usage by scripts. Make sure you compile PHP using --enable-memory-limit then you can modify your Apache LogFormat and stick %{mod_php_memory_usage}n in there somewhere which will be replaced with the peak memory usage for that script

[PHP] Determine overhead of PHP script.

2002-06-01 Thread John Holmes
Is there a way to determine the overhead or memory usage of a PHP script as it runs? What I'm looking at is say I've got this nice simple script to display info. Now I want to add a database abstraction layer and a template engine. Sure, this makes it easy for me to control changes, but now

Re: [PHP] Determine overhead of PHP script.

2002-06-01 Thread Bogdan Stancescu
It's more of a time-consuming issue rather than memory usage IMHO. However, unless you make several extra database requests, I found that running PHP code is generally rather fast and adding considerable extra code doesn't affect the speed significantly. I must reiterate however that if your