Class: Coradoc::PerformanceRegression::BenchmarkResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/coradoc/performance_regression.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#durationObject

Returns the value of attribute duration

Returns:

  • (Object)

    the current value of duration



18
19
20
# File 'lib/coradoc/performance_regression.rb', line 18

def duration
  @duration
end

#iterationsObject

Returns the value of attribute iterations

Returns:

  • (Object)

    the current value of iterations



18
19
20
# File 'lib/coradoc/performance_regression.rb', line 18

def iterations
  @iterations
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



18
19
20
# File 'lib/coradoc/performance_regression.rb', line 18

def name
  @name
end

#thresholdObject

Returns the value of attribute threshold

Returns:

  • (Object)

    the current value of threshold



18
19
20
# File 'lib/coradoc/performance_regression.rb', line 18

def threshold
  @threshold
end

Instance Method Details

#passed?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/coradoc/performance_regression.rb', line 23

def passed?
  duration < threshold
end

#to_hObject



19
20
21
# File 'lib/coradoc/performance_regression.rb', line 19

def to_h
  { name:, duration:, iterations:, threshold:, passed: passed? }
end