Class: HeapProfiler::Analyzer::ClassGroupDimension

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



105
106
107
108
109
110
# File 'lib/heap_profiler/analyzer.rb', line 105

def process(index, object)
  if (group = index.guess_class(object))
    @objects[group] += 1
    @memory[group] += object[:memsize]
  end
end