aeatech/snapshot-profiler
Laravel/PHP snapshot profiler that captures lightweight performance snapshots of requests and code execution. Helps you track timing, memory usage, and key metrics over time for debugging and regression detection, with simple integration into existing apps.
ProfilerInterface implementation for application profiling, which is valuable for performance optimization, debugging, and monitoring. It aligns well with Laravel’s ecosystem (e.g., debugging tools like Laravel Debugbar, Tideways, or Blackfire) but lacks explicit Laravel-specific integrations (e.g., service provider hooks, facade support, or Laravel event listeners).ProfilerInterface) design, enabling easy swapping or extension of profiling logic. This is ideal for teams prioritizing flexibility in profiling tools.events or terminating middleware)?ProfilerInterface stable, or might it change without notice?app() container or Route::middleware).Illuminate\Http\Request lifecycle (e.g., via middleware).Illuminate\Database\Events\QueryExecuted).Illuminate\Queue\Events\JobProcessing).config/app.php if performance degrades).| Phase | Task | Dependencies |
|---|---|---|
| Discovery | Benchmark overhead; compare with alternatives (e.g., Blackfire). | None |
| Pilot | Integrate into a CLI command or queue worker. | Basic profiler setup. |
| Core Integration | Extend for HTTP/Eloquent/Queue; add storage. | Pilot results. |
| Monitoring | Connect to alerts/logging (e.g., Sentry, Laravel Telescope). | Storage adapter working. |
| Optimization | Tune sampling/granularity; reduce overhead. | Production data. |
| Scenario | Impact | Mitigation |
|---|---|---|
| Profiler crashes the app | Downtime | Disable via config flag. |
| Storage backend fails | Lost profiling data | Use redundant storage (e.g., DB + filesystem). |
| High overhead degrades performance | Slow responses | Sample requests; exclude critical paths. |
| Inaccurate profiling data | Misleading optimizations | Cross-validate with Xdebug/Blackfire. |
| Package abandonment | Unmaintained code | Fork and maintain privately. |
How can I help you explore Laravel packages today?