Class | RubyProf::DotPrinter |
In: |
lib/ruby-prof/printers/dot_printer.rb
|
Parent: | RubyProf::AbstractPrinter |
Generates a graphviz graph in dot format. To use the dot printer:
result = RubyProf.profile do [code to profile] end printer = RubyProf::DotPrinter.new(result) printer.print(STDOUT)
You can use either dot viewer such as GraphViz, or the dot command line tool to reformat the output into a wide variety of outputs:
dot -Tpng graph.dot > graph.png
CLASS_COLOR | = | '"#666666"' |
EDGE_COLOR | = | '"#666666"' |
Print a graph report to the provided output.
output - Any IO object, including STDOUT or a file. The default value is STDOUT.
options - Hash of print options. See setup_options for more information.
When profiling results that cover a large number of method calls it helps to use the :min_percent option, for example:
DotPrinter.new(result).print(STDOUT, :min_percent=>5)