Class: RubyProf::FlatPrinter
- Inherits:
-
AbstractPrinter
- Object
- AbstractPrinter
- RubyProf::FlatPrinter
- Defined in:
- lib/ruby-prof/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, 0)
Instance Method Summary collapse
-
#print(output = STDOUT, options = {}) ⇒ Object
Print a flat profile report to the provided output.
Methods inherited from AbstractPrinter
#initialize, #method_name, #min_percent, #print_file, #setup_options
Constructor Details
This class inherits a constructor from RubyProf::AbstractPrinter
Instance Method Details
#print(output = STDOUT, options = {}) ⇒ Object
Print a flat profile report to the provided output.
output - Any IO oject, including STDOUT or a file. The default value is STDOUT.
options - Hash of print options. See #setup_options
for more information.
23 24 25 26 27 |
# File 'lib/ruby-prof/flat_printer.rb', line 23 def print(output = STDOUT, = {}) @output = output () print_threads end |