PhpBench\Tests\System\SystemTestCase::createResult PHP Method

createResult() public method

public createResult ( $benchmark = null, $extraCmd = '' )
    public function createResult($benchmark = null, $extraCmd = '')
    {
        $benchmark = $benchmark ?: 'benchmarks/set4';
        $process = $this->phpbench('run ' . $benchmark . ' --executor=debug --dump-file=' . $this->fname . ' ' . $extraCmd);
        if ($process->getExitCode() !== 0) {
            throw new \Exception('Could not generate test data:' . $process->getErrorOutput() . $process->getOutput());
        }
        $document = new Document();
        $document->load($this->fname);
        return $document;
    }