rein / profiler
Native PHP profiler
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/rein/profiler
Requires
- php: >=7.4
This package is auto-updated.
Last update: 2025-12-22 08:08:12 UTC
README
To use the profiler, you must define in environment variables PROFILE_MODE:
- "OFF" (or empty) - don't run profiler.
- "TIMING" - calculate the running time of the application.
- "TRACE" - full functions tracing.
To examine any script, it must contain definition ticks = 1 or was included via Profiler::include.
You can declare ticks = 1 at the beginning of the root script to test it too.
Test results can be obtained by calling the profiler and specifying the "onShutdown" method. Example:
rein\profiler\Profiler::getInstance() ->onShutdown = fn(array $timings) => var_dump($timings);