Method: RubyProf::MethodInfo#aggregate_children

Defined in:
lib/ruby-prof/method_info.rb

#aggregate_childrenObject



94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/ruby-prof/method_info.rb', line 94

def aggregate_children
  # Group call info's based on their targets
  groups = self.children.inject(Hash.new) do |hash, call_info|
    key = call_info.target
    (hash[key] ||= []) << call_info
    hash
  end

  groups.map do |key, value|
    AggregateCallInfo.new(value)
  end
end