Class: Benchmark::IPS::Report
- Inherits:
-
Object
- Object
- Benchmark::IPS::Report
- Defined in:
- lib/benchmark/ips/report.rb
Defined Under Namespace
Classes: Entry
Instance Attribute Summary collapse
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
Instance Method Summary collapse
- #add_entry(label, microseconds, iters, ips, ips_sd, measurement_cycle) ⇒ Object
-
#initialize ⇒ Report
constructor
A new instance of Report.
- #run_comparison ⇒ Object
Constructor Details
#initialize ⇒ Report
Returns a new instance of Report.
49 50 51 |
# File 'lib/benchmark/ips/report.rb', line 49 def initialize @entries = [] end |
Instance Attribute Details
#entries ⇒ Object (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_comparison ⇒ Object
58 59 60 |
# File 'lib/benchmark/ips/report.rb', line 58 def run_comparison Benchmark.compare(*@entries) end |