Class: HeapProfiler::Analyzer::StringDimension::StringLocation

Inherits:
Object
  • Object
show all
Defined in:
lib/heap_profiler/analyzer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location) ⇒ StringLocation

Returns a new instance of StringLocation.



117
118
119
120
121
# File 'lib/heap_profiler/analyzer.rb', line 117

def initialize(location)
  @location = location
  @count = 0
  @memsize = 0
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



115
116
117
# File 'lib/heap_profiler/analyzer.rb', line 115

def count
  @count
end

#locationObject (readonly)

Returns the value of attribute location.



115
116
117
# File 'lib/heap_profiler/analyzer.rb', line 115

def location
  @location
end

#memsizeObject (readonly)

Returns the value of attribute memsize.



115
116
117
# File 'lib/heap_profiler/analyzer.rb', line 115

def memsize
  @memsize
end

Instance Method Details

#process(object) ⇒ Object



123
124
125
126
# File 'lib/heap_profiler/analyzer.rb', line 123

def process(object)
  @count += 1
  @memsize += object[:memsize]
end