class Benchmark::Memory::Report::Comparison

Compare entries against each other.

Attributes

entries[R]

@return [Array<Entry>] The entries to compare.

Public Class Methods

new(entries) click to toggle source

Instantiate a new comparison.

@param entries [Array<Entry>] The entries to compare.

# File lib/benchmark/memory/report/comparison.rb, line 9
def initialize(entries)
  @entries = entries.sort_by(&:measurement)
end

Public Instance Methods

possible?() click to toggle source

Check if the comparison is possible

@return [Boolean]

# File lib/benchmark/memory/report/comparison.rb, line 19
def possible?
  entries.size > 1
end