「Php/速度改善/XHProf/php7」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→php7でXHProfは現在(2016/2/17)まだ未対応) |
(→xhprof_htmlとxhprof_lib) |
||
(同じ利用者による、間の3版が非表示) | |||
行6: | 行6: | ||
git clone https://github.com/Yaoguais/phpng-xhprof.git | git clone https://github.com/Yaoguais/phpng-xhprof.git | ||
cd phpng-xhprof | cd phpng-xhprof | ||
− | phpize | + | /path/to/php7/bin/phpize |
− | ./configure | + | ./configure --with-php-config=/path/to/php7/bin/php-config |
make | make | ||
make test | make test | ||
sudo make install | sudo make install | ||
− | == | + | ==xhprofのextention追加== |
$ vi /etc/php.d/xhprof.ini | $ vi /etc/php.d/xhprof.ini | ||
[xhprof] | [xhprof] | ||
行25: | 行25: | ||
PWD => /usr/local/src/phpng-xhprof | PWD => /usr/local/src/phpng-xhprof | ||
$_SERVER['PWD'] => /usr/local/src/phpng-xhprof | $_SERVER['PWD'] => /usr/local/src/phpng-xhprof | ||
+ | |||
+ | ==xhprof_htmlとxhprof_lib== | ||
+ | $ composer require facebook/xhprof dev-master | ||
+ | $ cp -R vendor/facebook/xhprof/xhprof_html/ ./ | ||
+ | $ cp -R vendor/facebook/xhprof/xhprof_lib/ ./ | ||
==参考== | ==参考== | ||
http://qiita.com/morisuke/items/49f17bda2c764ae8f725 | http://qiita.com/morisuke/items/49f17bda2c764ae8f725 |
2018年5月17日 (木) 17:26時点における最新版
目次
php7についてXHProfは公式では現在(2016/2/17)まだ未対応
非公式っぽいライブラリがあるようなのでそれを導入
インストール
cd /usr/local/src git clone https://github.com/Yaoguais/phpng-xhprof.git cd phpng-xhprof /path/to/php7/bin/phpize ./configure --with-php-config=/path/to/php7/bin/php-config make make test sudo make install
xhprofのextention追加
$ vi /etc/php.d/xhprof.ini [xhprof] extension=phpng_xhprof.so xhprof.output_dir = /tmp/xhprof
確認
php -r "phpinfo();" | grep xhprof /etc/php.d/xhprof.ini xhprof xhprof => 0.9.5 PWD => /usr/local/src/phpng-xhprof $_SERVER['PWD'] => /usr/local/src/phpng-xhprof
xhprof_htmlとxhprof_lib
$ composer require facebook/xhprof dev-master $ cp -R vendor/facebook/xhprof/xhprof_html/ ./ $ cp -R vendor/facebook/xhprof/xhprof_lib/ ./