Skip to content

Conversation

nnethercote
Copy link
Contributor

Some improvements to -Zinput-stats and -Zmeta-stat inspired by the new -Zmacro-stats.

r? @lqd

Taking inspiration from `-Zmacro-stats`:
- Use "{prefix}" consistently.
- Use names for column widths.
- Write output in a single `eprint!` call, in an attempt to minimize
  interleaving of output from different rustc processes.
- Use `repeat` for the long `---` banners.
Currently they have the largest items at the end. I believe the
rationale is that it saves you scrolling up through terminal output
because the important stuff is at the bottom. But it's also surprising
and a bit confusing, and I think the obvious order (big things at the
top) is better.
To make it match `-Zmacro-stats`, and work better if you have enabled it
for multiple crates.
- Print each crate's name.
- Print a `===` banner at the start and end for separation.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 24, 2025
@lqd
Copy link
Member

lqd commented Jun 24, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 24, 2025

📌 Commit b2a57e6 has been approved by lqd

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 24, 2025
bors added a commit that referenced this pull request Jun 24, 2025
Rollup of 7 pull requests

Successful merges:

 - #137268 (Allow comparisons between `CStr`, `CString`, and `Cow<CStr>`.)
 - #142704 (Remove the deprecated unstable `concat_idents!` macro)
 - #142742 ([win][aarch64] Fix linking statics on Arm64EC, take 2)
 - #142843 (Enable reproducible-build-2 for Windows MSVC)
 - #142916 (rustdoc-json: Add test for `#[optimize(..)]`)
 - #142919 (rustdoc-json: Add test for `#[cold]`)
 - #142944 (Stats output tweaks)

Failed merges:

 - #142825 (Port `#[track_caller]` to the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e8dd3c3 into rust-lang:master Jun 24, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Jun 24, 2025
Rollup merge of #142944 - nnethercote:stats-tweaks, r=lqd

Stats output tweaks

Some improvements to `-Zinput-stats` and `-Zmeta-stat` inspired by the new `-Zmacro-stats`.

r? `@lqd`
@rustbot rustbot added this to the 1.90.0 milestone Jun 24, 2025
@nnethercote nnethercote deleted the stats-tweaks branch June 24, 2025 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants