Skip to content

Commit

Permalink
Fix the event count in the static-over-temporal error message
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Dec 17, 2024
1 parent 57b45e7 commit d2b71b9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
20 changes: 20 additions & 0 deletions crates/store/re_chunk_store/src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
3 changes: 1 addition & 2 deletions crates/viewer/re_data_ui/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down

0 comments on commit d2b71b9

Please sign in to comment.