@@ -21,7 +21,7 @@ use re_query::{
2121} ;
2222use re_smart_channel:: SmartChannelSource ;
2323
24- use crate :: { Error , TimesPerTimeline , ingestion_statistics:: IngestionStatistics } ;
24+ use crate :: { Error , ingestion_statistics:: IngestionStatistics } ;
2525
2626// ----------------------------------------------------------------------------
2727
@@ -86,17 +86,9 @@ pub struct EntityDb {
8686 /// In many places we just store the hashes, so we need a way to translate back.
8787 entity_path_from_hash : IntMap < EntityPathHash , EntityPath > ,
8888
89- /// The global-scope time tracker.
90- ///
91- /// For each timeline, keeps track of what times exist, recursively across all
92- /// entities/components.
93- ///
94- /// Used for time control.
95- ///
96- /// TODO(#7084): Get rid of [`TimesPerTimeline`] and implement time-stepping with [`crate::TimeHistogram`] instead.
97- times_per_timeline : TimesPerTimeline ,
98-
9989 /// A time histogram of all entities, for every timeline.
90+ ///
91+ /// Used for time control and gap detection.
10092 time_histogram_per_timeline : crate :: TimeHistogramPerTimeline ,
10193
10294 /// A tree-view (split on path components) of the entities.
@@ -146,7 +138,6 @@ impl EntityDb {
146138 last_modified_at : web_time:: Instant :: now ( ) ,
147139 latest_row_id : None ,
148140 entity_path_from_hash : Default :: default ( ) ,
149- times_per_timeline : Default :: default ( ) ,
150141 tree : crate :: EntityTree :: root ( ) ,
151142 time_histogram_per_timeline : Default :: default ( ) ,
152143 storage_engine,
@@ -460,10 +451,6 @@ impl EntityDb {
460451 self . storage_engine ( ) . store ( ) . timelines ( )
461452 }
462453
463- pub fn times_per_timeline ( & self ) -> & TimesPerTimeline {
464- & self . times_per_timeline
465- }
466-
467454 pub fn has_any_data_on_timeline ( & self , timeline : & TimelineName ) -> bool {
468455 self . time_histogram_per_timeline
469456 . get ( timeline)
@@ -483,6 +470,11 @@ impl EntityDb {
483470 self . time_histogram_per_timeline . get ( timeline)
484471 }
485472
473+ /// Histogram of all entities and events
474+ pub fn time_histogram_per_timeline ( & self ) -> & crate :: TimeHistogramPerTimeline {
475+ & self . time_histogram_per_timeline
476+ }
477+
486478 #[ inline]
487479 pub fn num_rows ( & self ) -> u64 {
488480 self . storage_engine . read ( ) . store ( ) . stats ( ) . total ( ) . num_rows
@@ -600,7 +592,6 @@ impl EntityDb {
600592
601593 {
602594 // Update our internal views by notifying them of resulting [`ChunkStoreEvent`]s.
603- self . times_per_timeline . on_events ( & store_events) ;
604595 self . time_histogram_per_timeline . on_events ( & store_events) ;
605596 self . tree . on_store_additions ( & store_events) ;
606597
@@ -675,7 +666,6 @@ impl EntityDb {
675666 ) ;
676667
677668 Self :: on_store_deletions (
678- & mut self . times_per_timeline ,
679669 & mut self . time_histogram_per_timeline ,
680670 & mut self . tree ,
681671 engine,
@@ -699,7 +689,6 @@ impl EntityDb {
699689
700690 let store_events = engine. store ( ) . drop_time_range ( timeline, drop_range) ;
701691 Self :: on_store_deletions (
702- & mut self . times_per_timeline ,
703692 & mut self . time_histogram_per_timeline ,
704693 & mut self . tree ,
705694 engine,
@@ -721,7 +710,6 @@ impl EntityDb {
721710
722711 let store_events = engine. store ( ) . drop_entity_path ( entity_path) ;
723712 Self :: on_store_deletions (
724- & mut self . times_per_timeline ,
725713 & mut self . time_histogram_per_timeline ,
726714 & mut self . tree ,
727715 engine,
@@ -749,14 +737,12 @@ impl EntityDb {
749737 // NOTE: Parameters deconstructed instead of taking `self`, because borrowck cannot understand
750738 // partial borrows on methods.
751739 fn on_store_deletions (
752- times_per_timeline : & mut TimesPerTimeline ,
753740 time_histogram_per_timeline : & mut crate :: TimeHistogramPerTimeline ,
754741 tree : & mut crate :: EntityTree ,
755742 mut engine : StorageEngineWriteGuard < ' _ > ,
756743 store_events : & [ ChunkStoreEvent ] ,
757744 ) {
758745 engine. cache ( ) . on_events ( store_events) ;
759- times_per_timeline. on_events ( store_events) ;
760746 time_histogram_per_timeline. on_events ( store_events) ;
761747
762748 let engine = engine. downgrade ( ) ;
0 commit comments