Instrument the given block by measuring the time taken to execute it and publish it. Notice that events get sent even if an error occurs in the passed-in block
# File lib/active_support/notifications/instrumenter.rb, line 17
17: def instrument(name, payload={})
18: started = Time.now
19:
20: begin
21: yield
22: rescue Exception => e
23: payload[:exception] = [e.class.name, e.message]
24: raise e
25: ensure
26: @notifier.publish(name, started, Time.now, @id, payload)
27: end
28: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.