public
Description: Prettier Benchmarking for Ruby
Clone URL: git://github.com/wycats/benchwarmer.git
Make a small bit of code a little more idomatic.
nex3 (author)
Mon May 05 17:03:36 -0700 2008
commit  2fe5e93bcbe6b2b69332dcfd1404be7705f0745a
tree    92de673dfdeaf387d05d0728c81c0ab7eed13c08
parent  73abbc232b435a162698b8925818bff218c78bf2
...
67
68
69
70
 
71
72
73
...
67
68
69
 
70
71
72
73
0
@@ -67,7 +67,7 @@ module Benchmark
0
           procs.each_with_index do |(column, proc), i|
0
             head = @columns[column]
0
             bench = Benchmark.measure { @times.times(&proc)}
0
- print (" %#{head.size >= 5 ? head.size : 5}.2f |" % bench.real)
0
+ print (" %#{[head.size, 5].max}.2f |" % bench.real)
0
           end
0
           puts
0
         end

Comments

    No one has commented yet.