Class: Tremolo::Subscribers::Timing
- Inherits:
-
Base
- Object
- Base
- Tremolo::Subscribers::Timing
show all
- Defined in:
- lib/tremolo/subscribers/timing.rb
Instance Method Summary
collapse
Methods inherited from Base
call, #initialize
Instance Method Details
#db_runtime ⇒ Object
8
9
10
|
# File 'lib/tremolo/subscribers/timing.rb', line 8
def db_runtime
@db_runtime ||= payload[:db_runtime]
end
|
#total_runtime ⇒ Object
4
5
6
|
# File 'lib/tremolo/subscribers/timing.rb', line 4
def total_runtime
@total_runtime ||= event.duration
end
|
#track! ⇒ Object
16
17
18
19
20
|
# File 'lib/tremolo/subscribers/timing.rb', line 16
def track!
tracker.timing('runtime.total', total_runtime, tags)
tracker.timing('runtime.db', db_runtime, tags)
tracker.timing('runtime.view', view_runtime, tags)
end
|
#view_runtime ⇒ Object
12
13
14
|
# File 'lib/tremolo/subscribers/timing.rb', line 12
def view_runtime
@view_runtime ||= payload[:view_runtime]
end
|