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

Add type_name info to [TIMING] log output #96106

Merged
merged 1 commit into from
Apr 25, 2022
Merged

Conversation

jihiggins
Copy link
Contributor

Adds type_name to the [TIMING] log output:

[TIMING] (bootstrap::compile::Sysroot) Sysroot { compiler: Compiler { stage: 0, host: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None } } } -- 0.020
[TIMING] (bootstrap::builder::Builder::sysroot_libdir::Libdir) Libdir { compiler: Compiler { stage: 0, host: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None } } -- 0.007

Not sure if that's the best way to format it. Thought about replacing the struct's name with the type_name output, but that feels kind of hacky?

Closes #96060

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 16, 2022
@rust-log-analyzer

This comment has been minimized.

@jyn514
Copy link
Member

jyn514 commented Apr 16, 2022

Not sure if that's the best way to format it. Thought about replacing the struct's name with the type_name output, but that feels kind of hacky?

I think to avoid printing the name twice, you can move this formatting underneath formatter.alternate(): https://doc.rust-lang.org/stable/std/fmt/struct.Formatter.html#method.alternate
and then use {:#} instead of {} in the logging.

(edit: we ended up not doing this since it would have required implementing Debug for each and every Step.)

@rustbot label +S-waiting-on-author -S-waiting-on-review +A-rustbuild

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 16, 2022
src/bootstrap/builder.rs Outdated Show resolved Hide resolved
@jyn514
Copy link
Member

jyn514 commented Apr 16, 2022

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 16, 2022
@Mark-Simulacrum
Copy link
Member

r=me with the two nits

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 16, 2022
@jyn514
Copy link
Member

jyn514 commented Apr 17, 2022

@jihiggins you can use

@rustbot ready

after making changes to let Mark know it's ready for review.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 17, 2022
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=iffy

Thanks! I've gone ahead and also squashed commits here.

@bors
Copy link
Contributor

bors commented Apr 24, 2022

📌 Commit 0fea007 has been approved by Mark-Simulacrum

@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 Apr 24, 2022
@bors
Copy link
Contributor

bors commented Apr 25, 2022

⌛ Testing commit 0fea007 with merge fedbe5d...

@bors
Copy link
Contributor

bors commented Apr 25, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing fedbe5d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 25, 2022
@bors bors merged commit fedbe5d into rust-lang:master Apr 25, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 25, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fedbe5d): comparison url.

Summary: This benchmark run did not return any relevant results.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@jihiggins jihiggins deleted the issue-96060 branch April 25, 2022 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TIMING] debug output does not distinguish checking from building
8 participants