[前][次][番号順一覧][スレッド一覧]

ruby-changes:45213

From: nobu <ko1@a...>
Date: Sun, 8 Jan 2017 12:46:22 +0900 (JST)
Subject: [ruby-changes:45213] nobu:r57286 (trunk): driver.rb: extract loop times [ci skip]

nobu	2017-01-08 12:46:17 +0900 (Sun, 08 Jan 2017)

  New Revision: 57286

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57286

  Log:
    driver.rb: extract loop times [ci skip]
    
    * benchmark/driver.rb (BenchmarkDriver.load): extract loop times
      from the loaded results to adjust the results.

  Modified files:
    trunk/benchmark/driver.rb
Index: benchmark/driver.rb
===================================================================
--- benchmark/driver.rb	(revision 57285)
+++ benchmark/driver.rb	(revision 57286)
@@ -41,10 +41,15 @@ class BenchmarkDriver https://github.com/ruby/ruby/blob/trunk/benchmark/driver.rb#L41
     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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]