Class: HeapProfiler::Analyzer::LocationGroupDimension

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

Instance Attribute Summary

Attributes inherited from Dimension

#memory, #objects

Instance Method Summary collapse

Methods inherited from GroupedDimension

build, #initialize, #top_n

Methods inherited from Dimension

#initialize, #stats

Constructor Details

This class inherits a constructor from HeapProfiler::Analyzer::GroupedDimension

Instance Method Details

#process(_index, object) ⇒ Object



83
84
85
86
87
88
89
90
91
92
# File 'lib/heap_profiler/analyzer.rb', line 83

def process(_index, object)
  file = object[:file]
  line = object[:line]

  if file && line
    group = "#{file}:#{line}"
    @objects[group] += 1
    @memory[group] += object[:memsize]
  end
end