# File lib/ruby-prof/graph_html_printer.rb, line 75 def calculate_thread_times # Cache thread times since this is an expensive # operation with the required sorting @overall_threads_time = 0.0 @thread_times = Hash.new @result.threads.each do |thread_id, methods| roots = methods.select{|m| m.root?} thread_total_time = sum(roots.map{|r| self.total_time(r.call_infos)}) @overall_threads_time += thread_total_time @thread_times[thread_id] = thread_total_time end end