Module: DashTimings

Defined in:
lib/dash/sshkit_with_ext.rb

Overview

Deploy-report timing reaches into dash's runtime from code that runs for everyone else using SSHKit in this process too, and this file can be required on its own — without the gem's autoloader and without the DASH commander. So every reach is optional, and it is funnelled through here rather than repeated at each hook, where one site would sooner or later forget the guard and take down every parallel run with a NameError.

Class Method Summary collapse

Class Method Details

.current_entry ⇒ Object



20
21
22
# File 'lib/dash/sshkit_with_ext.rb', line 20

def current_entry
  Dash::Timings.current_entry if defined?(Dash::Timings)
end

.current_entry=(entry) ⇒ Object



24
25
26
# File 'lib/dash/sshkit_with_ext.rb', line 24

def current_entry=(entry)
  Dash::Timings.current_entry = entry if defined?(Dash::Timings)
end

.timings ⇒ Object



16
17
18
# File 'lib/dash/sshkit_with_ext.rb', line 16

def timings
  DASH.timings if defined?(DASH)
end