Class: Metrician::MethodTimer

Inherits:
Reporter
  • Object
show all
Defined in:
lib/metrician/reporters/method_timer.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Reporter

all, inherited

Class Method Details

.enabled?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/metrician/reporters/method_timer.rb', line 5

def self.enabled?
  Metrician.configuration[:method_timer][:enabled]
end

Instance Method Details

#instrumentObject



9
10
11
# File 'lib/metrician/reporters/method_timer.rb', line 9

def instrument
  Module.send(:include, TimingMethodInterceptor)
end