class RubyProf::DotPrinter
def print_thread(thread)
def print_thread(thread) total_time = thread.total_time thread.methods.sort_by(&sort_method).reverse_each do |method| total_percentage = (method.total_time/total_time) * 100 next if total_percentage < min_percent name = method.full_name.split("#").last label = "#{name}\\n(#{total_percentage.round}%)" # Only emit fill/font attrs when they differ from the default (white/#333) fill = node_color(total_percentage) fontcolor = node_fontcolor(total_percentage) attrs = "label=\"#{label}\"" attrs += " fillcolor=\"#{fill}\" fontcolor=\"#{fontcolor}\"" unless fill == '#FFFFFF' puts "#{dot_id(method)} [#{attrs}];" @seen_methods << method print_edges(total_time, method) end end