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
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 rss,com
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 t
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 I'm
4 matches
Mail list logo