class RubyProf::FlatPrinterWithLineNumbers

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

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

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

Public Instance Methods

print_methods(thread) click to toggle source

Private Instance Methods

called_from_format() click to toggle source
# File lib/ruby-prof/printers/flat_printer_with_line_numbers.rb, line 74
def called_from_format
  if @editor
    "      %s (#{@editor}://open?url=file://%s&line=%s)\n"
  else
    "      %s (%s:%s)\n"
  end
end
defined_at_format() click to toggle source
# File lib/ruby-prof/printers/flat_printer_with_line_numbers.rb, line 66
def defined_at_format
  if @editor
    "      #{@editor}://open?url=file://%s&line=%s\n"
  else
    "      %s:%s\n"
  end
end