Public Member Functions | |
__construct ($ttl=1.0, $xhprof=false) | |
register (callable $func) | |
run (Summary $sum, Progress $pro) | |
This is a helper for benchmarking your application.
You can register your benchmark function to it, then run the run() method.
Definition at line 22 of file Benchmarker.php.
__construct | ( | $ttl = 1.0 , |
|
$xhprof = false |
|||
) |
Definition at line 28 of file Benchmarker.php.
register | ( | callable | $func | ) |
Register a benchmark function.
The benchmark function has following restrictions:
$func | callable |
Definition at line 88 of file Benchmarker.php.
Run all benchmarks.
$formatter | callable to format the benchmark result. The formatter will receive registered function, loops it run, and time it costs. |
Definition at line 117 of file Benchmarker.php.