$_view
$_view : \Horde_View
The parent view invoking the helper.
Measures the execution time of a block in a template and reports the result to the log.
Example:
<?php $bench = $this->benchmark('Notes section') ?>
<?php echo $this->expensiveNotesOperation() ?>
<?php $bench->end() ?>
Will add something like "Notes section (0.34523)" to the log.
You may give an optional logger level as the second argument ('debug', 'info', 'warn', 'error'). The default is 'info'. The level may also be given as a Horde_Log::* constant.
$_view : \Horde_View
The parent view invoking the helper.
__construct(\Horde_View $view)
Creates a helper for $view.
\Horde_View | $view | The view to help. |
benchmark(string $message = 'Benchmarking', string|integer $level = 'info') : \Horde_View_Helper_Benchmark_Timer
Starts a new benchmark.
string | $message | Message to log after the benchmark has ended. |
string|integer | $level | Log level to log after the benchmark has ended. |
A benchmark timer object.