class Benchmark::Plot::ReportMaker

Attributes

reports[R]

An array of Benchmark::Tms objects representing each item.

Public Class Methods

new(data) click to toggle source
# File lib/benchmark/plot/report_maker.rb, line 4
def initialize data
  @data = data
  @reports = {}
end

Public Instance Methods

report(label,&block) click to toggle source
# File lib/benchmark/plot/report_maker.rb, line 9
def report(label,&block)
  results_array = @data.each_with_object([]) do |d, results|
    lmb = lambda { block.call(d) }
    results << Benchmark.measure(label, &lmb)
  end
  @reports[label] = results_array
end