Skip to content

Instantly share code, notes, and snippets.

@dylanwh
Last active June 16, 2017 19:38
Show Gist options
  • Save dylanwh/24ca1598675d5fef0c12a81f1d8fca8d to your computer and use it in GitHub Desktop.
Save dylanwh/24ca1598675d5fef0c12a81f1d8fca8d to your computer and use it in GitHub Desktop.

edit the httpd config and add

PerlModule Devel::NYTProf::Apache

then restart apache

perform some requests (ideally, the same request a bunch of times)

then stop apache

there should be a bunch of files in /tmp, with names like nytprof.*.out.*. Delete the file whose owner is root. Note that the first * should be the same number, remember that as $FOO.

Then run

nytprofmerge nytprof.$FOO.out.*
nytprofhtml -f nytprof-merged.out

this will produce a directory "nytprof/". Copy that somewhere and open its index.html in a browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment