Devstack » Articles » Code-Profiling Apache2::ASP

Code-Profiling Apache2::ASP

Code-Profiling is an excellent way to identify slow-running code so that you can take a shot at improving application performance.

This is an example of the kind of report you will get:
Devel::NYTProf with Apache2::ASP

To perform code-profiling on your Apache2::ASP web application, first install the excellent Devel::NYTProf.

After you have installed Devel::NYTProf, cd to your application root and execute the following:

rm -rf nytprof
HARNESS_PERL_SWITCHES=-MDevel::NYTProf prove -r t/
nytprofhtml

A new directory named nytprof will be there with several files inside.

Copy the entire folder into your htdocs directory so you can view the files, and then navigate to index.html to view your report.