diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-08 03:45:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-08 03:45:34 +0000 |
commit | 127a190ecd23950f90c88ba8b2ceae39f503f42e (patch) | |
tree | 7903e390f265d25f121fd988da7ec0fc07934007 /benchmark | |
parent | ed41941b5ff34a5bb474b9b43a667474ea603d9e (diff) | |
download | ruby-127a190ecd23950f90c88ba8b2ceae39f503f42e.tar.gz |
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
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/driver.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/benchmark/driver.rb b/benchmark/driver.rb index eb976b4a90..a4f09b105f 100644 --- a/benchmark/driver.rb +++ b/benchmark/driver.rb @@ -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} |