Class: RubyProf::FlatPrinter

Inherits:
AbstractPrinter show all
Defined in:
lib/ruby-prof/printers/flat_printer.rb

Overview

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, {})

Direct Known Subclasses

FlatPrinterWithLineNumbers

Instance Method Summary collapse

Methods inherited from AbstractPrinter

#initialize, #method_name, #min_percent, #print, #print_file, #print_thread, #print_threads, #setup_options

Constructor Details

This class inherits a constructor from RubyProf::AbstractPrinter

Instance Method Details

#sort_methodObject

Override for this printer to sort by self time by default



16
17
18
# File 'lib/ruby-prof/printers/flat_printer.rb', line 16

def sort_method
  @options[:sort_method] || :self_time
end