Class: Benchmark::Report
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/benchmark.rb |
Overview
Class Method Summary
-
.new(width = 0, format = nil) ⇒ Report
constructor
Returns an initialized
Report
instance.
Instance Attribute Summary
Instance Method Summary
-
#item(label = "", *format, &blk)
(also: #report)
Prints the
label
and measured time for the block, formatted by #format. -
#report(label = "", *format, &blk)
Alias for #item.
Constructor Details
.new(width = 0, format = nil) ⇒ Report
Returns an initialized Report
instance. Usually, one doesn’t call this method directly, as new Report
objects are created by the Benchmark#benchmark and Benchmark#bm methods. #width and #format are the label offset and format string used by Tms#format.
Instance Attribute Details
#format (readonly)
An array of Tms
objects representing each item.
#list (readonly)
An array of Tms
objects representing each item.
#width (readonly)
An array of Tms
objects representing each item.
Instance Method Details
#item(label = "", *format, &blk) Also known as: #report
Prints the label
and measured time for the block, formatted by #format. See Tms#format for the formatting rules.
#report(label = "", *format, &blk)
Alias for #item.
# File 'lib/benchmark.rb', line 395
alias report item