PHP Profiler

  1. sudo apt-get install python-setuptools
  2. sudo easy_install xdebugtoolkit
  3. sudo apt-get install graphviz
  4. sudo apt-get install php5-xdebug
  5. [xdebug]
    xdebug.profiler_enable=1
    xdebug.profiler_enable_trigger=1
    xdebug.profiler_output_dir=/tmp/xdebug
  6. Add a trigger to a page you want to profiling
    http://example.com/file.php?XDEBUG_PROFILE=1
  7. cg2dot /tmp/cachegrind.out.7340 | dot -Tpng -o ~/xdebug-all.png
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s