perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "E R" <>
Subject Re: simple profiling capability
Date Mon, 12 Nov 2007 20:25:38 GMT
On Nov 12, 2007 11:25 AM, Jonathan Vanasco <> wrote:
> i'm just tossing this idea out...

Thanks for the ideas. The main issue I'm trying to find a good
solution for is the collection of the profiling info from all the
child processes because occasionally I want to poll the stats in real
time to see what they are.

The more I think about it, the more I think this might be a good solution:

1. a call to $profile->mark(...) will emit a special record to the log file
2. on server start up, spawn a single process to monitor the log file
and collect profile records
3. have the monitoring process listen on a socket for requests for the info
4. implement some method of keeping the monitoring process alive

I especially like the idea that logging won't lock up the httpd process.
And Apache makes sure that log writes are atomic, right?
Log files can get rolled, but a period check on the inode can detect
that, right?

Has something like this been implemented already?

View raw message