Module: MethodProfiler

Defined in:
lib/method_profiler.rb,
lib/method_profiler/report.rb,
lib/method_profiler/profiler.rb

Overview

MethodProfiler collects performance information about the methods in your objects and creates reports to help you identify slow methods.

Defined Under Namespace

Classes: Profiler, Report

Class Method Summary collapse

Class Method Details

.observe(obj) ⇒ MethodProfiler::Profiler

Create a new Profiler which will observe all method calls on the given object. This is a convenience method and has the same effect as MethodProfiler::Profiler#initialize.

Parameters:

  • obj (Object)

    The object to observe.

Returns:



14
15
16
# File 'lib/method_profiler.rb', line 14

def self.observe(obj)
  Profiler.new(obj)
end