Module RubyProf
In: lib/ruby-prof.rb
lib/ruby-prof/test.rb
lib/ruby-prof/aggregate_call_info.rb
lib/ruby-prof/printers/graph_html_printer.rb
lib/ruby-prof/printers/call_stack_printer.rb
lib/ruby-prof/printers/call_tree_printer.rb
lib/ruby-prof/printers/flat_printer.rb
lib/ruby-prof/printers/call_info_printer.rb
lib/ruby-prof/printers/abstract_printer.rb
lib/ruby-prof/printers/multi_printer.rb
lib/ruby-prof/printers/graph_printer.rb
lib/ruby-prof/printers/dot_printer.rb
lib/ruby-prof/printers/flat_printer_with_line_numbers.rb
lib/ruby-prof/profile.rb
lib/ruby-prof/method_info.rb
lib/ruby-prof/task.rb
lib/ruby-prof/compatibility.rb
lib/ruby-prof/call_info.rb
lib/ruby-prof/call_info_visitor.rb

The call info visitor class does a depth-first traversal across a thread‘s call stack. At each call_info node, the visitor executes the block provided in the visit method. The block is passed two parameters, the event and the call_info instance. Event will be either :enter or :exit.

  visitor = RubyProf::CallInfoVisitor.new(result.threads.first)

  method_names = Array.new

  visitor.visit do |call_info, event|
    method_names << call_info.target.full_name if event == :enter
  end

  puts method_names

Methods

Classes and Modules

Module RubyProf::Test
Class RubyProf::AbstractPrinter
Class RubyProf::AggregateCallInfo
Class RubyProf::CallInfo
Class RubyProf::CallInfoPrinter
Class RubyProf::CallInfoVisitor
Class RubyProf::CallStackPrinter
Class RubyProf::CallTreePrinter
Class RubyProf::DotPrinter
Class RubyProf::FlatPrinter
Class RubyProf::FlatPrinterWithLineNumbers
Class RubyProf::GraphHtmlPrinter
Class RubyProf::GraphPrinter
Class RubyProf::MethodInfo
Class RubyProf::MultiPrinter
Class RubyProf::Profile
Class RubyProf::ProfileTask

Public Class methods

Measurements

Returns threads ruby-prof should exclude from profiling

Specifies what threads ruby-prof should exclude from profiling

Checks if the user specified the clock mode via the RUBY_PROF_MEASURE_MODE environment variable

Returns what ruby-prof is measuring. Valid values include:

*RubyProf::PROCESS_TIME - Measure process time. This is default. It is implemented using the clock functions in the C Runtime library. *RubyProf::WALL_TIME - Measure wall time using gettimeofday on Linx and GetLocalTime on Windows *RubyProf::CPU_TIME - Measure time using the CPU clock counter. This mode is only supported on Pentium or PowerPC platforms. *RubyProf::ALLOCATIONS - Measure object allocations. This requires a patched Ruby interpreter. *RubyProf::MEMORY - Measure memory size. This requires a patched Ruby interpreter. *RubyProf::GC_RUNS - Measure number of garbage collections. This requires a patched Ruby interpreter. *RubyProf::GC_TIME - Measure time spent doing garbage collection. This requires a patched Ruby interpreter.*/

Specifies what ruby-prof should measure. Valid values include:

*RubyProf::PROCESS_TIME - Measure process time. This is default. It is implemented using the clock functions in the C Runtime library. *RubyProf::WALL_TIME - Measure wall time using gettimeofday on Linx and GetLocalTime on Windows *RubyProf::CPU_TIME - Measure time using the CPU clock counter. This mode is only supported on Pentium or PowerPC platforms. *RubyProf::ALLOCATIONS - Measure object allocations. This requires a patched Ruby interpreter. *RubyProf::MEMORY - Measure memory size. This requires a patched Ruby interpreter. *RubyProf::GC_RUNS - Measure number of garbage collections. This requires a patched Ruby interpreter. *RubyProf::GC_TIME - Measure time spent doing garbage collection. This requires a patched Ruby interpreter.*/

Profiling

[Validate]