function TraceableCommand::run
Overrides Command::run
File
-
vendor/
symfony/ console/ Command/ TraceableCommand.php, line 277
Class
- TraceableCommand
- @internal
Namespace
Symfony\Component\Console\CommandCode
public function run(InputInterface $input, OutputInterface $output) : int {
$this->input = $input;
$this->output = $output;
$this->arguments = $input->getArguments();
$this->options = $input->getOptions();
$event = $this->stopwatch
->start($this->getName(), 'command');
try {
$this->exitCode = parent::run($input, $output);
} finally {
$event->stop();
if ($output instanceof ConsoleOutputInterface && $output->isDebug()) {
$output->getErrorOutput()
->writeln((string) $event);
}
$this->duration = $event->getDuration() . ' ms';
$this->maxMemoryUsage = ($event->getMemory() >> 20) . ' MiB';
if ($this->isInteractive) {
$this->extractInteractiveInputs($input->getArguments(), $input->getOptions());
}
}
return $this->exitCode;
}