@@ -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 ( ) ;
@@ -256,6 +259,8 @@ impl flags::AnalysisStats {
256
259
if let Some ( instructions) = total_span. instructions {
257
260
report_metric ( "total instructions" , instructions, "#instr" ) ;
258
261
}
262
+ let db = host. raw_database_mut ( ) ;
263
+ db. trigger_lru_eviction ( ) ;
259
264
report_metric ( "total memory" , total_span. memory . allocated . megabytes ( ) as u64 , "MB" ) ;
260
265
261
266
if self . source_stats {
0 commit comments