Class: HeapProfiler::Analyzer::StringDimension::StringLocation
- Inherits:
-
Object
- Object
- HeapProfiler::Analyzer::StringDimension::StringLocation
- Defined in:
- lib/heap_profiler/analyzer.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#memsize ⇒ Object
readonly
Returns the value of attribute memsize.
Instance Method Summary collapse
-
#initialize(location) ⇒ StringLocation
constructor
A new instance of StringLocation.
- #process(object) ⇒ Object
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
#count ⇒ Object (readonly)
Returns the value of attribute count.
115 116 117 |
# File 'lib/heap_profiler/analyzer.rb', line 115 def count @count end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
115 116 117 |
# File 'lib/heap_profiler/analyzer.rb', line 115 def location @location end |
#memsize ⇒ Object (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 |