class Benchmark::Report

:nodoc:
It is of little direct interest to the user.
This class is used by the Benchmark.benchmark and Benchmark.bm methods.

def initialize(width = 0, format = nil)


format string used by Tms#format.
+width+ and +format+ are the label offset and
Report objects are created by the #benchmark and #bm methods.
Usually, one doesn't call this method directly, as new
Returns an initialized Report instance.

:nodoc:

It is of little direct interest to the user.
This class is used by the Benchmark.benchmark and Benchmark.bm methods.
def initialize(width = 0, format = nil)
  @width, @format, @list = width, format, []
end

def item(label = "", *format, &blk) # :yield:

:yield:

formatting rules.
formatted by +format+. See Tms#format for the
Prints the +label+ and measured time for the block,
def item(label = "", *format, &blk) # :yield:
  w = label.to_s.length
  @width = w if @width < w
  @list << res = Benchmark.measure(label, &blk)
  res
end