Skip to content

fix(timings): only report units the job queue actually ran#17238

Merged
weihanglo merged 2 commits into
rust-lang:masterfrom
hirehamir:fix/unactionable-0-second-output
Jul 19, 2026
Merged

fix(timings): only report units the job queue actually ran#17238
weihanglo merged 2 commits into
rust-lang:masterfrom
hirehamir:fix/unactionable-0-second-output

Conversation

@hirehamir

Copy link
Copy Markdown
Contributor

What Does This PR Try to Resolve?

Fixes #17212

How to Test and Review This PR?

The first commit adds tests pinning the current behavior.

The second commit fixes the underlying issues and updates the tests as needed.

@rustbot rustbot added A-timings Area: timings Command-report S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 19, 2026
@rustbot

rustbot commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @epage, @weihanglo
  • @epage, @weihanglo expanded to epage, weihanglo
  • Random selection from epage, weihanglo

@weihanglo weihanglo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

View changes since this review

Comment thread tests/testsuite/timings.rs
Comment thread src/ops/cargo_report/timings.rs
Comment thread src/ops/cargo_report/timings.rs Outdated
if error_if_no_units && units.is_empty() {
anyhow::bail!("no timing data found in log");
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are a couple of different cases here

  • Idle sessions: test = false / doctest = false.
  • All fresh units sessions
  • Corrupted sessions: Failed during resolutions or something

We don't need to deal with them now, though I think for cargo report timings there is a room for deciding whether they all need to bail.

@hirehamir
hirehamir force-pushed the fix/unactionable-0-second-output branch from ba01954 to d52defc Compare July 19, 2026 20:11
@rustbot

rustbot commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@weihanglo
weihanglo enabled auto-merge July 19, 2026 21:17
@hirehamir
hirehamir requested a review from weihanglo July 19, 2026 22:49

@weihanglo weihanglo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weihanglo
weihanglo added this pull request to the merge queue Jul 19, 2026
@hirehamir

Copy link
Copy Markdown
Contributor Author

You're welcome!

Merged via the queue into rust-lang:master with commit e09f57a Jul 19, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 19, 2026
@hirehamir
hirehamir deleted the fix/unactionable-0-second-output branch July 20, 2026 06:09
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jul 25, 2026
Update cargo submodule

17 commits in 3efb1f477e99b42974b982d939fd100303cdf7db..54b61f13a4eea47ec3ee95237d4107976d7909ed
2026-07-17 23:53:19 +0000 to 2026-07-24 13:23:18 +0000
- chore: bump to `[email protected]+1.9.6` (rust-lang/cargo#17259)
- Enable build-dir layout v2 on nightly by default (rust-lang/cargo#17258)
- fix(path): clarify error message when path dependency has wrong package (rust-lang/cargo#16927)
- fix(toml): warn on hyphenated lint names and duplicates (rust-lang/cargo#17051)
- fix(test): gate trim-paths tests on split debuginfo support (rust-lang/cargo#17256)
- test(git): Explicitly test for git injection attacks (rust-lang/cargo#17253)
- fix(git): Suggest libgit2 if git-cli fails (rust-lang/cargo#17252)
- fix(diag): bound transitive unused dependency traversal (rust-lang/cargo#17251)
- fix(git): Hide git fetch output without progress  (rust-lang/cargo#17243)
- revert(lint): Remove `new_implicit_minimum_version_req` (rust-lang/cargo#16321) (rust-lang/cargo#17249)
- fix: Add haiku's dylib path (rust-lang/cargo#17248)
- Zsh completion: Add `-p` and `--package` flags for `cargo add` (rust-lang/cargo#17247)
- refactor(source): Clarify the name of the remote git registry (rust-lang/cargo#17240)
- fix(timings): only report units the job queue actually ran (rust-lang/cargo#17238)
- Do not include proc-macro deps in rustc search path args (rust-lang/cargo#17236)
- chore(deps): update cargo-semver-checks to v0.49.0 (rust-lang/cargo#17237)
- rustdoc: rename the doc parts metadata params (rust-lang/cargo#17234)

r? ghost
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jul 25, 2026
Update cargo submodule



17 commits in 3efb1f477e99b42974b982d939fd100303cdf7db..54b61f13a4eea47ec3ee95237d4107976d7909ed
2026-07-17 23:53:19 +0000 to 2026-07-24 13:23:18 +0000
- chore: bump to `[email protected]+1.9.6` (rust-lang/cargo#17259)
- Enable build-dir layout v2 on nightly by default (rust-lang/cargo#17258)
- fix(path): clarify error message when path dependency has wrong package (rust-lang/cargo#16927)
- fix(toml): warn on hyphenated lint names and duplicates (rust-lang/cargo#17051)
- fix(test): gate trim-paths tests on split debuginfo support (rust-lang/cargo#17256)
- test(git): Explicitly test for git injection attacks (rust-lang/cargo#17253)
- fix(git): Suggest libgit2 if git-cli fails (rust-lang/cargo#17252)
- fix(diag): bound transitive unused dependency traversal (rust-lang/cargo#17251)
- fix(git): Hide git fetch output without progress  (rust-lang/cargo#17243)
- revert(lint): Remove `new_implicit_minimum_version_req` (rust-lang/cargo#16321) (rust-lang/cargo#17249)
- fix: Add haiku's dylib path (rust-lang/cargo#17248)
- Zsh completion: Add `-p` and `--package` flags for `cargo add` (rust-lang/cargo#17247)
- refactor(source): Clarify the name of the remote git registry (rust-lang/cargo#17240)
- fix(timings): only report units the job queue actually ran (rust-lang/cargo#17238)
- Do not include proc-macro deps in rustc search path args (rust-lang/cargo#17236)
- chore(deps): update cargo-semver-checks to v0.49.0 (rust-lang/cargo#17237)
- rustdoc: rename the doc parts metadata params (rust-lang/cargo#17234)

r? ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timing report for tests has zero-second entries for doc tests

3 participants