15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/process_metrics/timer.rb', line 15
def method_added(method_name)
return if method_name =~ /^measure_/ || method_name =~ /^raw_/
ProcessMetrics.config.logger.debug "Adding method #{method_name} in #{self}"
measure_method_name = :"measure_#{method_name}"
if self.instance_methods.include? measure_method_name
ProcessMetrics.config.logger.debug "#{self}##{measure_method_name} exists. Wrapping..."
wrap_method(method_name)
else
ProcessMetrics.config.logger.debug "#{self}##{measure_method_name} does not exist. Exiting..."
end
end
|