class RubyProf::GraphPrinter

def print_methods(thread)

def print_methods(thread)
  total_time = thread.total_time
  # Sort methods from longest to shortest total time
  methods = thread.methods.sort_by(&sort_method)
  # Print each method in total time order
  methods.reverse_each do |method|
    total_percentage = (method.total_time/total_time) * 100
    next if total_percentage < min_percent
    self_percentage = (method.self_time/total_time) * 100
    @output << "-" * 150 << "\n"
    print_parents(thread, method)
    # 1 is for % sign
    @output << sprintf("%#{PERCENTAGE_WIDTH-1}.2f%%", total_percentage)
    @output << sprintf("%#{PERCENTAGE_WIDTH-1}.2f%%", self_percentage)
    @output << sprintf("%#{TIME_WIDTH}.3f", method.total_time)
    @output << sprintf("%#{TIME_WIDTH}.3f", method.self_time)
    @output << sprintf("%#{TIME_WIDTH}.3f", method.wait_time)
    @output << sprintf("%#{TIME_WIDTH}.3f", method.children_time)
    @output << sprintf("%#{CALL_WIDTH}i", method.called)
    @output << sprintf("    %s",  method.recursive? ? "*" : " ")
    @output << sprintf("%-30s", method.full_name)
    @output << sprintf(" %s", method_location(method))
    @output << "\n"
    print_children(method)
  end
end