Class: Serialbench::Runners::Base
- Inherits:
-
Object
- Object
- Serialbench::Runners::Base
- Defined in:
- lib/serialbench/runners/base.rb
Overview
Runner protocol: prepare, then run_benchmark(config, config_path, result_dir)
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(environment_config, environment_config_path) ⇒ Base
constructor
A new instance of Base.
- #prepare ⇒ Object
- #run_benchmark(benchmark_config, benchmark_config_path, result_dir) ⇒ Object
Constructor Details
#initialize(environment_config, environment_config_path) ⇒ Base
Returns a new instance of Base.
13 14 15 16 17 18 19 20 |
# File 'lib/serialbench/runners/base.rb', line 13 def initialize(environment_config, environment_config_path) @environment_config = environment_config @environment_config_path = environment_config_path raise 'environment_config is required' unless @environment_config raise 'environment_config_path is required' unless @environment_config_path raise 'environment_config_path must be a valid file' unless File.exist?(@environment_config_path) end |
Instance Method Details
#prepare ⇒ Object
22 23 24 |
# File 'lib/serialbench/runners/base.rb', line 22 def prepare raise NotImplementedError, 'Subclasses must implement the prepare method' end |
#run_benchmark(benchmark_config, benchmark_config_path, result_dir) ⇒ Object
26 27 28 |
# File 'lib/serialbench/runners/base.rb', line 26 def run_benchmark(benchmark_config, benchmark_config_path, result_dir) raise NotImplementedError, 'Subclasses must implement the run_benchmark method' end |