@@ -137,7 +137,7 @@ impl flags::AnalysisStats {
137137
138138 workspace_loc += length;
139139 workspace_item_trees += 1 ;
140- } else if self . source_stats {
140+ } else {
141141 let length = db. file_text ( file_id) . text ( db) . lines ( ) . count ( ) ;
142142 db. file_item_tree ( EditionedFileId :: current_edition ( file_id) . into ( ) ) ;
143143
@@ -151,29 +151,25 @@ impl flags::AnalysisStats {
151151 eprintln ! ( " item trees: {workspace_item_trees}" ) ;
152152 let item_tree_time = item_tree_sw. elapsed ( ) ;
153153
154- if self . source_stats {
155- eprintln ! ( "Source stats:" ) ;
156- eprintln ! ( " dependency lines of code: {dep_loc}, item trees: {deps_item_trees}" ) ;
157- eprintln ! (
158- " workspace lines of code: {workspace_loc}, item trees: {workspace_item_trees}"
159- ) ;
154+ eprintln ! ( "Source stats:" ) ;
155+ eprintln ! ( " dependency lines of code: {dep_loc}, item trees: {deps_item_trees}" ) ;
156+ eprintln ! ( " workspace lines of code: {workspace_loc}, item trees: {workspace_item_trees}" ) ;
160157
161- // FIXME(salsa-transition): bring back stats for ParseQuery (file size)
162- // and ParseMacroExpansionQuery (mcaro expansion "file") size whenever we implement
163- // Salsa's memory usage tracking works with tracked functions.
164-
165- // let mut total_file_size = Bytes::default();
166- // for e in ide_db::base_db::ParseQuery.in_db(db).entries::<Vec<_>>() {
167- // total_file_size += syntax_len(db.parse(e.key).syntax_node())
168- // }
169-
170- // let mut total_macro_file_size = Bytes::default();
171- // for e in hir::db::ParseMacroExpansionQuery.in_db(db).entries::<Vec<_>>() {
172- // let val = db.parse_macro_expansion(e.key).value.0;
173- // total_macro_file_size += syntax_len(val.syntax_node())
174- // }
175- // eprintln!("source files: {total_file_size}, macro files: {total_macro_file_size}");
176- }
158+ // FIXME(salsa-transition): bring back stats for ParseQuery (file size)
159+ // and ParseMacroExpansionQuery (mcaro expansion "file") size whenever we implement
160+ // Salsa's memory usage tracking works with tracked functions.
161+
162+ // let mut total_file_size = Bytes::default();
163+ // for e in ide_db::base_db::ParseQuery.in_db(db).entries::<Vec<_>>() {
164+ // total_file_size += syntax_len(db.parse(e.key).syntax_node())
165+ // }
166+
167+ // let mut total_macro_file_size = Bytes::default();
168+ // for e in hir::db::ParseMacroExpansionQuery.in_db(db).entries::<Vec<_>>() {
169+ // let val = db.parse_macro_expansion(e.key).value.0;
170+ // total_macro_file_size += syntax_len(val.syntax_node())
171+ // }
172+ // eprintln!("source files: {total_file_size}, macro files: {total_macro_file_size}");
177173
178174 eprintln ! ( "{:<20} {}" , "Item Tree Collection:" , item_tree_time) ;
179175 report_metric ( "item tree time" , item_tree_time. time . as_millis ( ) as u64 , "ms" ) ;
@@ -257,7 +253,7 @@ impl flags::AnalysisStats {
257253 }
258254 }
259255 eprintln ! (
260- ", mods: {}, decls: {num_decls}, bodies: {}, adts: {}, consts: {}" ,
256+ ", mods: {}, decls: {num_decls}, bodies: {}, adts: {}, consts: {}, " ,
261257 visited_modules. len( ) ,
262258 bodies. len( ) ,
263259 adts. len( ) ,
0 commit comments