diff --git a/crates/store/re_chunk_store/src/stats.rs b/crates/store/re_chunk_store/src/stats.rs index 1f281b8179be..213d946b9b23 100644 --- a/crates/store/re_chunk_store/src/stats.rs +++ b/crates/store/re_chunk_store/src/stats.rs @@ -320,4 +320,24 @@ impl ChunkStore { .sum() }) } + + /// Returns the number of temporal events logged for an entity for a specific component on all timelines. + /// + /// This ignores static events. + pub fn num_temporal_events_for_component_on_all_timelines( + &self, + entity_path: &EntityPath, + component_name: ComponentName, + ) -> u64 { + self.all_timelines() + .iter() + .map(|timeline| { + self.num_temporal_events_for_component_on_timeline( + timeline, + entity_path, + component_name, + ) + }) + .sum() + } } diff --git a/crates/viewer/re_data_ui/src/component.rs b/crates/viewer/re_data_ui/src/component.rs index eeab5dabdbf0..663923ddb5cd 100644 --- a/crates/viewer/re_data_ui/src/component.rs +++ b/crates/viewer/re_data_ui/src/component.rs @@ -75,8 +75,7 @@ impl DataUi for ComponentPathLatestAtResults<'_> { let temporal_message_count = engine .store() - .num_temporal_events_for_component_on_timeline( - &query.timeline(), + .num_temporal_events_for_component_on_all_timelines( entity_path, *component_name, );