{"id":36307498,"url":"https://github.com/laracraft-tech/laravel-xhprof","last_synced_at":"2026-01-13T22:43:34.926Z","repository":{"id":37628589,"uuid":"483520483","full_name":"laracraft-tech/laravel-xhprof","owner":"laracraft-tech","description":"Easy XHProf setup to profile your Laravel application!","archived":false,"fork":false,"pushed_at":"2025-12-26T11:28:04.000Z","size":1610,"stargazers_count":233,"open_issues_count":0,"forks_count":12,"subscribers_count":2,"default_branch":"1.x","last_synced_at":"2026-01-11T14:42:30.349Z","etag":null,"topics":["laravel","performance","php","profiler","profiling","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/laracraft-tech.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-20T05:34:37.000Z","updated_at":"2025-12-26T11:28:08.000Z","dependencies_parsed_at":"2024-06-21T04:19:37.854Z","dependency_job_id":null,"html_url":"https://github.com/laracraft-tech/laravel-xhprof","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":"0.045454545454545414","last_synced_commit":"9b726b21b27ee5f72062fe0132e8fe9f30024f6a"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/laracraft-tech/laravel-xhprof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laracraft-tech%2Flaravel-xhprof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laracraft-tech%2Flaravel-xhprof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laracraft-tech%2Flaravel-xhprof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laracraft-tech%2Flaravel-xhprof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laracraft-tech","download_url":"https://codeload.github.com/laracraft-tech/laravel-xhprof/tar.gz/refs/heads/1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laracraft-tech%2Flaravel-xhprof/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28402218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","performance","php","profiler","profiling","xhprof"],"created_at":"2026-01-11T10:51:32.891Z","updated_at":"2026-01-13T22:43:34.921Z","avatar_url":"https://github.com/laracraft-tech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://i.imgur.com/nsWZks5.png\" alt=\"Logo Laravel XHProf\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://packagist.org/packages/laracraft-tech/laravel-xhprof\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/laracraft-tech/laravel-xhprof\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/laracraft-tech/laravel-xhprof\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/laracraft-tech/laravel-xhprof\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/laracraft-tech/laravel-xhprof\"\u003e\u003cimg src=\"https://img.shields.io/packagist/l/laracraft-tech/laravel-xhprof\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/laracraft-tech/laravel-xhprof/actions/workflows/check_imports.yml\"\u003e\u003cimg src=\"https://github.com/laracraft-tech/laravel-xhprof/actions/workflows/check_imports.yml/badge.svg?branch=1.x\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!--\n#Laravel XHProf\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Total Downloads][ico-downloads]][link-downloads]\n[![Build Status][ico-travis]][link-travis]\n--\u003e\n\n## Introduction\n\nLaravel XHProf provides you with a simple setup to profile your Laravel application\nwith the well-known XHProf PHP extension originally developed by Facebook. \nIt also leads you through the steps to install XHProf UI, a UI to visualize, save, and analyze the results\nof the profiling.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/tNBhiPg.png\"\u003e\n\u003c/p\u003e\n\n## Installation\n\nFirst, you'll need to install the PHP extension.\nIt's highly recommended to use ondrejs ppa.\nIt's well maintained and provides quite all PHP versions.\n\n### Normal environment\n\nIf you have a normal PHP environment, just install the XHProf extension:\n\n``` bash\nsudo add-apt-repository ppa:ondrej/php\nsudo apt-get update\nsudo apt-get install php php-xhprof Graphviz\n# You can now check if the extension was successfully installed\nphp -i | grep xhprof\n# maybe restart your webserver or php-fpm...\n```\n\nNote: we need Graphviz to generate callgraphs.\n\n### Laravel Sail environment\n\nIf you are using laravel sail, here's a setup for you:\n\n``` bash\nsail up -d\nsail artisan sail:publish\n# in docker-compose.yml check wich php version is used under build-\u003econtext (eg. ./docker/8.1)\n# If you know the php-version you can type:\nnano docker/\u003cphp-version\u003e/Dockerfile\n# find the block where all php extensions are installed and add \"php\u003cphp-version\u003e-xhprof graphviz \\\"\n# Now you need to rebuild the sail\nsail down ; sail build --no-cache ; sail up -d # this may take a while...\n# You can now check if the extension was successfully installed\nsail php -i | grep xhprof\n```\n\nNote: The provided Laravel Sail Dockerfile already uses ondrejs ppa.\n\n### Install the Package\n\n``` bash\ncomposer require laracraft-tech/laravel-xhprof --dev\nphp artisan vendor:publish --provider=\"LaracraftTech\\LaravelXhprof\\XHProfServiceProvider\" --tag=\"config\"\n```\n\n### Install the UI\n\nWe are using the recommended fork by php.net from \"preinheimer\":\nhttps://www.php.net/manual/en/xhprof.requirements.php\n\n``` bash\nmkdir public/vendor ; git clone git@github.com:preinheimer/xhprof.git ./public/vendor/xhprof\n# If you haven't already, I recommend adding public/vendor to your .gitignore\necho \"/public/vendor\" \u003e\u003e .gitignore\n```\n\n### Database\n\nSince the database table name,\nwhich the UI package is using behind to store and read data from the database,\nis hard coded to ``details`` and you already may have a table named like that,\nyou may need to take some additional steps. If not, here at first the simple way:\n\n\u003cbr/\u003e\n\n#### In case you DON'T already HAVE your own ``details`` table in your database:\n\n``` bash\nphp artisan vendor:publish --provider=\"LaracraftTech\\LaravelXhprof\\XHProfServiceProvider\" --tag=\"migrations\"\nphp artisan migrate\n```\n\u003cbr/\u003e\n\n#### In case you already HAVE an own ``details`` table in your database:\n\nI recommend just using a different database. \n\n``` mysql\nCREATE DATABASE xhprof;\nUSE xhprof;\nCREATE TABLE IF NOT EXISTS `details` (\n  `id` char(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n  `url` char(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `c_url` char(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  `server name` char(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `perfdata` longblob,\n  `type` tinyint DEFAULT NULL,\n  `cookie` longblob,\n  `post` longblob,\n  `get` blob,\n  `pmu` int DEFAULT NULL,\n  `wt` int DEFAULT NULL,\n  `cpu` int DEFAULT NULL,\n  `server_id` char(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `aggregateCalls_include` char(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `details_url_index` (`url`),\n  KEY `details_c_url_index` (`c_url`),\n  KEY `details_cpu_index` (`cpu`),\n  KEY `details_wt_index` (`wt`),\n  KEY `details_pmu_index` (`pmu`),\n  KEY `details_timestamp_index` (`timestamp`),\n  KEY `details_server name_timestamp_index` (`server name`,`timestamp`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n```\n\nNote: you also need to create a user who has privileges on that new database!\n\n### Config\n\nNow let's configure some settings!\n\n``` bash\ncp public/vendor/xhprof/xhprof_lib/config.sample.php public/vendor/xhprof/xhprof_lib/config.php\n# 1. Change the DB credentials to your needs\n# 2. enable dot_binary section\n# 3. If you're local, set $controlIPs to false\nnano public/vendor/xhprof/xhprof_lib/config.php\n```\n\n## Usage\n\nJust set ``XHPROF_ENABLED=true`` in your .env file and\nnow every request you make to your application gets profiled. \\\nVisit ``\u003cyour-host\u003e/vendor/xhprof/xhprof_html/`` to see your profiling results.\n\nHappy analyzing!\n\n\n\u003c!-- \n\n## Change log\n\nPlease see the [changelog](changelog.md) for more information on what has changed recently.\n\n## Testing\n\n``` bash\ncomposer test\n```\n\n --\u003e\n\n## Security\n\nIf you discover any security-related issues, please email zacharias.creutznacher@gmail.com instead of using the issue tracker.\n\n## Credits\n\n- [Zacharias Creutznacher][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nMIT. Please see the [license file](license.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/laracraft-tech/laravel-xhprof.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/laracraft-tech/laravel-xhprof.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/laracraft-tech/laravel-xhprof/master.svg?style=flat-square\n[ico-styleci]: https://styleci.io/repos/12345678/shield\n\n[link-packagist]: https://packagist.org/packages/laracraft-tech/laravel-xhprof\n[link-downloads]: https://packagist.org/packages/laracraft-tech/laravel-xhprof\n[link-travis]: https://travis-ci.org/laracraft-tech/laravel-xhprof\n[link-styleci]: https://styleci.io/repos/12345678\n[link-author]: https://github.com/laracraft-tech\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaracraft-tech%2Flaravel-xhprof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaracraft-tech%2Flaravel-xhprof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaracraft-tech%2Flaravel-xhprof/lists"}