{"id":20543523,"url":"https://github.com/bavix/laravel-xhprof","last_synced_at":"2025-04-06T03:06:18.078Z","repository":{"id":54607955,"uuid":"188838428","full_name":"bavix/laravel-xhprof","owner":"bavix","description":"Laravel XHProf - Library for profiling in production.","archived":false,"fork":false,"pushed_at":"2025-03-16T13:32:24.000Z","size":86,"stargazers_count":22,"open_issues_count":1,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T21:16:03.075Z","etag":null,"topics":["laravel","laravel-xhprof","php","profile","profiler","profiling","profiling-library","xhprof"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bavix.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-27T12:22:41.000Z","updated_at":"2025-03-16T22:11:41.000Z","dependencies_parsed_at":"2024-02-23T17:00:47.021Z","dependency_job_id":"251c98b2-a063-4158-8149-c216ef136a53","html_url":"https://github.com/bavix/laravel-xhprof","commit_stats":{"total_commits":48,"total_committers":10,"mean_commits":4.8,"dds":0.5208333333333333,"last_synced_commit":"febf5510987f2e01e79d2f6832c5daad9556b97d"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bavix%2Flaravel-xhprof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bavix%2Flaravel-xhprof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bavix%2Flaravel-xhprof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bavix%2Flaravel-xhprof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bavix","download_url":"https://codeload.github.com/bavix/laravel-xhprof/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166990,"owners_count":20894834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","laravel-xhprof","php","profile","profiler","profiling","profiling-library","xhprof"],"created_at":"2024-11-16T01:38:24.967Z","updated_at":"2025-04-06T03:06:18.059Z","avatar_url":"https://github.com/bavix.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel XHProf\n\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/bavix/laravel-xhprof/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/bavix/laravel-xhprof/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/bavix/laravel-xhprof/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/bavix/laravel-xhprof/?branch=master)\n[![Build Status](https://scrutinizer-ci.com/g/bavix/laravel-xhprof/badges/build.png?b=master)](https://scrutinizer-ci.com/g/bavix/laravel-xhprof/build-status/master)\n[![Code Intelligence Status](https://scrutinizer-ci.com/g/bavix/laravel-xhprof/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence)\n\n[![Package Rank](https://phppackages.org/p/bavix/laravel-xhprof/badge/rank.svg)](https://packagist.org/packages/bavix/laravel-xhprof)\n[![Latest Stable Version](https://poser.pugx.org/bavix/laravel-xhprof/v/stable)](https://packagist.org/packages/bavix/laravel-xhprof)\n[![Latest Unstable Version](https://poser.pugx.org/bavix/laravel-xhprof/v/unstable)](https://packagist.org/packages/bavix/laravel-xhprof)\n[![License](https://poser.pugx.org/bavix/laravel-xhprof/license)](https://packagist.org/packages/bavix/laravel-xhprof)\n[![composer.lock](https://poser.pugx.org/bavix/laravel-xhprof/composerlock)](https://packagist.org/packages/bavix/laravel-xhprof)\n\nLaravel XHProf - Library for profiling in production.\n\n* **Vendor**: bavix\n* **Package**: Laravel XHProf\n* **Version**: [![Latest Stable Version](https://poser.pugx.org/bavix/laravel-xhprof/v/stable)](https://packagist.org/packages/bavix/laravel-xhprof)\n* **Laravel Version**: `5.5`, `5.6`, `5.7`, `5.8`, `6.0`, `7.0`, `8.0`\n* **PHP Version**: 7.1+ \n* **[Composer](https://getcomposer.org/):** `composer require bavix/laravel-xhprof`\n\n### Get Started\n\n1. Install xhprof extension for PHP:\n```bash\npecl install xhprof\n```\n\n2. Add in php.ini or other included config (xhprof.ini):\n```bash\nextension=xhprof.so\nxhprof.output_dir=/tmp/xhprof\n```\n\n3. Restart PHP:\n```bash\nsudo systemctl restart fp2-php72-fpm.service\n```\n\n4. Check XHProf in PHP Info:\n```bash\nphp -i | grep xhprof\n```\n\nResult:\n\n```bash\n/opt/php72/conf.d/xhprof.ini,\nxhprof\nxhprof support =\u003e enabled\nxhprof.collect_additional_info =\u003e 0 =\u003e 0\nxhprof.output_dir =\u003e /tmp/xhprof =\u003e /tmp/xhprof\nxhprof.sampling_depth =\u003e 2147483647 =\u003e 2147483647\nxhprof.sampling_interval =\u003e 100000 =\u003e 100000\n\n```\n\n5. Add domain for view results profiling (xhprof.domain.ru).\n\n6. Download library for view:\n\n```bash\ncd /var/www/xhprof.domain.ru;\nwget http://pecl.php.net/get/xhprof-0.9.4.tgz\ngzip -d xhprof-0.9.4.tgz\ntar -xvf xhprof-0.9.4.tar\n```\n\n7. Change root path in Nginx config for this domain:\n`set $root_path /var/www/xhprof.domain.ru/xhprof-0.9.4/xhprof_html;`\n\n8. Install this package:\n```bash\ncomposer req bavix/laravel-xhprof --dev\n```\n\n9. Create config xhprof.php to Laravel in `config` dir (if empty):\n\n```php\n\u003c?php\nreturn [\n    'path' =\u003e base_path('../xhprof.domain.ru/xhprof-0.9.4'),\n    'enabled' =\u003e true,\n    'freq' =\u003e 1\n];\n```\n\n10. If you have old laravel (\u003c=5.4), register the service provider by add this line `\\Bavix\\XHProf\\XHProfServiceProvider::class` in your `/config/app.php`.\nIf laravel 5.5 and older then skip this step.\n\n11. Reload page Laravel site and go to xhprof.domain.ru\n\nEnjoy!\n\nI wrote the [instructions](https://github.com/bavix/laravel-xhprof/issues/9#issuecomment-703891348) [@wdda](https://github.com/wdda), thank you. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbavix%2Flaravel-xhprof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbavix%2Flaravel-xhprof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbavix%2Flaravel-xhprof/lists"}