public function run(RunnerContext $context)
{
$executorConfig = $this->executorRegistry->getConfig($context->getExecutor());
$executor = $this->executorRegistry->getService($executorConfig['executor']);
// build the collection of benchmarks to be executed.
$benchmarkMetadatas = $this->benchmarkFinder->findBenchmarks($context->getPath(), $context->getFilters(), $context->getGroups());
$suite = new Suite($context->getContextName(), new \DateTime(), $this->configPath);
$suite->setEnvInformations((array) $this->envSupplier->getInformations());
// log the start of the suite run.
$this->logger->startSuite($suite);
try {
/* @var BenchmarkMetadata */
foreach ($benchmarkMetadatas as $benchmarkMetadata) {
$benchmark = $suite->createBenchmark($benchmarkMetadata->getClass());
$this->runBenchmark($executor, $context, $benchmark, $benchmarkMetadata);
}
} catch (StopOnErrorException $e) {
}
$suite->generateUuid();
$this->logger->endSuite($suite);
return $suite;
}