class SoarAnalytics::TimeDeltaReporter
Public Class Methods
new(name:, info_threshold: 0, warn_threshold: nil, error_threshold: nil)
click to toggle source
Calls superclass method
SoarAnalytics::ThresholdReporter::new
# File lib/soar_analytics/time_delta_reporter.rb, line 3 def initialize(name:, info_threshold: 0, warn_threshold: nil, error_threshold: nil) super record_start_time end
Public Instance Methods
report(flow_identifier = nil)
click to toggle source
Calls superclass method
SoarAnalytics::ThresholdReporter#report
# File lib/soar_analytics/time_delta_reporter.rb, line 8 def report(flow_identifier = nil) super(calculate_time_delta, flow_identifier) end
Private Instance Methods
calculate_time_delta()
click to toggle source
# File lib/soar_analytics/time_delta_reporter.rb, line 18 def calculate_time_delta Time.now - @start_time end
record_start_time()
click to toggle source
# File lib/soar_analytics/time_delta_reporter.rb, line 14 def record_start_time @start_time = Time.now end