< Day Day Up > |
Profiling RT code is simple if you use the standalone HTTP server that comes with RT. [*] Profiling requires the following steps:
The last step requires that we add a simple extra top-level Mason component, which we will call exit.html. Place this in local/html under your RT installation directory. The component should look like this: % exit; Of course, this is not something you want in a production installation, since it would let anyone abort a process with a simple HTTP request. To start the standalone server with profiling turned on, run it as, /path/to/perl -d:DProf /path/to/standlone_httpd. Then run the same request many times. To exit, simply call the exit.html component, which should be available via a URL of /exit.html. When the process exits, the Perl profiler leaves behind a file tmon.out. Use the dprofpp script to see the results of the profiling in various formats. If you have RT's development mode turned on, you may want to turn it off when profiling, as development mode adds non-trivial overhead to each request that is not present in a production environment. |
< Day Day Up > |