3

Tideways is a PHP profiling extension (further development of XHProf, working with PHP 7) and provides also on tideways.io a service for analyzing the profiling results.

Currently I don't need the web GUI and want to use for a PHP 7 project a combination Tideways PHP module & XHProf UI.

I installed the module as described in the installation manual:

echo 'deb http://s3-eu-west-1.amazonaws.com/qafoo-profiler/packages debian main' > /etc/apt/sources.list.d/tideways.list
wget -qO - https://s3-eu-west-1.amazonaws.com/qafoo-profiler/packages/EEB5E8F4.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install tideways-php tideways-daemon

moved the automatically created tideways.ini from /etc/php/7.0/mods-available to /etc/php/mods-available, make a symlink to it in the FPM conf.d folder (ln -s /etc/php/mods-available/tideways.ini /etc/php/7.0/fpm/conf.d/20-tideways.ini), and configured as follows:

extension=tideways.so
;tideways.api_key=
tideways.sample_rate=25
tideways.framework=zend2
tideways.auto_prepend_library=0

Btw. I'm wondering, that there is no config key for the output target (Like xdebug.profiler_output_dir for the Xdebug Profiler). Is is a hardcoded value? Where is the output saved?

The extension seems to be installed and ready for using:

enter image description here

How to start using the Tideways PHP Profiler Extension?

automatix
  • 14,018
  • 26
  • 105
  • 230

1 Answers1

4

If you want to use the extension without the product (which you should think about again, the smallest plan at 49€/month are a great deal compared to setting this up yourself and maintaining it) then you need to write some code yourself.

At the end of a request, when you call $data = tideways_disable(); you need to store this information on disk in the same format that xhprof UI requires. See this page on our website with more details on how to get this working: https://tideways.io/profiler/xhprof-for-php7-php5.6

beberlei
  • 192
  • 1
  • 5
  • 1
    Thank you for this. The projects own documentation contains incorrect commands (i.e. `tideways_xhprof_enable()` and `tideways_xhprof_disable()`) which meant all I could ever get was fatal errors. Remove the `_xhprof` token and it all works :) – Mala Feb 15 '18 at 03:58
  • yes, we have seprated the tideways extension that works with our SaaS and the xhprof only extension from each other. This is why our documentation shows the new `tideways_xhprof_enable()` which is available from this PHP extension: https://github.com/tideways/php-xhprof-extension – beberlei Feb 16 '18 at 07:59