Class: RubyProf::FlatPrinter
- Inherits:
-
AbstractPrinter
- Object
- AbstractPrinter
- RubyProf::FlatPrinter
- 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, {})
Instance Method Summary collapse
-
#sort_method ⇒ Object
Override for this printer to sort by self time by default.
Methods inherited from AbstractPrinter
#filter_by, #initialize, #max_percent, #method_href, #method_location, #min_percent, needs_dir?, #open_asset, #print, #print_footer, #print_header, #print_thread, #print_threads, #setup_options, #time_format
Constructor Details
This class inherits a constructor from RubyProf::AbstractPrinter
Instance Method Details
#sort_method ⇒ Object
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 |