ruby-prof

bin/ruby-prof
Last Update: Tue Nov 11 17:48:30 -0700 2008

Synopsis

Profiles a Ruby program.

Usage

ruby_prof [options] [—] [script-options]“

Options:

    -p, --printer=printer            Select a printer:
                                       flat - Prints a flat profile as text (default).
                                       graph - Prints a graph profile as text.
                                       graph_html - Prints a graph profile as html.
                                       call_tree - format for KCacheGrind
    -f, --file=path                  Output results to a file instead of standard out.
    -m, --min_percent=min_percent    The minimum percent a method must take before ',
                                     being included in output reports.  Should be an
                                     integer between 1 and 100.  0 means all methods are printed.
        --mode=measure_mode          Select a measurement mode:
                                       process - Use process time (default).
                                       wall - Use wall time.
                                       cpu - Use the CPU clock counter
                                             (only supported on Pentium and PowerPCs).
                                       allocations - Tracks object allocations
                                             (requires a patched Ruby interpreter).
                                       memory - Tracks total memory size
                                             (requires a patched Ruby interpreter).
                                       gc_runs - Tracks number of garbage collection runs
                                             (requires a patched Ruby interpreter).
                                       gc_time - Tracks time spent doing garbage collection
                                             (requires a patched Ruby interpreter).
        --replace-progname           Replace $0 when loading the .rb files.
        --specialized-instruction    Turn on specialized instruction.
    -h, --help                       Show help message
        --version                    Show version

See also: flat profiles, graph profiles, html graph profiles

Required files

  1. ostruct
  2. optparse
  3. ruby-prof