PhpBench\Console\Command\RunCommand::execute PHP Method

execute() public method

public execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->timeUnitHandler->timeUnitFromInput($input);
        $suite = $this->runnerHandler->runFromInput($input, $output, ['context_name' => $input->getOption('context'), 'retry_threshold' => $input->getOption('retry-threshold'), 'sleep' => $input->getOption('sleep'), 'iterations' => $input->getOption('iterations'), 'warmup' => $input->getOption('warmup')]);
        $collection = new SuiteCollection([$suite]);
        $this->dumpHandler->dumpFromInput($input, $output, $collection);
        if (true === $input->getOption('store')) {
            $output->write('Storing results ... ');
            $this->storage->getService()->store($collection);
            $output->writeln('OK');
            $output->writeln(sprintf('Run: %s', $suite->getUuid()));
        }
        $this->reportHandler->reportsFromInput($input, $output, $collection);
        if ($suite->getErrorStacks()) {
            return 1;
        }
        return 0;
    }