Revision: Fri, 31 May 2024 16:10:39 GMT
v1.0 – outdated
This version of the documentation is outdated. Consider upgrading your project to Spiral Framework 3.12
Edit this page

Profiler Panel

The Skeleton spiral application ships with spiral/profiler module to help you profile and debug internal flow of your application.

Enable/Disable Profiler panel

Profiler module can be enable and disabled by simply booting ProfilerBootloader at beginning of your application. By default, such boot will only happen in DEBUG mode defined by the enviroment:

 * Application core bootloading, you can configure your environment here.
protected function bootstrap()
    env('DEBUG') && $this->enableDebugging();

 * Debug packages.
private function enableDebugging()
    //Initiating all needed binding (no need to use memory caching)

This code is located in your App class.

Once booted profiler will create floating panel at bottom right of your screen:

Profiler Panel

Environment Overview

First profiler panel will show what classes, extensions being loaded. Indicate container bindings, http routes and ect.


Request/Response Data

View incoming request and response data on second tab.


Please note, the currently profiler indicates state of response before it's being processed by application middlewares.


Profiler is able to indicate your application timeline using BenchmarkerInterface as source of data:


Read about benchmarker here.


Every use of LoggerTrait or logger created via LogsInterface (including global LoggerInterface instance) will be captured on this tab:


Performance Notes

Please note that profiler is executed in a same process as your application, keeping profiler enabled will slow down your application a lot.

Consider alternative profiling techniques like xDebug or Blackfire(