PhpBench\Extensions\XDebug\Executor\ProfileExecutor::launch PHP Метод

launch() публичный Метод

public launch ( Payload $payload, Iteration $iteration, Config $config )
$payload PhpBench\Benchmark\Remote\Payload
$iteration PhpBench\Model\Iteration
$config PhpBench\Registry\Config
    public function launch(Payload $payload, Iteration $iteration, Config $config)
    {
        $outputDir = $config['output_dir'];
        $callback = $config['callback'];
        $name = XDebugUtil::filenameFromIteration($iteration, '.cachegrind');
        $phpConfig = ['xdebug.profiler_enable' => 1, 'xdebug.profiler_output_dir' => PhpBench::normalizePath($outputDir), 'xdebug.profiler_output_name' => $name];
        $payload->setPhpConfig($phpConfig);
        $result = $payload->launch();
        if (isset($result['buffer']) && $result['buffer']) {
            throw new \RuntimeException(sprintf('Benchmark made some noise: %s', $result['buffer']));
        }
        $callback($iteration, $result);
        $iteration->setResult(new TimeResult($result['time']));
        $iteration->setResult(MemoryResult::fromArray($result['mem']));
        return $result;
    }
ProfileExecutor