Installing XHProf on ubuntu is quite easy using the following commands:
sudo pecl install xhprof-beta
Add the following to the end of /etc/php5/conf.d/xhprof.ini (you will need to create it):
And finally, restart apache:
sudo apachectl restart
XHProf is now installed, however you will need to install the Liip Magento module to trace requests. You can find their module on their github.
You can either add this module to your composer.json, or clone it into a temporary directory and copy it into your Magento folder:
git clone https://github.com/liip/magento-xhprof.git /path/to/tmp/directory cp -rf /path/to/tmp/dir /path/to/magento/directory
Clear your Magento cache and login to the Magento admin panel. XHProf is available under the ‘reports’ tab.