class RubyProf::FlatPrinter

Generates flat profile reports as text. To use the flat printer:

result = RubyProf.profile do
  [code to profile]
end

printer = RubyProf::FlatPrinter.new(result)
printer.print(STDOUT, {})

Public Instance Methods

sort_method() click to toggle source

Override for this printer to sort by self time by default

# File lib/ruby-prof/printers/flat_printer.rb, line 16
def sort_method
  @options[:sort_method] || :self_time
end

Private Instance Methods

print_header(thread) click to toggle source

def print_threads

@result.threads.each do |thread|
  print_thread(thread)
  @output << "\n" * 2
end

end

print_methods(thread) click to toggle source