elXHProfPlugin - 1.0.0

Integration of XHProf profiler

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source

elXHProf plugin

The elXHProfPlugin is a plugin to ease the use of XHProf profiler.

It allows developers to easily profile code blocks thanks to a simple API.

This plugin also integrates XHProf runs into the web debug toolbar to see and compare them in a simple way.

This work was originaly realized for PMSIpilot.



  • Install the plugin

     $ symfony plugin:install elXHProfPlugin
  • Deploy web dir by copying elXHProfPlugin/web content into sf_web_dir/elXHProfPlugin or executing the following command

     $ symfony plugin:publish-assets

How to profile

$run = new XHProfRun('namespace');
// Code to profile

The namespace allows you to group multiple runs.

How to view/compare the results

The links to the runs results are available in the web debut toolbar. They are grouped by namespace and a distinguished by whether the runs have been done in the current PHP process or in previous processes.

You can compare 2 runs by checking them and clicking on the Compare button.


  • Ability to delete runs from debug toolbar