src/phpDocumentor/Parser/Parser.php
protected function logAfterParsingAFile($memory)
    {
        if (!$this->stopwatch) {
            return $memory;
        }

        $lap = $this->stopwatch->lap('parser.parse');
        $oldMemory = $memory;
        $periods = $lap->getPeriods();
        $memory = end($periods)->getMemory();

        $this->log(
            '>> Memory after processing of file: ' . number_format($memory / 1024 / 1024, 2)
            . ' megabytes (' . (($memory - $oldMemory >= 0)
                ? '+'
                : '-') . number_format(($memory - $oldMemory) / 1024)
            . ' kilobytes)',
            LogLevel::DEBUG
        );

        return $memory;
    }
protected function logAfterParsingAFile($memory)
    {
        if (!$this->stopwatch) {
            return $memory;
        }

        $lap = $this->stopwatch->lap('parser.parse');
        $oldMemory = $memory;
        $periods = $lap->getPeriods();
        $memory = end($periods)->getMemory();

        $this->log(
            '>> Memory after processing of file: ' . number_format($memory / 1024 / 1024, 2)
            . ' megabytes (' . (($memory - $oldMemory >= 0)
                ? '+'
                : '-') . number_format(($memory - $oldMemory) / 1024)
            . ' kilobytes)',
            LogLevel::DEBUG
        );

        return $memory;
    }
protected function logAfterParsingAFile ( $ memory ) { if ( ! $ this -> stopwatch ) { return $ memory ; } $ lap = $ this -> stopwatch -> lap ( 'parser.parse' ) ; $ oldMemory = $ memory ; $ periods = $ lap -> getPeriods ( ) ; $ memory = end ( $ periods ) -> getMemory ( ) ; $ this -> log ( '>> Memory after processing of file: ' . number_format ( $ memory / 1024 / 1024 , 2 ) . ' megabytes (' . ( ( $ memory - $ oldMemory >= 0 ) ? '+' : '-' ) . number_format ( ( $ memory - $ oldMemory ) / 1024 ) . ' kilobytes)' , LogLevel :: DEBUG ) ; return $ memory ; }
Collects the time and duration of processing a file, logs it and returns the new amount of memory in use.

@param integer $memory

@return integer
Collects the time and duration of processing a file logs it and returns the new amount of memory in use .