Scroll to navigation

RUBY-PROF(1) RUBY-PROF(1)

NAME

ruby-prof - A fast ruby profiler

SYNOPSIS

ruby-prof options <script.rb> [--] [profiled-script-command-line-options]

DESCRIPTION

ruby-prof is a fast profiler for ruby. It can be used as a stand-alone program (that this man page documents) or as a ruby library. Simply run the ruby program you want to profile using ruby-prof : ruby-prof script.rb At the end of execution the time spent in each method is displayed.

OPTIONS

Select a printer:
flat - Prints a flat profile as text (default).
flat_with_line_numbers - same as flat, with line numbers.
graph - Prints a graph profile as text.
graph_html - Prints a graph profile as html.
call_tree - format for KCacheGrind
call_stack - prints a HTML visualization of the call tree
dot - Prints a graph profile as a dot file

The minimum percent a method must take before being included in output reports. this option is not supported for call tree.
Output results to a file instead of standard out.
Select what ruby-prof should measure:
process - Process time (default).
wall - Wall time.
cpu - CPU time (Pentium and PowerPCs only).
allocations - Object allocations (requires patched Ruby interpreter).
memory - Allocated memory in KB (requires patched Ruby interpreter).
gc_runs - Number of garbage collections (requires patched Ruby interpreter).
gc_time - Time spent in garbage collection (requires patched Ruby interpreter).

Select how ruby-prof results should be sorted:
total - Total time
self - Self time
wait - Wait time
child - Child time

Replace $0 when loading the .rb files.
Show version, set $VERBOSE to true, profile script if option given
Set $DEBUG to true
require a specific library (not profiled)
execute the ruby statements (not profiled)
exclude methods by regexp (see method elimination)
exclude methods by regexp listed in file (see method elimination)
make common iterators like Integer#times appear inlined
make common callbacks invocations like Integer#times appear inlined so you can see call origins in graph
Show help message
Show version 0.13.1

COPYRIGHT

ruby-prof was written by Shugo Maeda shugo@ruby-lang.org.

This manual page was written by Arnaud Cornet arnaud.cornet@gmail.com and updated by Jonas Genannt jonas.genannt@capi2name.de for the Debian project (but may be used by others).

SEE ALSO

The ruby-prof website, https://github.com/ruby-prof/ruby-prof

December 2013