pbweb/xhprof
Laravel-friendly integration for XHProf profiling. Collect and store performance data (CPU, memory, call graphs) for your PHP requests, making it easier to analyze slow code paths and regressions during development or troubleshooting.
debugbar or tntsearch/tntprofiler.xhprof extension (not bundled with PHP by default), necessitating server-level configuration (e.g., pecl install xhprof).xhprof_lib/utils/xhprof_lib.php or custom scripts to generate call graphs)./profile routes or debug requests.php artisan profile:run for one-off profiling.| Step | Task | Owner | Dependencies |
|---|---|---|---|
| 1 | Install XHProf extension | DevOps | PHP version compatibility |
| 2 | Create Laravel service provider | Backend | XHProf extension |
| 3 | Build middleware for auto-profiling | Backend | Service provider |
| 4 | Develop data processing script | Backend | Database schema |
| 5 | Create visualization dashboard | Frontend | Processed data |
| 6 | Test in staging | QA | All prior steps |
| 7 | (Optional) Deploy to production | DevOps | Monitoring setup |
pdo_mysql function calls).?profile=1 query param).App\Models\User::find() slow?").| Risk | Impact | Mitigation |
|---|---|---|
| Extension Missing | Profiling fails silently | Use if (extension_loaded('xhprof')) checks |
| High Overhead | Production slowdowns | Disable in production; use sampling |
| Data Corruption | Unreadable profiles | Validate output format post-processing |
| Storage Overflow | Database bloat | Set retention policies early |
| PHP 8.x Incompatibility | Extension crashes | Use Tideways or Blackfire as fallback |
How can I help you explore Laravel packages today?