benchmark_driver 0.10.7 → 0.10.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/exe/benchmark-driver +1 -1
- data/lib/benchmark_driver/config.rb +0 -13
- data/lib/benchmark_driver/runner/command_stdout.rb +7 -14
- data/lib/benchmark_driver/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b1b310f52a83e0661be59e3835573a69b7e84a7aebb7f4f13e0f190ce2545c8
|
4
|
+
data.tar.gz: 3597a61936cedb14e59cf172e76cf3d5f91616ec0dd6470a54c4e51c32e7008c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b96308b5c25cae8dead511787fba95c1b049b5900e15670ccd8f84ec1b7b4584a23d2dd555c49a58c8ac32b59d4bc9715d6ffcdc964ee15761877d0986eb4ead
|
7
|
+
data.tar.gz: 9a33f86af59d36209715847a39cfc6777d1d4f078203f0dfa702b330e12201b747f3a275b9d6d032d2e2322013a83bd9230fa91c12303fb97e77b67c459029a1
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# v0.10.8
|
2
|
+
|
3
|
+
- In `command_stdout`, `$RBENV_VERSION` is no longer passed to --rbenv option because it has no effect for rbenv
|
4
|
+
- Instead, now dirname of executable path is prefixed to $PATH in `command_stdout`
|
5
|
+
|
1
6
|
# v0.10.7
|
2
7
|
|
3
8
|
- Pass `$RBENV_VERSION` for `command_stdout` runner with --rbenv option
|
data/exe/benchmark-driver
CHANGED
@@ -35,7 +35,7 @@ config = BenchmarkDriver::Config.new.tap do |c|
|
|
35
35
|
name, spec = full_spec.split('::', 2)
|
36
36
|
spec ||= name # if `::` is not given, regard whole string as spec
|
37
37
|
version, *args = spec.split(',')
|
38
|
-
executables << BenchmarkDriver::Config::
|
38
|
+
executables << BenchmarkDriver::Config::Executable.new(
|
39
39
|
name: name,
|
40
40
|
command: [BenchmarkDriver::Rbenv.ruby_path(version), *args],
|
41
41
|
)
|
@@ -36,17 +36,4 @@ module BenchmarkDriver
|
|
36
36
|
Config.defaults[:executables] = [
|
37
37
|
BenchmarkDriver::Config::Executable.new(name: RUBY_VERSION, command: [RbConfig.ruby]),
|
38
38
|
]
|
39
|
-
|
40
|
-
class Config::RbenvExecutable < Config::Executable
|
41
|
-
def freeze
|
42
|
-
rbenv_version # avoid `can't modify frozen xxx`
|
43
|
-
super
|
44
|
-
end
|
45
|
-
|
46
|
-
def rbenv_version
|
47
|
-
return @rbenv_version if defined?(@rbenv_version)
|
48
|
-
match = command.first.match(%r[/(?<version>[^/]+)/bin/ruby\z])
|
49
|
-
@rbenv_version = match && match[:version]
|
50
|
-
end
|
51
|
-
end
|
52
39
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'benchmark_driver/struct'
|
2
2
|
require 'benchmark_driver/metrics'
|
3
|
-
require 'benchmark_driver/rbenv'
|
4
3
|
require 'tempfile'
|
5
4
|
require 'shellwords'
|
6
5
|
require 'open3'
|
@@ -62,7 +61,7 @@ class BenchmarkDriver::Runner::CommandStdout
|
|
62
61
|
@config.executables.each do |exec|
|
63
62
|
best_value = with_repeat(metrics_type) do
|
64
63
|
stdout = with_chdir(job.working_directory) do
|
65
|
-
|
64
|
+
with_ruby_prefix(exec) { execute(*exec.command, *job.command) }
|
66
65
|
end
|
67
66
|
StdoutToMetrics.new(
|
68
67
|
stdout: stdout,
|
@@ -84,18 +83,12 @@ class BenchmarkDriver::Runner::CommandStdout
|
|
84
83
|
|
85
84
|
private
|
86
85
|
|
87
|
-
def
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
ensure
|
94
|
-
ENV.replace(env)
|
95
|
-
end
|
96
|
-
else
|
97
|
-
block.call
|
98
|
-
end
|
86
|
+
def with_ruby_prefix(executable, &block)
|
87
|
+
env = ENV.to_h.dup
|
88
|
+
ENV['PATH'] = "#{File.dirname(executable.command.first)}:#{ENV['PATH']}"
|
89
|
+
block.call
|
90
|
+
ensure
|
91
|
+
ENV.replace(env)
|
99
92
|
end
|
100
93
|
|
101
94
|
def with_chdir(working_directory, &block)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benchmark_driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.7.
|
113
|
+
rubygems_version: 2.7.6
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: Fully-featured accurate benchmark driver for Ruby
|