Download the PHP package laracraft-tech/laravel-xhprof without Composer
On this page you can find all versions of the php package laracraft-tech/laravel-xhprof. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laracraft-tech/laravel-xhprof
More information about laracraft-tech/laravel-xhprof
Files in laracraft-tech/laravel-xhprof
Package laravel-xhprof
Short Description Easy XHProf setup to profile your laravel application!
License MIT
Homepage https://github.com/laracraft-tech/laravel-xhprof
Informations about the package laravel-xhprof
Introduction
Laravel XHProf provides you with a simple setup to profile your Laravel application with the well-known XHProf PHP extension originally developed by Facebook. It also leads you through the steps to install XHProf UI, a UI to visualize, save, and analyze the results of the profiling.
Installation
First, you'll need to install the PHP extension. It's highly recommended to use ondrejs ppa. It's well maintained and provides quite all PHP versions.
Normal environment
If you have a normal PHP environment, just install the XHProf extension:
Note: we need Graphviz to generate callgraphs.
Laravel Sail environment
If you are using laravel sail, here's a setup for you:
Note: The provided Laravel Sail Dockerfile already uses ondrejs ppa.
Install the Package
Install the UI
We are using the recommended fork by php.net from "preinheimer": https://www.php.net/manual/en/xhprof.requirements.php
Database
Since the database table name,
which the UI package is using behind to store and read data from the database,
is hard coded to details
and you already may have a table named like that,
you may need to take some additional steps. If not, here at first the simple way:
In case you DON'T already HAVE your own details
table in your database:
In case you already HAVE an own details
table in your database:
I recommend just using a different database.
Note: you also need to create a user who has privileges on that new database!
Config
Now let's configure some settings!
Usage
Just set XHPROF_ENABLED=true
in your .env file and
now every request you make to your application gets profiled. \
Visit <your-host>/vendor/xhprof/xhprof_html/
to see your profiling results.
Happy analyzing!
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
- Zacharias Creutznacher
- All Contributors
License
MIT. Please see the license file for more information.