Class: Perfgate::CLI::RunCommand
- Inherits:
-
Object
- Object
- Perfgate::CLI::RunCommand
- Defined in:
- lib/perfgate/cli/run_command.rb
Overview
Implements baseline run (spec section 10.2): discovers workloads
via the RSpec integration, executes each workload's warmup+samples
in an isolated child process, and writes a filesystem result
bundle. With --compare PATH, immediately compares the fresh run
against a reference bundle and reports/exits like baseline compare would -- this is the single combined step the spec's
GitHub Actions example (section 19.1) invokes. --format markdown
additionally writes a summary.md into the output directory for a
GitHub job summary.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(argv) ⇒ RunCommand
constructor
A new instance of RunCommand.
Constructor Details
#initialize(argv) ⇒ RunCommand
Returns a new instance of RunCommand.
22 23 24 25 |
# File 'lib/perfgate/cli/run_command.rb', line 22 def initialize(argv) @argv = argv.dup @options = { config: "perfgate.yml" } end |
Instance Method Details
#call ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/perfgate/cli/run_command.rb', line 27 def call config = load_configuration run_result = execute(config) run_dir = save(config, run_result) @options[:compare] ? compare_and_report(config, run_result, run_dir) : run_only_report(run_result, run_dir) end |