@@ -22,7 +22,10 @@ use ide::{
2222 Analysis , AnalysisHost , AnnotationConfig , DiagnosticsConfig , Edition , InlayFieldsToResolve ,
2323 InlayHintsConfig , LineCol , RootDatabase ,
2424} ;
25- use ide_db:: { EditionedFileId , LineIndexDatabase , SnippetCap , base_db:: SourceDatabase } ;
25+ use ide_db:: {
26+ EditionedFileId , LineIndexDatabase , SnippetCap ,
27+ base_db:: { SourceDatabase , salsa:: Database } ,
28+ } ;
2629use itertools:: Itertools ;
2730use load_cargo:: { LoadCargoConfig , ProcMacroServerChoice , load_workspace} ;
2831use oorandom:: Rand32 ;
@@ -104,7 +107,7 @@ impl flags::AnalysisStats {
104107 }
105108 eprintln ! ( ")" ) ;
106109
107- let host = AnalysisHost :: with_database ( db) ;
110+ let mut host = AnalysisHost :: with_database ( db) ;
108111 let db = host. raw_database ( ) ;
109112
110113 let mut analysis_sw = self . stop_watch ( ) ;
@@ -250,6 +253,9 @@ impl flags::AnalysisStats {
250253 self . run_term_search ( & workspace, db, & vfs, file_ids, verbosity) ;
251254 }
252255
256+ let db = host. raw_database_mut ( ) ;
257+ db. trigger_lru_eviction ( ) ;
258+
253259 let total_span = analysis_sw. elapsed ( ) ;
254260 eprintln ! ( "{:<20} {total_span}" , "Total:" ) ;
255261 report_metric ( "total time" , total_span. time . as_millis ( ) as u64 , "ms" ) ;
0 commit comments