Profiling setup
Install xdebug (see Stack installation on CentOS 5)
Configure with the option:
xdebug.profiler_enable_trigger = 1Do not enable any other profiling option.
Install
cg2dot.py(via xdebugtoolkit)Install
graphvizInstall
ghostscript
Running load tests
Clear out CacheGrind results from
/tmp.Make a single request:
ab -n 1 -c 1 [url]&XDEBUG_PROFILE=1CacheGrind output will be on
/tmp.
Processing results
Initial setup (do this once):
svn co http://xdebugtoolkit.googlecode.com/svn/tags/0.1.5/xdebugtoolkit/ ~/xdebugtoolkit echo "export PATH=~/xdebugtoolkit:$PATH" >> ~/.bashrcConvert the cachegrind output to a
.dotfile:cg2dot.py cachegrind.out.XYZ > cg.dotConvert the
.dotfile into PDF-compatible PostScript:dot cg.dot -Tsvg -ocg.svgThe SVG will be named
cg.svg.