class Benchmark::Memory::Report::Entry

An entry in a report about a benchmark.

Attributes

label[R]

@return [#to_s] The entry label.

measurement[R]

@return [Measurement] The measurements for the entry.

Public Class Methods

new(label, measurement) click to toggle source

Instantiate a new entry.

@param label [#to_s] The entry label. @param measurement [Measurement] The measurements for the entry.

# File lib/benchmark/memory/report/entry.rb, line 12
def initialize(label, measurement)
  @label = label
  @measurement = measurement
end

Public Instance Methods

allocated_memory() click to toggle source

Get the total amount of memory allocated in the entry.

@return [Integer]

# File lib/benchmark/memory/report/entry.rb, line 26
def allocated_memory
  measurement.memory.allocated
end