Class: Serialbench::Runners::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/serialbench/runners/base.rb

Direct Known Subclasses

AsdfRunner, DockerRunner, LocalRunner

Instance Method Summary collapse

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

#benchmarkObject

Run benchmark

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/serialbench/runners/base.rb', line 27

def benchmark
  raise NotImplementedError, 'Subclasses must implement the benchmark method'
end

#prepareObject

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/serialbench/runners/base.rb', line 22

def prepare
  raise NotImplementedError, 'Subclasses must implement the prepare method'
end