diff --git a/crates/rrt-cli/src/main.rs b/crates/rrt-cli/src/main.rs index 9b68c7d..ddd967f 100644 --- a/crates/rrt-cli/src/main.rs +++ b/crates/rrt-cli/src/main.rs @@ -314,6 +314,8 @@ struct RuntimeCompactEventDispatchClusterReport { dispatch_strip_records_with_trigger_kind: usize, dispatch_strip_records_missing_trigger_kind: usize, dispatch_strip_payload_families: BTreeMap, + dispatch_descriptor_occurrence_counts: BTreeMap, + dispatch_descriptor_map_counts: BTreeMap, dispatch_descriptor_occurrences: BTreeMap>, unknown_descriptor_ids: Vec, @@ -1724,6 +1726,8 @@ fn run_runtime_inspect_compact_event_dispatch_cluster( let mut dispatch_strip_records_with_trigger_kind = 0usize; let mut dispatch_strip_records_missing_trigger_kind = 0usize; let mut dispatch_strip_payload_families = BTreeMap::::new(); + let mut dispatch_descriptor_occurrence_counts = BTreeMap::::new(); + let mut dispatch_descriptor_map_counts = BTreeMap::::new(); let mut dispatch_descriptor_occurrences = BTreeMap::>::new(); let mut unknown_descriptor_occurrences = @@ -1737,6 +1741,7 @@ fn run_runtime_inspect_compact_event_dispatch_cluster( maps_with_event_runtime_collection += 1; let mut map_dispatch_strip_record_count = 0usize; + let mut map_descriptor_keys = BTreeSet::::new(); for record in &summary.records { let matching_rows = record .grouped_effect_rows @@ -1792,8 +1797,13 @@ fn run_runtime_inspect_compact_event_dispatch_cluster( condition_tuples: condition_tuples.clone(), rows: rows.clone(), }; + let descriptor_key = compact_event_dispatch_descriptor_key(descriptor_id, &rows); + *dispatch_descriptor_occurrence_counts + .entry(descriptor_key.clone()) + .or_insert(0) += 1; + map_descriptor_keys.insert(descriptor_key.clone()); dispatch_descriptor_occurrences - .entry(compact_event_dispatch_descriptor_key(descriptor_id, &rows)) + .entry(descriptor_key) .or_default() .push(occurrence.clone()); if rows.iter().all(|row| row.descriptor_label.is_none()) { @@ -1809,6 +1819,11 @@ fn run_runtime_inspect_compact_event_dispatch_cluster( maps_with_dispatch_strip_records += 1; dispatch_strip_record_count += map_dispatch_strip_record_count; } + for descriptor_key in map_descriptor_keys { + *dispatch_descriptor_map_counts + .entry(descriptor_key) + .or_insert(0) += 1; + } } let unknown_descriptor_ids = unknown_descriptor_occurrences @@ -1833,6 +1848,8 @@ fn run_runtime_inspect_compact_event_dispatch_cluster( dispatch_strip_records_with_trigger_kind, dispatch_strip_records_missing_trigger_kind, dispatch_strip_payload_families, + dispatch_descriptor_occurrence_counts, + dispatch_descriptor_map_counts, dispatch_descriptor_occurrences, unknown_descriptor_ids, unknown_descriptor_special_condition_label_matches,