benchmark_driver 0.15.8 → 0.15.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e99ed161f437a1c8e08847db6bee7f8ada9773fc527d1be4aaa6436c18ce16d3
|
4
|
+
data.tar.gz: cc6aa7374390d0451f8d75451676481b032d1d7d8fe4bbdc442e77b4c2fad19a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a89c19b24c61a01b97a6814c6a47185fb19ce81ea8afedbfefa812610aa4774179a128d8e365435c58f967d84faf61ce7628b8672db65e7962a5ee950045db6
|
7
|
+
data.tar.gz: 71417fee7eadda1c26f6d0cab1c9c7563eb1d8da011f4b4b2c2e1701eaba573bdbf67230fb74034cc08353396bc20e6573ea79cc8acb8ab17f7c6cd01285cb21
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# v0.15.9
|
2
|
+
|
3
|
+
- Prefer an exact match in RVM version selection
|
4
|
+
- Fix a negative duration crash in `ips`, `time` and `once` runners
|
5
|
+
- Fix bugs in old TruffleRuby not supporting `keyword_init` of Struct
|
6
|
+
|
1
7
|
# v0.15.8
|
2
8
|
|
3
9
|
- Add `--rvm` option and `.rvm` Ruby interface to use RVM
|
@@ -108,8 +108,8 @@ class BenchmarkDriver::Runner::Ips
|
|
108
108
|
duration = Tempfile.open(['benchmark_driver-', '.rb']) do |f|
|
109
109
|
with_script(benchmark.render(result: f.path)) do |path|
|
110
110
|
IO.popen([*context.executable.command, path], &:read) # TODO: print stdout if verbose=2
|
111
|
-
if $?.success?
|
112
|
-
|
111
|
+
if $?.success? && ((value = Float(f.read)) > 0)
|
112
|
+
value
|
113
113
|
else
|
114
114
|
BenchmarkDriver::Result::ERROR
|
115
115
|
end
|
@@ -66,8 +66,8 @@ class BenchmarkDriver::Runner::Once
|
|
66
66
|
Tempfile.open(['benchmark_driver-', '.rb']) do |f|
|
67
67
|
with_script(benchmark.render(result: f.path)) do |path|
|
68
68
|
IO.popen([*context.executable.command, path], &:read) # TODO: print stdout if verbose=2
|
69
|
-
if $?.success?
|
70
|
-
|
69
|
+
if $?.success? && ((value = Float(f.read)) > 0)
|
70
|
+
value
|
71
71
|
else
|
72
72
|
BenchmarkDriver::Result::ERROR
|
73
73
|
end
|
data/lib/benchmark_driver/rvm.rb
CHANGED
@@ -23,7 +23,8 @@ module BenchmarkDriver
|
|
23
23
|
else
|
24
24
|
rubies = Pathname.new("#{ENV['rvm_path']}/rubies")
|
25
25
|
abort "Rubies path '#{rubies}' not found" unless rubies.exist?
|
26
|
-
|
26
|
+
ruby_list = rubies.children.select { |path| path.directory? && path.basename.to_s.match(version) }
|
27
|
+
ruby_root = ruby_list.detect { |path| path.basename.to_s == version } || ruby_list[0]
|
27
28
|
abort "Version '#{version}' not found" unless ruby_root
|
28
29
|
"#{ruby_root}/bin/ruby"
|
29
30
|
end
|