Class: RubyProf::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/plaid-rails.rb

Instance Method Summary collapse

Instance Method Details

#to_hObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/plaid-rails.rb', line 13

def to_h
  result = {}
  threads.each do |thread_id, methods|
    result[thread_id] = methods.map do |method_info|
      { :full_name => method_info.full_name,
        :total_time => method_info.total_time,
        :source_file => method_info.source_file }
    end
  end
  result
end