@@ -141,7 +141,7 @@ impl flags::AnalysisStats {
141
141
142
142
workspace_loc += length;
143
143
workspace_item_trees += 1 ;
144
- } else if self . source_stats {
144
+ } else {
145
145
let length = db. file_text ( file_id) . text ( db) . lines ( ) . count ( ) ;
146
146
db. file_item_tree ( EditionedFileId :: current_edition ( file_id) . into ( ) ) ;
147
147
@@ -155,29 +155,25 @@ impl flags::AnalysisStats {
155
155
eprintln ! ( " item trees: {workspace_item_trees}" ) ;
156
156
let item_tree_time = item_tree_sw. elapsed ( ) ;
157
157
158
- if self . source_stats {
159
- eprintln ! ( "Source stats:" ) ;
160
- eprintln ! ( " dependency lines of code: {dep_loc}, item trees: {deps_item_trees}" ) ;
161
- eprintln ! (
162
- " workspace lines of code: {workspace_loc}, item trees: {workspace_item_trees}"
163
- ) ;
158
+ eprintln ! ( "Source stats:" ) ;
159
+ eprintln ! ( " dependency lines of code: {dep_loc}, item trees: {deps_item_trees}" ) ;
160
+ eprintln ! ( " workspace lines of code: {workspace_loc}, item trees: {workspace_item_trees}" ) ;
164
161
165
- // FIXME(salsa-transition): bring back stats for ParseQuery (file size)
166
- // and ParseMacroExpansionQuery (mcaro expansion "file") size whenever we implement
167
- // Salsa's memory usage tracking works with tracked functions.
168
-
169
- // let mut total_file_size = Bytes::default();
170
- // for e in ide_db::base_db::ParseQuery.in_db(db).entries::<Vec<_>>() {
171
- // total_file_size += syntax_len(db.parse(e.key).syntax_node())
172
- // }
173
-
174
- // let mut total_macro_file_size = Bytes::default();
175
- // for e in hir::db::ParseMacroExpansionQuery.in_db(db).entries::<Vec<_>>() {
176
- // let val = db.parse_macro_expansion(e.key).value.0;
177
- // total_macro_file_size += syntax_len(val.syntax_node())
178
- // }
179
- // eprintln!("source files: {total_file_size}, macro files: {total_macro_file_size}");
180
- }
162
+ // FIXME(salsa-transition): bring back stats for ParseQuery (file size)
163
+ // and ParseMacroExpansionQuery (mcaro expansion "file") size whenever we implement
164
+ // Salsa's memory usage tracking works with tracked functions.
165
+
166
+ // let mut total_file_size = Bytes::default();
167
+ // for e in ide_db::base_db::ParseQuery.in_db(db).entries::<Vec<_>>() {
168
+ // total_file_size += syntax_len(db.parse(e.key).syntax_node())
169
+ // }
170
+
171
+ // let mut total_macro_file_size = Bytes::default();
172
+ // for e in hir::db::ParseMacroExpansionQuery.in_db(db).entries::<Vec<_>>() {
173
+ // let val = db.parse_macro_expansion(e.key).value.0;
174
+ // total_macro_file_size += syntax_len(val.syntax_node())
175
+ // }
176
+ // eprintln!("source files: {total_file_size}, macro files: {total_macro_file_size}");
181
177
182
178
eprintln ! ( "{:<20} {}" , "Item Tree Collection:" , item_tree_time) ;
183
179
report_metric ( "item tree time" , item_tree_time. time . as_millis ( ) as u64 , "ms" ) ;
@@ -261,7 +257,7 @@ impl flags::AnalysisStats {
261
257
}
262
258
}
263
259
eprintln ! (
264
- ", mods: {}, decls: {num_decls}, bodies: {}, adts: {}, consts: {}" ,
260
+ ", mods: {}, decls: {num_decls}, bodies: {}, adts: {}, consts: {}, " ,
265
261
visited_modules. len( ) ,
266
262
bodies. len( ) ,
267
263
adts. len( ) ,
0 commit comments