Class | RubyProf::GraphPrinter |
In: |
lib/ruby-prof/graph_printer.rb
|
Parent: | AbstractPrinter |
Generates graph profile reports as text. To use the graph printer:
result = RubyProf.profile do [code to profile] end printer = RubyProf::GraphPrinter.new(result, 5) printer.print(STDOUT, 0)
The constructor takes two arguments. The first is a RubyProf::Result object generated from a profiling run. The second is the minimum %total (the methods total time divided by the overall total time) that a method must take for it to be printed out in the report. Use this parameter to eliminate methods that are not important to the overall profiling results.
PERCENTAGE_WIDTH | = | 8 |
TIME_WIDTH | = | 10 |
CALL_WIDTH | = | 17 |
Create a GraphPrinter. Result is a RubyProf::Result object generated from a profiling run.
Print a graph 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.