Snowair\Debugbar\PhalconDebugbar::measure PHP Method

measure() public method

Utility function to measure the execution of a Closure
public measure ( string $label, Closure $closure )
$label string
$closure Closure
    public function measure($label, \Closure $closure)
    {
        if ($this->hasCollector('time')) {
            /** @var \DebugBar\DataCollector\TimeDataCollector $collector */
            $collector = $this->getCollector('time');
            $collector->measure($label, $closure);
        } else {
            $closure();
        }
    }