module ActiveProfiling::RubyProfiler

Public Instance Methods

ruby_profiler(*args, &block) click to toggle source

Runs a block of Ruby code through ruby-prof and returns the profiler output. Returns an Array containing the the result of the block yielded and the profiler data.

For details on the various options, see the default options located in ActiveProfiling::Railtie::DEFAULT_PROFILER_OPTIONS.

# File lib/active-profiling/ruby_profiler.rb, line 14
def ruby_profiler(*args, &block)
  Output.new(*args).run(&block)
end