Class: Benchmark::Malloc::AllocationResult
- Inherits:
-
Object
- Object
- Benchmark::Malloc::AllocationResult
- Defined in:
- lib/benchmark/malloc/allocation_result.rb
Instance Attribute Summary collapse
-
#allocated ⇒ Object
readonly
Returns the value of attribute allocated.
-
#retained ⇒ Object
readonly
Returns the value of attribute retained.
Instance Method Summary collapse
-
#initialize(allocated, retained) ⇒ AllocationResult
constructor
A new instance of AllocationResult.
- #total_allocated_objects ⇒ Object
- #total_retained_objects ⇒ Object
Constructor Details
#initialize(allocated, retained) ⇒ AllocationResult
Returns a new instance of AllocationResult.
10 11 12 13 |
# File 'lib/benchmark/malloc/allocation_result.rb', line 10 def initialize(allocated, retained) @allocated = allocated @retained = retained end |
Instance Attribute Details
#allocated ⇒ Object (readonly)
Returns the value of attribute allocated.
6 7 8 |
# File 'lib/benchmark/malloc/allocation_result.rb', line 6 def allocated @allocated end |
#retained ⇒ Object (readonly)
Returns the value of attribute retained.
8 9 10 |
# File 'lib/benchmark/malloc/allocation_result.rb', line 8 def retained @retained end |
Instance Method Details
#total_allocated_objects ⇒ Object
15 16 17 |
# File 'lib/benchmark/malloc/allocation_result.rb', line 15 def total_allocated_objects @allocated.total_objects end |
#total_retained_objects ⇒ Object
19 20 21 |
# File 'lib/benchmark/malloc/allocation_result.rb', line 19 def total_retained_objects @retained.total_objects end |