public function stopMeasure(string $name, array $params = []): void
    {
        $end = \microtime(true);

        if (! $this->hasStartedMeasure($name)) {
            throw new RuntimeException(\sprintf(
                'Failed stopping measure [%s] because it hasn\'t been started.',
                $name
            ));
        }

        $this->addMeasure(
            $this->startedMeasures[$name]['label'],
            $this->startedMeasures[$name]['start'],
            $end,
            $params,
            $this->startedMeasures[$name]['collector']
        );

        unset($this->startedMeasures[$name]);
    }
public function stopMeasure(string $name, array $params = []): void
    {
        $end = \microtime(true);

        if (! $this->hasStartedMeasure($name)) {
            throw new RuntimeException(\sprintf(
                'Failed stopping measure [%s] because it hasn\'t been started.',
                $name
            ));
        }

        $this->addMeasure(
            $this->startedMeasures[$name]['label'],
            $this->startedMeasures[$name]['start'],
            $end,
            $params,
            $this->startedMeasures[$name]['collector']
        );

        unset($this->startedMeasures[$name]);
    }
public function stopMeasure ( string $ name , array $ params = [ ] ) : void { $ end = \ microtime ( true ) ; if ( ! $ this -> hasStartedMeasure ( $ name ) ) { throw new RuntimeException ( \ sprintf ( 'Failed stopping measure [%s] because it hasn\'t been started.' , $ name ) ) ; } $ this -> addMeasure ( $ this -> startedMeasures [ $ name ] [ 'label' ] , $ this -> startedMeasures [ $ name ] [ 'start' ] , $ end , $ params , $ this -> startedMeasures [ $ name ] [ 'collector' ] ) ; unset ( $ this -> startedMeasures [ $ name ] ) ; }
Stops a measure.

@param string $name
@param array  $params

@throws \RuntimeException

@return void
Stops a measure .