class TestProf::EventProf::Instrumentations::ActiveSupport::Subscriber
Attributes
block[R]
started_at[R]
Public Class Methods
new(block)
click to toggle source
# File lib/test_prof/event_prof/instrumentations/active_support.rb, line 10 def initialize(block) @block = block end
Public Instance Methods
finish(*)
click to toggle source
# File lib/test_prof/event_prof/instrumentations/active_support.rb, line 22 def finish(*) block.call(TestProf.now - started_at) end
publish(_name, started_at, finished_at, *)
click to toggle source
# File lib/test_prof/event_prof/instrumentations/active_support.rb, line 18 def publish(_name, started_at, finished_at, *) block.call(finished_at - started_at) end
start(*)
click to toggle source
# File lib/test_prof/event_prof/instrumentations/active_support.rb, line 14 def start(*) @started_at = TestProf.now end