module BenchmarkDriver::Runner::CommandStdout::JobParser
Dynamically fetched and used by `BenchmarkDriver::JobParser.parse`
Public Class Methods
parse(name:, command:, working_directory: nil, metrics_type:, stdout_to_metrics:)
click to toggle source
@param [String] name @param [String] command @param [String,NilClass] working_directory @param [Hash] metrics_type @param [String] stdout_to_metrics
# File lib/benchmark_driver/runner/command_stdout.rb, line 24 def parse(name:, command:, working_directory: nil, metrics_type:, stdout_to_metrics:) Job.new( name: name, command: command.shellsplit, working_directory: working_directory, metrics: parse_metrics(**metrics_type), stdout_to_metrics: stdout_to_metrics, ) end
Private Class Methods
parse_metrics(unit:, name: nil, larger_better: nil, worse_word: nil)
click to toggle source
# File lib/benchmark_driver/runner/command_stdout.rb, line 36 def parse_metrics(unit:, name: nil, larger_better: nil, worse_word: nil) name ||= unit metric = BenchmarkDriver::Metric.new( name: name, unit: unit, larger_better: larger_better, worse_word: worse_word, ) [metric] end