tomzx / profiler
PHP profiler.
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 1
pkg:composer/tomzx/profiler
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: ^5
This package is auto-updated.
Last update: 2025-10-10 11:34:07 UTC
README
PHP Profiler
is a small library that provides profiling functionality. It uses the Chrome debugging protocol that is part of the Chrome DevTools. This means that you can generate .cpuprofile
-compatible files that can then be loaded into Chrome profiles in the developer tools.
Getting started
- In a console,
php composer.phar require tomzx/profiler
$profiler = new \tomzx\Profiler\StackBasedProfiler(); $profiler->start(); // In your code $profiler->push('My identifier'); ///... $profiler->pop(); $profile = $profiler->stop(); file_put_contents('test.cpuprofile', json_encode($profile));
License
The code is licensed under the MIT license. See LICENSE.