Command/CommandBenchmark.php
public function finish($outputStat = true)
    {
        if ($outputStat === true) {
            $this->output->writeln('');
            $this->output->writeln(sprintf('<info>Job finished in %.2f s</info>', microtime(true) - $this->start));
            $this->output->writeln(sprintf('<info>Memory usage: %.2f MB</info>', memory_get_peak_usage() >> 20));
        } else {
            $end = microtime(true);

            return [
                'start' => $this->start,
                'finish' => $end,
                'duration' => $end - $this->start,
                'memory_peak' => memory_get_peak_usage() >> 20,
            ];
        }
    }
public function finish($outputStat = true)
    {
        if ($outputStat === true) {
            $this->output->writeln('');
            $this->output->writeln(sprintf('<info>Job finished in %.2f s</info>', microtime(true) - $this->start));
            $this->output->writeln(sprintf('<info>Memory usage: %.2f MB</info>', memory_get_peak_usage() >> 20));
        } else {
            $end = microtime(true);

            return [
                'start' => $this->start,
                'finish' => $end,
                'duration' => $end - $this->start,
                'memory_peak' => memory_get_peak_usage() >> 20,
            ];
        }
    }
public function finish ( $ outputStat = true ) { if ( $ outputStat === true ) { $ this -> output -> writeln ( '' ) ; $ this -> output -> writeln ( sprintf ( '<info>Job finished in %.2f s</info>' , microtime ( true ) - $ this -> start ) ) ; $ this -> output -> writeln ( sprintf ( '<info>Memory usage: %.2f MB</info>' , memory_get_peak_usage ( ) >> 20 ) ) ; } else { $ end = microtime ( true ) ; return [ 'start' => $ this -> start , 'finish' => $ end , 'duration' => $ end - $ this -> start , 'memory_peak' => memory_get_peak_usage ( ) >> 20 , ] ; } }
Ends statistics collection and outputs or returns statistics.

@param bool $outputStat Wheather to output to standart output, or return data array.

@return array
Ends statistics collection and outputs or returns statistics .