protected function renderCodeCoverage()
    {
        $this->coverage->stop();

        $codeCoverageDirectory = PATH_site . 'typo3temp/codecoverage/';
        if (!is_readable($codeCoverageDirectory) && !is_dir($codeCoverageDirectory)) {
            GeneralUtility::mkdir($codeCoverageDirectory);
        }

        $coverageReport = new PHP_CodeCoverage_Report_HTML();
        $coverageReport->process($this->coverage, $codeCoverageDirectory);
        $this->outputService->output(
            '<p><a target="_blank" href="../typo3temp/codecoverage/index.html">' .
            'Click here to access the Code Coverage report</a></p>' .
            '<p>Memory peak usage: ' . GeneralUtility::formatSize(memory_get_peak_usage()) . 'B</p>'
        );
    }