in reply to Profiling/Benchmarking web applications

For quick and dirty profiling, I usually just add a -d:DProf switch to my web scripts in the first line, as:

#!/usr/bin/perl -d:DProf # my usual cgi script #

After cgi execution, you will find the usual `tmon.out' in the same folder as your cgi script.

Might be a good idea to run your httpd server in single process mode (-X for apache).

Replies are listed 'Best First'.
Re^2: Profiling/Benchmarking web applications.
by jryan (Vicar) on Aug 25, 2004 at 05:18 UTC

    Ah, thanks! I can't believe I didn't think of doing that. I'm always so used to invoking it from the command line. I feel pretty stupid now!

Re^2: Profiling/Benchmarking web applications.
by Anonymous Monk on Aug 25, 2004 at 11:45 UTC
    The -x option is a good one. Another is to make a tmon.out FIFO. Then have a perl script or something read from the pipe and write out the output to a new name.

      Could someone explain how this would help ? Writing to a file or writing to a FIFO which is read by a script that writes to a file basically just puts the output into a file. What am I missing ?