Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: reduce width of subnode name in ast-stats (paradigmxyz#157)
Browse files Browse the repository at this point in the history
TilakMaddy committed Dec 10, 2024
1 parent af1d07f commit 9ce9cda
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/sema/src/stats.rs
Original file line number Diff line number Diff line change
@@ -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),
16 changes: 8 additions & 8 deletions tests/ui/stats/ast.stderr
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9ce9cda

Please sign in to comment.