diff --git a/Command/DumpStatsCommand.php b/Command/DumpStatsCommand.php index 72f4401..79d50ae 100644 --- a/Command/DumpStatsCommand.php +++ b/Command/DumpStatsCommand.php @@ -31,7 +31,9 @@ class DumpStatsCommand extends Command protected function configure() { - $this->setName('stats:dump')->addOption('module', 'm', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Modules to fetch statistics for'); + $this->setName('stats:dump') + ->addOption('module', 'm', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Modules to fetch statistics for') + ->addOption('raw', null, InputOption::VALUE_NONE, 'Output raw statistics list'); } protected function execute(InputInterface $input, OutputInterface $output) @@ -52,11 +54,16 @@ class DumpStatsCommand extends Command 'Value' ]); foreach ($event->getStatistics() as $name => $value) { + if ($input->getOption('raw')) { + $output->writeln($name . "\t" . $value, OutputInterface::OUTPUT_RAW); + } $table->addRow([ $name, $value ]); } - $table->render(); + if (!$input->getOption('raw')) { + $table->render(); + } } } \ No newline at end of file