extends
BrObjectProfiler is a great tool for making code profiling and call time measurements.
There is one global config object (singleton) accessible via br()->profiler()
. You can still create own profiler by $profiler = new BrProfiler();
Method/property | Description |
---|---|
If you are using global profiler, please prepend below methods with br()->profiler()-> |
|
start(operationName) | Start time measurement |
finish(operationName) | Finish time measurement and return microseconds since operation started $microsconds = br()->profiler()->finish('operation1'); echo('Operation1 took ' . $microseconds . ' msecs')); |
logStart(operationName) | Same as start() but with writing operation start timestamp into log file. Check BrLog section for details about logging. |
logFinish(operationName) | Same as finish() but with writing operation duration into log file. Check BrLog section for details about logging. |