Package Data | |
---|---|
Maintainer Username: | REZ1DENT3 |
Maintainer Contact: | info@babichev.net (Babichev Maxim) |
Package Create Date: | 2019-05-27 |
Package Last Update: | 2024-08-02 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-14 15:04:03 |
Package Statistics | |
---|---|
Total Downloads: | 149,079 |
Monthly Downloads: | 403 |
Daily Downloads: | 24 |
Total Stars: | 20 |
Total Watchers: | 3 |
Total Forks: | 10 |
Total Open Issues: | 2 |
Laravel XHProf - Library for profiling in production.
5.5
, 5.6
, 5.7
, 5.8
, 6.0
, 7.0
, 8.0
composer require bavix/laravel-xhprof
pecl install xhprof
extension=xhprof.so
xhprof.output_dir=/tmp/xhprof
sudo systemctl restart fp2-php72-fpm.service
php -i | grep xhprof
Result:
/opt/php72/conf.d/xhprof.ini,
xhprof
xhprof support => enabled
xhprof.collect_additional_info => 0 => 0
xhprof.output_dir => /tmp/xhprof => /tmp/xhprof
xhprof.sampling_depth => 2147483647 => 2147483647
xhprof.sampling_interval => 100000 => 100000
Add domain for view results profiling (xhprof.domain.ru).
Download library for view:
cd /var/www/xhprof.domain.ru;
wget http://pecl.php.net/get/xhprof-0.9.4.tgz
gzip -d xhprof-0.9.4.tgz
tar -xvf xhprof-0.9.4.tar
Change root path in Nginx config for this domain:
set $root_path /var/www/xhprof.domain.ru/xhprof-0.9.4/xhprof_html;
Install this package:
composer req bavix/laravel-xhprof --dev
config
dir (if empty):<?php
return [
'path' => base_path('../xhprof.domain.ru/xhprof-0.9.4'),
'enabled' => true,
'freq' => 1
];
If you have old laravel (<=5.4), register the service provider by add this line \Bavix\XHProf\XHProfServiceProvider::class
in your /config/app.php
.
If laravel 5.5 and older then skip this step.
Reload page Laravel site and go to xhprof.domain.ru
Enjoy!
I wrote the instructions @wdda, thank you.
Supported by