aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-08 03:46:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-08 03:46:17 +0000
commitcbb34a319c524903fa37c190ea1a335902c8fca1 (patch)
tree1e0081e051c12cc84a81b40100b743a5d8f9b542 /benchmark
parent127a190ecd23950f90c88ba8b2ceae39f503f42e (diff)
downloadruby-cbb34a319c524903fa37c190ea1a335902c8fca1.tar.gz
driver.rb: extract loop times [ci skip]
* benchmark/driver.rb (BenchmarkDriver.load): extract loop times from the loaded results to adjust the results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/driver.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/benchmark/driver.rb b/benchmark/driver.rb
index a4f09b105f..db97cbf15b 100644
--- a/benchmark/driver.rb
+++ b/benchmark/driver.rb
@@ -41,10 +41,15 @@ class BenchmarkDriver
else
h = eval(input.read)
end
+ results = h[:results] || h["results"]
obj = allocate
obj.instance_variable_set("@execs", h[:executables] || h["executables"])
- obj.instance_variable_set("@results", h[:results] || h["results"])
+ obj.instance_variable_set("@results", results)
obj.instance_variable_set("@opt", opt)
+ [1, 2].each do |i|
+ loop = results.assoc((n = "loop_whileloop#{i}").intern) || results.assoc(n)
+ obj.instance_variable_set("@loop_wl#{i}", loop ? loop[1].map {|t,*|t} : nil)
+ end
obj
end