# vim 查看果然没有配置 手动添加 `extension = /opt/remi/php72/root/usr/lib64/php/modules/tideways_xhprof.so`
$ vim /etc/opt/remi/php72/php.ini
# 再次检查扩展 已安装成功 $ php -m |grep -i xhprof
# 检查扩展版本 $ php --ri tideways_xhprof
tideways_xhprof
Version => 5.0.0 Clock Source => clock_gettime
Tideways is a PHP Profiler, Monitoring and Exception Tracking Software.
The 'tideways_xhprof' extension provides a subset of the functionality of our commercial Tideways offering in a modern, optimized fork of the XHProf extension from Facebook as open-source. (c) Tideways GmbH 2014-2017, (c) Facebook 2009
Register for a free trial on https://tideways.io
使用 tideways_xhprof
也比较简单,在onRequest回调最开始一行输入:(表示开启分析)
if (function_exists('tideways_xhprof_enable') && function_exists('tideways_xhprof_swoole_init')) {
// todo XHPROF 监控 代码 @tideways_xhprof_swoole_init();