Class: TestProf::EventProf::Monitor::BaseTracker

Inherits:
Object
  • Object
show all
Defined in:
lib/test_prof/event_prof/monitor.rb

Direct Known Subclasses

TopLevelTracker

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event) ⇒ BaseTracker

Returns a new instance of BaseTracker.



10
11
12
# File 'lib/test_prof/event_prof/monitor.rb', line 10

def initialize(event)
  @event = event
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



8
9
10
# File 'lib/test_prof/event_prof/monitor.rb', line 8

def event
  @event
end

Instance Method Details

#trackObject



14
15
16
# File 'lib/test_prof/event_prof/monitor.rb', line 14

def track
  TestProf::EventProf.instrumenter.instrument(event) { yield }
end