scout_apm v1.0.7 ScoutApm.ScoredItemSet
A capped set type that has a few rules on inclusion.
When you add an item, it must be a tuple of shape: {{:score, integer, key}, item}
Where the key uniquely identifies the item, as a string. The score is a unitless relative "value" of this item, and then the item itself can be any structure
Only the highest score of each key is kept, no duplicates, even if the set has "room" for it.
Only the highest scores will be kept when at capacity. Adding a new element may or may result in the new item evicting an old one, or being simply dropped, based on the comparison of the scores.
Link to this section Summary
Link to this section Types
Link to this type
t()
t() :: %ScoutApm.ScoredItemSet{ data: %{required(any()) => scored_item()}, options: options() }