Class: Vicary::LatencyBaseline::Comparison

Inherits:
Struct
  • Object
show all
Defined in:
lib/vicary/latency_baseline.rb

Overview

The gate's answer, and — when it declines — why.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#baseline_msObject

Returns the value of attribute baseline_ms

Returns:

  • (Object)

    the current value of baseline_ms



37
38
39
# File 'lib/vicary/latency_baseline.rb', line 37

def baseline_ms
  @baseline_ms
end

#comparableObject

Returns the value of attribute comparable

Returns:

  • (Object)

    the current value of comparable



37
38
39
# File 'lib/vicary/latency_baseline.rb', line 37

def comparable
  @comparable
end

#measured_msObject

Returns the value of attribute measured_ms

Returns:

  • (Object)

    the current value of measured_ms



37
38
39
# File 'lib/vicary/latency_baseline.rb', line 37

def measured_ms
  @measured_ms
end

#reasonObject

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



37
38
39
# File 'lib/vicary/latency_baseline.rb', line 37

def reason
  @reason
end

#regression_pctObject

Returns the value of attribute regression_pct

Returns:

  • (Object)

    the current value of regression_pct



37
38
39
# File 'lib/vicary/latency_baseline.rb', line 37

def regression_pct
  @regression_pct
end

#tolerance_pctObject

Returns the value of attribute tolerance_pct

Returns:

  • (Object)

    the current value of tolerance_pct



37
38
39
# File 'lib/vicary/latency_baseline.rb', line 37

def tolerance_pct
  @tolerance_pct
end

Instance Method Details

#holds?Boolean

Returns:

  • (Boolean)


42
43
44
45
46
# File 'lib/vicary/latency_baseline.rb', line 42

def holds?
  return false unless comparable && !regression_pct.nil?

  regression_pct <= tolerance_pct
end