driver.rb: adjust name width [ci skip]

* benchmark/driver.rb (show_results): count adjusted result marks
  as the name width.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-01-08 03:45:34 +00:00
parent faf472a2bb
commit 1bf10e33fd

View File

@ -153,7 +153,9 @@ class BenchmarkDriver
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}