tomzx / profiler
PHP profiler.
v0.1.0
2016-10-26 09:44 UTC
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: ^5
This package is auto-updated.
Last update: 2024-12-10 09:37:02 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.