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

Lock stdout once when listing tests #99627

Merged
merged 1 commit into from
Jul 24, 2022
Merged

Conversation

saethlin
Copy link
Member

This is a marginal optimization for normal operation, but for cargo miri nextest list (which is invoked by cargo miri nextest run) this knocks the startup time on regex down from 87 seconds to 17 seconds. Still slow, but a nice 5x improvement.

@rustbot
Copy link
Collaborator

rustbot commented Jul 22, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Jul 22, 2022
@rust-highfive
Copy link
Collaborator

r? @joshtriplett

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 22, 2022
None => OutputLocation::Raw(io::stdout()),
None => OutputLocation::Raw(io::stdout().lock()),
Copy link
Member

Choose a reason for hiding this comment

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

Ahhh classic mistake! Reminds me of this (which was native execution, but hit a syscall instead of lock):

@eddyb
Copy link
Member

eddyb commented Jul 23, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Jul 23, 2022

📌 Commit 90dc0b0 has been approved by eddyb

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 Jul 23, 2022
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 23, 2022
Lock stdout once when listing tests

This is a marginal optimization for normal operation, but for `cargo miri nextest list` (which is invoked by `cargo miri nextest run`) this knocks the startup time on `regex` down from 87 seconds to 17 seconds. Still slow, but a nice 5x improvement.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 23, 2022
…laumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#99298 (Make `ui-fulldeps/gated-plugins` and `ui-fulldeps/multiple-plugins` tests stage 2 only)
 - rust-lang#99396 (Add some additional double-adjustment regression tests)
 - rust-lang#99449 (Do not resolve associated const when there is no provided value)
 - rust-lang#99595 (Mark atomics as unsupported on thumbv6m)
 - rust-lang#99627 (Lock stdout once when listing tests)
 - rust-lang#99638 (Remove Clean trait implementation for hir::Ty and middle::Ty)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 74c3da3 into rust-lang:master Jul 24, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 24, 2022
@saethlin saethlin deleted the lock-once branch September 3, 2022 23:26
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-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants