Class: Necropsy::Bench::ReleaseAudit::PerformanceGate

Inherits:
Object
  • Object
show all
Defined in:
lib/necropsy/bench/release_audit/performance_gate.rb

Constant Summary collapse

PROVENANCE_FIELDS =
%w[ruby os command rss_kind rss_scope].freeze

Instance Method Summary collapse

Constructor Details

#initialize(config:, baseline:, current_summary:, current_provenance:) ⇒ PerformanceGate

Returns a new instance of PerformanceGate.



9
10
11
12
13
14
15
# File 'lib/necropsy/bench/release_audit/performance_gate.rb', line 9

def initialize(config:, baseline:, current_summary:, current_provenance:)
  @config = config
  @baseline_document = baseline
  @baseline = baseline.fetch('corpora')
  @current = current_summary.fetch('corpora').to_h { |corpus| [corpus.fetch('id'), corpus] }
  @current_provenance = current_provenance
end

Instance Method Details

#callObject



17
18
19
20
21
# File 'lib/necropsy/bench/release_audit/performance_gate.rb', line 17

def call
  config.fetch('corpora').sort.to_h do |corpus|
    [corpus, compare_or_unavailable(corpus)]
  end
end