benchmark_driver 0.14.21 → 0.14.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60b50f8bfde2f225d9332ee85c8865ecac8337d1de770e8d7a1bdf4011772fdf
4
- data.tar.gz: d6ca687f6eb41389b44a09148e34c6c812146dd3abdc808f79a5c114a202529c
3
+ metadata.gz: 12ed79eb718a91c50643a0a4880810ffc2dd41e6fa2ee0553e24c631499cd262
4
+ data.tar.gz: 31a10ecb698c7911263db83ebe40ff27cfe790d768d2eacf454c60c2d0746408
5
5
  SHA512:
6
- metadata.gz: 303fa292b389e5b020cc7058889fbb44056c21c69103155615dc37da5a9f5435b7956e785db90f98e251fa7d5d41ce2b3b5a5b495e21a17b7eeb5b5e0ff6a7de
7
- data.tar.gz: c230230201bc66fd977fbffdd8fd52ccc8c3560587b02185e3477efc2b4c1ce4b1c3aa9b82132a96aee6743a5c503803e06c8afff8e60f66f3f46352f604e9fd
6
+ metadata.gz: 003d82d144d2cf0186af2ad9a548bdfe03a92bd2ea6765a6a1fc7258af1171ec6a2021a7a3f4c5d7c756c423dd653e973b3c02c9df63fe806016437c0c4fb53a
7
+ data.tar.gz: 15d64cb465a9e0830036a9f8998100a61d3822dde7353c40e54da7dd9c3ae898aba56d6f1fa340f5b9a40e5ff6b7e1f4267147af5ca1beaa57ecafb63ab468c8
@@ -53,7 +53,7 @@ module BenchmarkDriver
53
53
  when String
54
54
  job_class.new(name: benchmark, script: benchmark)
55
55
  when Hash
56
- parse_job_hash(benchmark)
56
+ parse_job_hash(**benchmark)
57
57
  else
58
58
  raise ArgumentError.new("Expected String or Hash in element of benchmark, but got: #{benchmark.inspect}")
59
59
  end
@@ -70,7 +70,7 @@ module BenchmarkDriver
70
70
 
71
71
  def parse_contexts(contexts)
72
72
  if contexts.is_a?(Array)
73
- contexts.map { |context| parse_context(context) }
73
+ contexts.map { |context| parse_context(**context) }
74
74
  else
75
75
  raise ArgumentError.new("contexts must be Array, but got: #{contexts.inspect}")
76
76
  end
@@ -16,7 +16,7 @@ module BenchmarkDriver
16
16
 
17
17
  # Dynamic dispatch for plugin support
18
18
  require "benchmark_driver/runner/#{type}"
19
- job = ::BenchmarkDriver.const_get("Runner::#{camelize(type)}::JobParser", false).parse(config)
19
+ job = ::BenchmarkDriver.const_get("Runner::#{camelize(type)}::JobParser", false).parse(**config)
20
20
  default_params.each do |key, value|
21
21
  if job.respond_to?(key) && job.respond_to?("#{key}=") && job.public_send(key).nil?
22
22
  job.public_send("#{key}=", value)
@@ -9,7 +9,7 @@ class BenchmarkDriver::Runner::Block < BenchmarkDriver::Runner::Ips
9
9
 
10
10
  # Dynamically fetched and used by `BenchmarkDriver::JobParser.parse`
11
11
  JobParser = BenchmarkDriver::DefaultJobParser.for(klass: Job, metrics: [METRIC]).extend(Module.new{
12
- def parse(*)
12
+ def parse(**)
13
13
  jobs = super
14
14
  jobs.map do |job|
15
15
  job = job.dup
@@ -26,7 +26,7 @@ class BenchmarkDriver::Runner::CommandStdout
26
26
  name: name,
27
27
  command: command.shellsplit,
28
28
  working_directory: working_directory,
29
- metrics: parse_metrics(metrics_type),
29
+ metrics: parse_metrics(**metrics_type),
30
30
  stdout_to_metrics: stdout_to_metrics,
31
31
  )
32
32
  end
@@ -52,7 +52,7 @@ class BenchmarkDriver::Runner::Ips
52
52
  @output.with_job(name: job.name) do
53
53
  job.runnable_contexts(@contexts).each do |context|
54
54
  repeat_params = { config: @config, larger_better: true, rest_on_average: :average }
55
- result = BenchmarkDriver::Repeater.with_repeat(repeat_params) do
55
+ result = BenchmarkDriver::Repeater.with_repeat(**repeat_params) do
56
56
  run_benchmark(job, context: context)
57
57
  end
58
58
  value, duration = result.value
@@ -34,8 +34,9 @@ class BenchmarkDriver::Runner::RubyStdout
34
34
  raise NotImplementedError.new('Having multiple metrics is not supported yet')
35
35
  end
36
36
 
37
- metric, value_from_stdout = parse_metric(*metrics.first)
38
- environment_from_stdout = Hash[environment.map { |k, v| [k, parse_environment(v)] }]
37
+ metric_name, metric_params = metrics.first
38
+ metric, value_from_stdout = parse_metric(metric_name, **metric_params)
39
+ environment_from_stdout = Hash[environment.map { |k, v| [k, parse_environment(**v)] }]
39
40
 
40
41
  Job.new(
41
42
  name: name,
@@ -84,7 +85,7 @@ class BenchmarkDriver::Runner::RubyStdout
84
85
  @contexts.each do |context|
85
86
  exec = context.executable
86
87
  repeat_params = { config: @config, larger_better: metric.larger_better }
87
- result = BenchmarkDriver::Repeater.with_repeat(repeat_params) do
88
+ result = BenchmarkDriver::Repeater.with_repeat(**repeat_params) do
88
89
  begin
89
90
  stdout = with_chdir(job.working_directory) do
90
91
  with_ruby_prefix(exec) { execute(*exec.command, *job.command) }
@@ -1,3 +1,3 @@
1
1
  module BenchmarkDriver
2
- VERSION = '0.14.21'
2
+ VERSION = '0.14.22'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benchmark_driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.21
4
+ version: 0.14.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-08 00:00:00.000000000 Z
11
+ date: 2019-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
- rubygems_version: 3.0.3
147
+ rubygems_version: 3.0.6
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Fully-featured accurate benchmark driver for Ruby