Class: Benchmark::IPS::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/benchmark/ips/report.rb

Defined Under Namespace

Classes: Entry

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeReport

Returns a new instance of Report.



49
50
51
# File 'lib/benchmark/ips/report.rb', line 49

def initialize
  @entries = []
end

Instance Attribute Details

#entriesObject (readonly)

Returns the value of attribute entries.



47
48
49
# File 'lib/benchmark/ips/report.rb', line 47

def entries
  @entries
end

Instance Method Details

#add_entry(label, microseconds, iters, ips, ips_sd, measurement_cycle) ⇒ Object



53
54
55
56
# File 'lib/benchmark/ips/report.rb', line 53

def add_entry label, microseconds, iters, ips, ips_sd, measurement_cycle
  @entries << Entry.new(label, microseconds, iters, ips, ips_sd, measurement_cycle)
  @entries.last
end

#run_comparisonObject



58
59
60
# File 'lib/benchmark/ips/report.rb', line 58

def run_comparison
  Benchmark.compare(*@entries)
end