@@ -22,7 +22,10 @@ use ide::{
22
22
Analysis , AnalysisHost , AnnotationConfig , DiagnosticsConfig , Edition , InlayFieldsToResolve ,
23
23
InlayHintsConfig , LineCol , RootDatabase ,
24
24
} ;
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
+ } ;
26
29
use itertools:: Itertools ;
27
30
use load_cargo:: { LoadCargoConfig , ProcMacroServerChoice , load_workspace} ;
28
31
use oorandom:: Rand32 ;
@@ -104,7 +107,7 @@ impl flags::AnalysisStats {
104
107
}
105
108
eprintln ! ( ")" ) ;
106
109
107
- let host = AnalysisHost :: with_database ( db) ;
110
+ let mut host = AnalysisHost :: with_database ( db) ;
108
111
let db = host. raw_database ( ) ;
109
112
110
113
let mut analysis_sw = self . stop_watch ( ) ;
@@ -250,6 +253,9 @@ impl flags::AnalysisStats {
250
253
self . run_term_search ( & workspace, db, & vfs, file_ids, verbosity) ;
251
254
}
252
255
256
+ let db = host. raw_database_mut ( ) ;
257
+ db. trigger_lru_eviction ( ) ;
258
+
253
259
let total_span = analysis_sw. elapsed ( ) ;
254
260
eprintln ! ( "{:<20} {total_span}" , "Total:" ) ;
255
261
report_metric ( "total time" , total_span. time . as_millis ( ) as u64 , "ms" ) ;
0 commit comments