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

ruby-changes:45212

From: nobu <ko1@a...>
Date: Sun, 8 Jan 2017 12:45:39 +0900 (JST)
Subject: [ruby-changes:45212] nobu:r57285 (trunk): driver.rb: adjust name width [ci skip]

nobu	2017-01-08 12:45:34 +0900 (Sun, 08 Jan 2017)

  New Revision: 57285

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

  Log:
    driver.rb: adjust name width [ci skip]
    
    * benchmark/driver.rb (show_results): count adjusted result marks
      as the name width.

  Modified files:
    trunk/benchmark/driver.rb
Index: benchmark/driver.rb
===================================================================
--- benchmark/driver.rb	(revision 57284)
+++ benchmark/driver.rb	(revision 57285)
@@ -153,7 +153,9 @@ class BenchmarkDriver https://github.com/ruby/ruby/blob/trunk/benchmark/driver.rb#L153
       numformat = " %1$*2$.3f"
     end
 
-    name_width ||= @results.map {|v,*| v.size}.max
+    name_width ||= @results.map {|v, result|
+      v.size + (case v; when /^vm1_/; @loop_wl1; when /^vm2_/; @loop_wl2; end ? 1 : 0)
+    }.max
     minwidth ||= 7
     width = @execs.map{|(_, v)| [v.size, minwidth].max}
 

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

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