mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
1bf10e33fd
commit
caca9a473f
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue