On Tue, 22 Aug 2000, Lupe Christoph wrote:

> On Monday, 2000-08-21 at 21:06:54 -0400, Greg Stark wrote:
> 
> > Lupe Christoph <[EMAIL PROTECTED]> writes:
> 
> > > Hmm. Apache::Benchmark sounds more like a benchmark driver to me.
> > > Apache::Instrumentation or so? Apache::Probe?
> 
> > Profile or even just Prof.

That would be misleading. A profiler is something much more sophisticated
and provides you a lot of information about the code that gets
executed. More over the Apache::DProf and Apache::SmallProf are already in
place.

> I thought about it a little more. What is does is find the
> (cpu|real)time taken to process a request. So what about
> Apache::RequestTimer or maybe Apache::Perf::RequestTimer, creating
> a new namespace for all performance-related modules?

Both sound good time, especially the second :)

> > What I think it needs is, a way to gather the statistics in a hash based on
> > the request. That way I can make a web page that pokes around in the hash
> > table and reports the average and maximum time taken by page.
> 
> I'd rather not collect the statistics inside the module. Not only can
> that inflate the process, it's also much better done seperately
> because this way you can write your own statistics processor without
> touching the gatherer.

true.

> I'll include a first shot at such a program in the next release.
> After the naming discussion has settled down.
> 
> > I'm not clear how or if that can be done in a separate module like this that
> > doesn't know how the requests are dispatched. Either a regexp needs to be
> > provided that returns the key to use for the hash, or else something similar
> > needs to be integrated into packages like CGI and Apache::ASP. (Which was the
> > approach I was planning on taking myself.) I like this approach better though,
> > so it would be neat to see it polished.
> 
> This times the entire request. I'll split the CPU times out in times
> for the Apache process and that for it and all it's children in the
> nect release to accomodate CGI. Can't do anything about FastCGI
> and such things that run independent of the Apache process.

If you are going to make it non-mod_perl specific (if I understand your
intentions correctly) you shouldn't put it under Apache:: tree.

> Is anybody running Apache+mod_perl under Win32 who could see if
> times() and Time::HiRes give you timings of any significance
> on that platform?
> 
> As for statistics, I'm thinking about splitting out the host
> first, second the method (GET, POST, etc), then the URI, with the
> request string removed, maybe the request strings under the URI
> at a later time.

A good advise would be to let the user to specify the format, following
for example the same format that one uses to specify log format in Apache,
may be with extra tokens, which are unavailable by Apache.

http://www.apache.org/docs/mod/mod_log_config.html

BTW, the time taken to server the request is already there: %...{format}t:

> Print the top <n> requests by user CPU, system CPU, realtime.
> Do that in plain text and HTML, with graphs later.

BTW, Apache::VMonitor does that this in the real time, for the last
request.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org


Reply via email to