def bmbm(width = 0, &blk)
job = Job.new(width)
yield(job)
width = job.width
if SYNC
sync = OUTPUT.sync
OUTPUT.sync = true
end
OUTPUT.print "Rehearsal "
puts '-'*(width+CAPTION.length - "Rehearsal ".length)
list = []
job.list.each{|label,item|
OUTPUT.print(label.ljust(width))
res = Benchmark::measure(&item)
OUTPUT.print res.format()
list.push res
}
sum = Tms.new; list.each{|i| sum += i}
ets = sum.format("total: %tsec")
OUTPUT.printf("%s %s\n\n",
"-"*(width+CAPTION.length-ets.length-1), ets)
OUTPUT.print ' '*width, CAPTION
list = []
ary = []
job.list.each{|label,item|
GC::start
OUTPUT.print label.ljust(width)
res = Benchmark::measure(&item)
OUTPUT.print res.format()
ary.push res
list.push [label, res]
}
OUTPUT.sync = sync if SYNC
ary
end