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 +4 -4
- data/lib/benchmark_driver/default_job_parser.rb +2 -2
- data/lib/benchmark_driver/job_parser.rb +1 -1
- data/lib/benchmark_driver/runner/block.rb +1 -1
- data/lib/benchmark_driver/runner/command_stdout.rb +1 -1
- data/lib/benchmark_driver/runner/ips.rb +1 -1
- data/lib/benchmark_driver/runner/ruby_stdout.rb +4 -3
- data/lib/benchmark_driver/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12ed79eb718a91c50643a0a4880810ffc2dd41e6fa2ee0553e24c631499cd262
|
4
|
+
data.tar.gz: 31a10ecb698c7911263db83ebe40ff27cfe790d768d2eacf454c60c2d0746408
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
38
|
-
|
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) }
|
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.
|
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-
|
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.
|
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
|