Class: Benchmark::Memory::Report::Entry
- Inherits:
-
Object
- Object
- Benchmark::Memory::Report::Entry
- Defined in:
- lib/benchmark/memory/report/entry.rb
Overview
An entry in a report about a benchmark.
Instance Attribute Summary collapse
-
#label ⇒ #to_s
readonly
The entry label.
-
#measurement ⇒ Measurement
readonly
The measurements for the entry.
Instance Method Summary collapse
-
#allocated_memory ⇒ Integer
Get the total amount of memory allocated in the entry.
-
#initialize(label, measurement) ⇒ Entry
constructor
Instantiate a new entry.
Constructor Details
#initialize(label, measurement) ⇒ Entry
Instantiate a new entry.
12 13 14 15 |
# File 'lib/benchmark/memory/report/entry.rb', line 12 def initialize(label, measurement) @label = label @measurement = measurement end |
Instance Attribute Details
#label ⇒ #to_s (readonly)
Returns The entry label.
18 19 20 |
# File 'lib/benchmark/memory/report/entry.rb', line 18 def label @label end |
#measurement ⇒ Measurement (readonly)
Returns The measurements for the entry.
21 22 23 |
# File 'lib/benchmark/memory/report/entry.rb', line 21 def measurement @measurement end |
Instance Method Details
#allocated_memory ⇒ Integer
Get the total amount of memory allocated in the entry.
26 27 28 |
# File 'lib/benchmark/memory/report/entry.rb', line 26 def allocated_memory measurement.memory.allocated end |