Split add-building dispatch cluster counts
This commit is contained in:
parent
2499c07529
commit
ea551bd853
2 changed files with 57 additions and 1 deletions
|
|
@ -336,6 +336,11 @@ struct RuntimeCompactEventDispatchClusterReport {
|
|||
unknown_descriptor_special_condition_label_matches: Vec<String>,
|
||||
unknown_descriptor_occurrences:
|
||||
BTreeMap<u32, Vec<RuntimeCompactEventDispatchClusterOccurrence>>,
|
||||
add_building_dispatch_record_count: usize,
|
||||
add_building_dispatch_records_with_trigger_kind: usize,
|
||||
add_building_dispatch_records_missing_trigger_kind: usize,
|
||||
add_building_descriptor_occurrence_counts: BTreeMap<String, usize>,
|
||||
add_building_descriptor_map_counts: BTreeMap<String, usize>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
|
|
@ -351,6 +356,11 @@ struct RuntimeCompactEventDispatchClusterCountsReport {
|
|||
dispatch_descriptor_map_counts: BTreeMap<String, usize>,
|
||||
unknown_descriptor_ids: Vec<u32>,
|
||||
unknown_descriptor_special_condition_label_matches: Vec<String>,
|
||||
add_building_dispatch_record_count: usize,
|
||||
add_building_dispatch_records_with_trigger_kind: usize,
|
||||
add_building_dispatch_records_missing_trigger_kind: usize,
|
||||
add_building_descriptor_occurrence_counts: BTreeMap<String, usize>,
|
||||
add_building_descriptor_map_counts: BTreeMap<String, usize>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
|
|
@ -1817,6 +1827,14 @@ fn run_runtime_inspect_compact_event_dispatch_cluster_counts(
|
|||
unknown_descriptor_ids: report.unknown_descriptor_ids,
|
||||
unknown_descriptor_special_condition_label_matches: report
|
||||
.unknown_descriptor_special_condition_label_matches,
|
||||
add_building_dispatch_record_count: report.add_building_dispatch_record_count,
|
||||
add_building_dispatch_records_with_trigger_kind: report
|
||||
.add_building_dispatch_records_with_trigger_kind,
|
||||
add_building_dispatch_records_missing_trigger_kind: report
|
||||
.add_building_dispatch_records_missing_trigger_kind,
|
||||
add_building_descriptor_occurrence_counts: report
|
||||
.add_building_descriptor_occurrence_counts,
|
||||
add_building_descriptor_map_counts: report.add_building_descriptor_map_counts,
|
||||
},
|
||||
};
|
||||
println!("{}", serde_json::to_string_pretty(&output)?);
|
||||
|
|
@ -1838,6 +1856,11 @@ fn build_runtime_compact_event_dispatch_cluster_report(
|
|||
let mut dispatch_strip_payload_families = BTreeMap::<String, usize>::new();
|
||||
let mut dispatch_descriptor_occurrence_counts = BTreeMap::<String, usize>::new();
|
||||
let mut dispatch_descriptor_map_counts = BTreeMap::<String, usize>::new();
|
||||
let mut add_building_dispatch_record_count = 0usize;
|
||||
let mut add_building_dispatch_records_with_trigger_kind = 0usize;
|
||||
let mut add_building_dispatch_records_missing_trigger_kind = 0usize;
|
||||
let mut add_building_descriptor_occurrence_counts = BTreeMap::<String, usize>::new();
|
||||
let mut add_building_descriptor_map_counts = BTreeMap::<String, usize>::new();
|
||||
let mut dispatch_descriptor_occurrences =
|
||||
BTreeMap::<String, Vec<RuntimeCompactEventDispatchClusterOccurrence>>::new();
|
||||
let mut unknown_descriptor_occurrences =
|
||||
|
|
@ -1852,6 +1875,7 @@ fn build_runtime_compact_event_dispatch_cluster_report(
|
|||
|
||||
let mut map_dispatch_strip_record_count = 0usize;
|
||||
let mut map_descriptor_keys = BTreeSet::<String>::new();
|
||||
let mut map_add_building_descriptor_keys = BTreeSet::<String>::new();
|
||||
for record in &summary.records {
|
||||
let matching_rows = record
|
||||
.grouped_effect_rows
|
||||
|
|
@ -1885,6 +1909,7 @@ fn build_runtime_compact_event_dispatch_cluster_report(
|
|||
*dispatch_strip_payload_families
|
||||
.entry(record.payload_family.clone())
|
||||
.or_insert(0) += 1;
|
||||
let mut record_has_add_building = false;
|
||||
let condition_tuples = record
|
||||
.standalone_condition_rows
|
||||
.iter()
|
||||
|
|
@ -1912,6 +1937,13 @@ fn build_runtime_compact_event_dispatch_cluster_report(
|
|||
.entry(descriptor_key.clone())
|
||||
.or_insert(0) += 1;
|
||||
map_descriptor_keys.insert(descriptor_key.clone());
|
||||
if compact_event_dispatch_add_building_descriptor_id(descriptor_id) {
|
||||
record_has_add_building = true;
|
||||
*add_building_descriptor_occurrence_counts
|
||||
.entry(descriptor_key.clone())
|
||||
.or_insert(0) += 1;
|
||||
map_add_building_descriptor_keys.insert(descriptor_key.clone());
|
||||
}
|
||||
dispatch_descriptor_occurrences
|
||||
.entry(descriptor_key)
|
||||
.or_default()
|
||||
|
|
@ -1923,6 +1955,14 @@ fn build_runtime_compact_event_dispatch_cluster_report(
|
|||
.push(occurrence);
|
||||
}
|
||||
}
|
||||
if record_has_add_building {
|
||||
add_building_dispatch_record_count += 1;
|
||||
if record.trigger_kind.is_some() {
|
||||
add_building_dispatch_records_with_trigger_kind += 1;
|
||||
} else {
|
||||
add_building_dispatch_records_missing_trigger_kind += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if map_dispatch_strip_record_count > 0 {
|
||||
|
|
@ -1934,6 +1974,11 @@ fn build_runtime_compact_event_dispatch_cluster_report(
|
|||
.entry(descriptor_key)
|
||||
.or_insert(0) += 1;
|
||||
}
|
||||
for descriptor_key in map_add_building_descriptor_keys {
|
||||
*add_building_descriptor_map_counts
|
||||
.entry(descriptor_key)
|
||||
.or_insert(0) += 1;
|
||||
}
|
||||
}
|
||||
|
||||
let unknown_descriptor_ids = unknown_descriptor_occurrences
|
||||
|
|
@ -1962,9 +2007,18 @@ fn build_runtime_compact_event_dispatch_cluster_report(
|
|||
unknown_descriptor_ids,
|
||||
unknown_descriptor_special_condition_label_matches,
|
||||
unknown_descriptor_occurrences,
|
||||
add_building_dispatch_record_count,
|
||||
add_building_dispatch_records_with_trigger_kind,
|
||||
add_building_dispatch_records_missing_trigger_kind,
|
||||
add_building_descriptor_occurrence_counts,
|
||||
add_building_descriptor_map_counts,
|
||||
})
|
||||
}
|
||||
|
||||
fn compact_event_dispatch_add_building_descriptor_id(descriptor_id: u32) -> bool {
|
||||
(503..=613).contains(&descriptor_id)
|
||||
}
|
||||
|
||||
fn run_runtime_summarize_save_load(smp_path: &Path) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let inspection = inspect_smp_file(smp_path)?;
|
||||
let summary = inspection.save_load_summary.ok_or_else(|| {
|
||||
|
|
|
|||
|
|
@ -321,7 +321,9 @@ Working rule:
|
|||
`runtime inspect-compact-event-dispatch-cluster-counts <map-or-dir>` reuses the same analysis
|
||||
but emits only the corpus-level count fields, so the next broader map-install pass no longer
|
||||
needs to wade through every occurrence payload just to compare descriptor or trigger-kind
|
||||
coverage.
|
||||
coverage; the same counts output now also carries an explicit add-building subset so the
|
||||
acquisition-side branch can compare `Add Building` records and their still-missing trigger-kind
|
||||
coverage without grepping the full occurrence dump.
|
||||
- the per-record trigger gate is explicit now too:
|
||||
direct disassembly of `0x004323a0` shows the service returns before dispatch unless
|
||||
one-shot latch `[event+0x81f]` is clear, mode byte `[event+0x7ef]` matches the selected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue