rein/profiler

There is no license information available for the latest version (1.2) of this package.

Native PHP profiler

Maintainers

Package info

github.com/LeamasRein/profiler

pkg:composer/rein/profiler

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.2 2021-11-21 23:18 UTC

This package is auto-updated.

Last update: 2026-03-22 08:45:30 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);