Class: Upkeep::Invalidation::Planner::Plan

Inherits:
Data
  • Object
show all
Defined in:
lib/upkeep/invalidation/planner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#candidate_entriesObject (readonly)

Returns the value of attribute candidate_entries

Returns:

  • (Object)

    the current value of candidate_entries



34
35
36
# File 'lib/upkeep/invalidation/planner.rb', line 34

def candidate_entries
  @candidate_entries
end

#matched_entriesObject (readonly)

Returns the value of attribute matched_entries

Returns:

  • (Object)

    the current value of matched_entries



34
35
36
# File 'lib/upkeep/invalidation/planner.rb', line 34

def matched_entries
  @matched_entries
end

#targetsObject (readonly)

Returns the value of attribute targets

Returns:

  • (Object)

    the current value of targets



34
35
36
# File 'lib/upkeep/invalidation/planner.rb', line 34

def targets
  @targets
end

Instance Method Details

#summaryObject



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/upkeep/invalidation/planner.rb', line 35

def summary
  {
    targets: targets.size,
    represented_subscribers: targets.sum(&:represented_subscriber_count),
    candidate_entries: candidate_entries.size,
    matched_entries: matched_entries.size,
    target_kinds: targets.map { |target| target.target.kind }.uniq.sort,
    manifest_replay_targets: targets.count(&:manifest_replay?),
    deoptimizations: targets.filter_map(&:deoptimization_reason).tally
  }
end