Class: Benchmark::Malloc::AllocationResult

Inherits:
Object
  • Object
show all
Defined in:
lib/benchmark/malloc/allocation_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#allocatedObject (readonly)

Returns the value of attribute allocated.



6
7
8
# File 'lib/benchmark/malloc/allocation_result.rb', line 6

def allocated
  @allocated
end

#retainedObject (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_objectsObject



15
16
17
# File 'lib/benchmark/malloc/allocation_result.rb', line 15

def total_allocated_objects
  @allocated.total_objects
end

#total_retained_objectsObject



19
20
21
# File 'lib/benchmark/malloc/allocation_result.rb', line 19

def total_retained_objects
  @retained.total_objects
end