Exemplo n.º 1
0
    public function configure()
    {
        $this->setName('report');
        $this->setDescription('Generate a report from storage or an XML file');
        $this->setHelp(<<<'EOT'
Generate report from the latest stored suite:

    $ %command.full_name% --uuid=latest --report=aggregate

Generate report from a UUID (as determined from the <info>log</info> command:

    $ %command.full_name% --uuid=133a2605fac74edabf046edeb9c5f7c4dc1a3aac --report=aggregate

Generate from a query:

    $ %command.full_name% --query='benchmark: "MyBench"' --report=aggregate

Generate from an XML file:

    $ %command.full_name% --file=dump.xml

To dump an XML file, use the <info>run</info> command with the
<comment>dump-file</comment> option.

You can specify the options multiple times to compare multiple suites.
EOT
);
        ReportHandler::configure($this);
        TimeUnitHandler::configure($this);
        SuiteCollectionHandler::configure($this);
        DumpHandler::configure($this);
    }
Exemplo n.º 2
0
    /**
     * {@inheritdoc}
     */
    public function configure()
    {
        $this->setName('show');
        $this->setDescription('Show the details of a specific run.');
        $this->addArgument('run_id', InputArgument::REQUIRED, 'Run ID');
        $this->setHelp(<<<'EOT'
Show the results of a specific run.

    $ %command.full_name% <run id>

Any report can be used to display the results:

    $ %command.full_name% <run id> --report=env

EOT
);
        ReportHandler::configure($this);
        TimeUnitHandler::configure($this);
        DumpHandler::configure($this);
    }
Exemplo n.º 3
0
    public function configure()
    {
        RunnerHandler::configure($this);
        ReportHandler::configure($this);
        TimeUnitHandler::configure($this);
        DumpHandler::configure($this);
        $this->setName('run');
        $this->setDescription('Run benchmarks');
        $this->setHelp(<<<'EOT'
Run benchmark files at given <comment>path</comment>

    $ %command.full_name% /path/to/bench

All bench marks under the given path will be executed recursively.
EOT
);
        $this->addOption('iterations', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Override number of iteratios to run in (all) benchmarks');
        $this->addOption('warmup', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Override number of warmup revolutions on all benchmarks');
        $this->addOption('retry-threshold', 'r', InputOption::VALUE_REQUIRED, 'Set target allowable deviation', null);
        $this->addOption('sleep', null, InputOption::VALUE_REQUIRED, 'Number of microseconds to sleep between iterations');
        $this->addOption('context', null, InputOption::VALUE_REQUIRED, 'Context label to apply to the suite result (useful when comparing reports)');
        $this->addOption('store', null, InputOption::VALUE_NONE, 'Persist the results.');
    }