Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reduce width of subnode name in ast-stats #157

Merged
merged 1 commit into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/sema/src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl StatCollector {
for (label, subnode) in subnodes {
let size = subnode.count * subnode.size;
eprintln!(
"{} - {:<18}{:>10} ({:4.1}%){:>14}",
"{} - {:<16}{:>10} ({:4.1}%){:>14}",
prefix,
label,
to_readable_str(size),
Expand Down
16 changes: 8 additions & 8 deletions tests/ui/stats/ast.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ ast-stats VariableDefinition 88 ( 5.0%) 1 88
ast-stats Span 96 ( 5.4%) 12 8
ast-stats DocComments 112 ( 6.3%) 7 16
ast-stats Stmt 160 ( 9.0%) 2 80
ast-stats - Expr 160 ( 9.0%) 2
ast-stats - Expr 160 ( 9.0%) 2
ast-stats ItemFunction 224 (12.6%) 2 112
ast-stats Expr 240 (13.5%) 5 48
ast-stats - Assign 48 ( 2.7%) 1
ast-stats - Unary 48 ( 2.7%) 1
ast-stats - Ident 144 ( 8.1%) 3
ast-stats - Assign 48 ( 2.7%) 1
ast-stats - Unary 48 ( 2.7%) 1
ast-stats - Ident 144 ( 8.1%) 3
ast-stats Item 680 (38.4%) 5 136
ast-stats - Variable 136 ( 7.7%) 1
ast-stats - Contract 136 ( 7.7%) 1
ast-stats - Pragma 136 ( 7.7%) 1
ast-stats - Function 272 (15.3%) 2
ast-stats - Variable 136 ( 7.7%) 1
ast-stats - Contract 136 ( 7.7%) 1
ast-stats - Pragma 136 ( 7.7%) 1
ast-stats - Function 272 (15.3%) 2
ast-stats ----------------------------------------------------------------
ast-stats Total 1_772
ast-stats
Loading