Skip to content

Commit 75c6f14

Browse files
authored
Fix the event count in the static-over-temporal error message (#8513)
Regression introduced in #6934 and caught by `check_static_components_ui` Before: ![image](https://github.com/user-attachments/assets/b06bea44-ae51-4989-a3a2-eb4f4a7e1bc0) After: ![image](https://github.com/user-attachments/assets/1250995a-6ae8-42ad-90c9-aee42234ff4f)
1 parent 57b45e7 commit 75c6f14

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

crates/store/re_chunk_store/src/stats.rs

+20
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,24 @@ impl ChunkStore {
320320
.sum()
321321
})
322322
}
323+
324+
/// Returns the number of temporal events logged for an entity for a specific component on all timelines.
325+
///
326+
/// This ignores static events.
327+
pub fn num_temporal_events_for_component_on_all_timelines(
328+
&self,
329+
entity_path: &EntityPath,
330+
component_name: ComponentName,
331+
) -> u64 {
332+
self.all_timelines()
333+
.iter()
334+
.map(|timeline| {
335+
self.num_temporal_events_for_component_on_timeline(
336+
timeline,
337+
entity_path,
338+
component_name,
339+
)
340+
})
341+
.sum()
342+
}
323343
}

crates/viewer/re_data_ui/src/component.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ impl DataUi for ComponentPathLatestAtResults<'_> {
7575

7676
let temporal_message_count = engine
7777
.store()
78-
.num_temporal_events_for_component_on_timeline(
79-
&query.timeline(),
78+
.num_temporal_events_for_component_on_all_timelines(
8079
entity_path,
8180
*component_name,
8281
);

0 commit comments

Comments
 (0)