Tideways is a modern fork of XHProf for PHP 5 and PHP 7
The PHP Profiling Extension XHProf was released by Facebook in 2009 in combination with a very simple UI. It was built for profiling production traffic. Today it is unmaintained because Facebook now runs on HHVM and not on Zend's PHP anymore.
The following changes have been made to the hierachical profiler feature:
- Support for PHP 7.2, 7.1, 7.0, 5.6 and 5.5 (fixed segfaults).
- Increased performance and timestamp reliability on Linux.
- Renamed functions but kept API similar. Extension is not a drop-in replacement, but data-format is still 100% compatible with XHProf.
Self-hosted Tideways (free)
You can install Tideways PHP Extension in various ways, it is not necessary to have an account for the Tideways product.
We recommend to use our pre-compiled packages for Debian, Ubuntu, CentOS, RHEL and MacOS. You can find them on the downloads page.
If you want to compile the extension yourself you can head over to the Github repository and download the source from there. You can install the extension using the usual steps:
$ git clone https://github.com/tideways/php-profiler-extension.git $ cd php-profiler-extension $ phpize $ ./configure $ make $ sudo make install
As for integration of Tideways into your application you can use the low-level API to enable and disable the Profiler, much like XHProf worked:
<?php tideways_enable(TIDEWAYS_FLAGS_NO_SPANS); // your application code $data = tideways_disable(); file_put_contents( sys_get_temp_dir() . "/" . uniqid() . ".yourapp.xhprof", serialize($data) );
This stores the trace in your temporary directory which the
default UI uses to look for data.
xhprof_html directories from
this repository into your webfolder and navigate to
to see a list of trace.
If you want to use some improved open-source UIs take a look at the following projects:
Please check each projects installation notes on how to get the respective UIs running.
Try Our PHP Profiler, Application Monitoring & Exception Tracking for 30 days
We have built a new intuitive and modern UI around XHProf and enhanced it with additional monitoring and exception tracking features in a single tool for PHP application performance management.
The cloud version of Tideways includes SQL Profiling and many additional features that Facebooks Xhprof does not.
If you want to avoid the manual setup, integration and maintenance, then give our Tideways Profiler Cloud version a try. We take care of efficient collection, aggregation and provide a snappy, modern UI combined with many additional features such as Alerting on top.
You can try the Tideways Profiler UI 30 days for free, no credit-card required: