Download the PHP package alecrabbit/php-simple-profiler without Composer
On this page you can find all versions of the php package alecrabbit/php-simple-profiler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-simple-profiler
PHP Simple profiler
Demos
See demos
Quickstart
Benchmark
Output will be something like:
For more details see examples
Note: Some examples could be not up to date... WIP
WIP
Installation
For now this package is suggested to be used in dev process
or if you wish
Benchmark classes
There are moments when you have to choose between two or more different approaches. Benchmark classes is to help you choose which is faster :)
Benchmark::class
(no default progress bar, silent measurements)-
BenchmarkSymfonyPB::class
(with Symfony progress bar) BenchmarkSimplePB::class
(with star progress bar)
Example
Let's say you want to know which is faster call_user_func($func)
or $func()
. First you need to create an instance of Benchmark class
Note: Xdebug extension slowing things down a lot! Disable it (I'm using two different images w/o Xdebug and with Xdebug)
Then you have to add functions to test. But first let's add a closure:
Now we are ready to add functions:
And now you can run the benchmarking
Getting results
Results will be something like that
Profiler::class
Profiler is a kinda wrapper for Counter and Timer in case if you need them both.
Counter::class
// todo
Timer::class
// todo
All versions of php-simple-profiler with dependencies
alecrabbit/php-accessories Version ^0.9
alecrabbit/php-console-colour Version ^0.5
alecrabbit/php-console-spinner Version ^0.14
alecrabbit/php-counters Version ^0.2
alecrabbit/php-helpers Version ^0.6
alecrabbit/php-reports Version ^0.2
alecrabbit/php-timers Version ^0.1
alecrabbit/php-traits Version ^0.3
sebastian/exporter Version ^3.1