class Benchmark::Memory::Report
Hold the results of a set of benchmarks.
Attributes
entries[R]
@return [Array<Entry>] The entries in the report.
Public Class Methods
new()
click to toggle source
Instantiate a report to hold entries of tasks and measurements.
@return [Report]
# File lib/benchmark/memory/report.rb, line 11 def initialize @entries = [] end
Public Instance Methods
add_entry(task, measurement)
click to toggle source
Add an entry to the report.
@param task [Job::Task] The task to report about. @param measurement [Measurement] The measurements from the task.
@return [Entry] the newly created entry.
# File lib/benchmark/memory/report.rb, line 24 def add_entry(task, measurement) entry = Entry.new(task.label, measurement) entries.push(entry) entry end
comparable?()
click to toggle source
Return true if the report is comparable.
@return [Boolean]
# File lib/benchmark/memory/report.rb, line 33 def comparable? comparison.possible? end
comparison()
click to toggle source
Compare the entries within a report.
@return [Comparison]
# File lib/benchmark/memory/report.rb, line 40 def comparison @comparison ||= Comparison.new(entries) end