class TestProf::EventProf::Monitor::TopLevelTracker
Attributes
id[R]
Public Class Methods
new(event)
click to toggle source
Calls superclass method
TestProf::EventProf::Monitor::BaseTracker::new
# File lib/test_prof/event_prof/monitor.rb, line 22 def initialize(event) super @id = :"event_prof_monitor_#{event}" Thread.current[id] = 0 end
Public Instance Methods
track() { || ... }
click to toggle source
Calls superclass method
TestProf::EventProf::Monitor::BaseTracker#track
# File lib/test_prof/event_prof/monitor.rb, line 28 def track Thread.current[id] += 1 res = nil begin res = if Thread.current[id] == 1 super { yield } else yield end ensure Thread.current[id] -= 1 end res end