Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Profiling setup

  • Install xdebug (see Stack installation on CentOS 5)
    • Configure with the option:
      xdebug.profiler_enable_trigger = 1
      
    • Do not enable any other profiling option.
  • Install cg2dot.py (via xdebugtoolkit)
  • Install graphviz
  • Install ghostscript

Running load tests

  • Clear out CacheGrind results from /tmp.
  • Make a single request:
    ab  -n 1 -c 1 [url]&XDEBUG_PROFILE=1
    
  • CacheGrind output will be on /tmp.

Processing results

  1. Initial setup (do this once):
    svn co http://xdebugtoolkit.googlecode.com/svn/tags/0.1.4/xdebugtoolkit/ ~/xdebugtoolkit
    echo "export PATH=~/xdebugtoolkit:$PATH" >> ~/.bashrc
    
  2. Convert the cachegrind output to a .dot file:
    cg2dot.py cachegrind.out.XYZ > cg.dot
    
  3. Convert the .dot file into PDF-compatible PostScript:
    dot cg.dot -Tps2 -ocg.ps
    
  4. Convert the PostScript into a PDF:
    ps2pdf13 cg.ps
    
  5. The PDF will be named cg.pdf.
  • No labels