-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[compiletest] Parallelize test discovery #140177
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
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
Some changes occurred in src/tools/compiletest cc @jieyouxu These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This comment has been minimized.
This comment has been minimized.
Certain filesystems for large monorepos are slow to service individual read requests, but can service many in parallel. This change brings down the time to run a single cached test on one of those filesystems from 40s to about 8s.
6e8e722
to
09e36ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This is quite a significant improvement even in my local testing. It turns out
Certain filesystems
can even include ReFS on a local Windows dev drive.
Test collection time diff
Measured against 1a5bf12 + naive time recording around top-level collect_tests_from_dir
.
x86_64-unknown-linux-gnu
(WSL)
State | collect_tests_from_dir duration on tests/ui |
---|---|
Without this PR | 362.296834ms |
With this PR | 248.394981ms |
x86_64-pc-windows-msvc
(PowerShell, native)
State | collect_tests_from_dir duration on tests/ui |
---|---|
Without this PR | 2.5187741s |
With this PR | 507.9907ms |
Additionally, I ran ./x test ui
and ./x test run-make
to double-check if the number of runned tests and test outcomes look "expected", which they did.
@bors r+ rollup |
[compiletest] Parallelize test discovery Certain filesystems are slow to service individual read requests, but can service many in parallel. This change brings down the time to run a single cached test on one of those filesystems from 40s to about 8s.
Rollup of 23 pull requests Successful merges: - rust-lang#139261 (mitigate MSVC alignment issue on x86-32) - rust-lang#139307 (std: Add performance warnings to HashMap::get_disjoint_mut) - rust-lang#139700 (Autodiff flags) - rust-lang#139752 (set subsections_via_symbols for ld64 helper sections) - rust-lang#139809 (Don't warn about `v128` in wasm ABI transition) - rust-lang#139852 (StableMIR: Implement `CompilerInterface`) - rust-lang#139945 (Extend HIR to track the source and syntax of a lifetime) - rust-lang#140028 (`deref_patterns`: support string and byte string literals in explicit `deref!("...")` patterns) - rust-lang#140139 (rustc_target: Adjust RISC-V feature implication) - rust-lang#140143 (Move `sys::pal::os::Env` into `sys::env`) - rust-lang#140148 (CI: use aws codebuild for job dist-arm-linux) - rust-lang#140150 (fix MAX_EXP and MIN_EXP docs) - rust-lang#140172 (Make algebraic functions into `const fn` items.) - rust-lang#140177 ([compiletest] Parallelize test discovery) - rust-lang#140181 (Remove `synstructure::Structure::underscore_const` calls.) - rust-lang#140184 (Update doc of cygwin target) - rust-lang#140186 (Rename `compute_x` methods) - rust-lang#140187 ([AIX] Handle AIX dynamic library extensions within c-link-to-rust-dylib run-make test) - rust-lang#140191 (Remove git repository from git config) - rust-lang#140194 (minicore: Have `//@ add-core-stubs` also imply `-Cforce-unwind-tables=yes`) - rust-lang#140195 (triagebot: label minicore changes w/ `A-test-infra-minicore` and ping jieyouxu on changes) - rust-lang#140202 (Make #![feature(let_chains)] bootstrap conditional in compiler/) - rust-lang#140214 (Remove comment about handling non-global where bounds with corresponding projection) r? `@ghost` `@rustbot` modify labels: rollup
[compiletest] Parallelize test discovery Certain filesystems are slow to service individual read requests, but can service many in parallel. This change brings down the time to run a single cached test on one of those filesystems from 40s to about 8s.
Wait sorry this shouldn't have been rollup=always. |
@tmandry could you introduce a synthetic compiler tree change, like maybe a temporary comment in
(Maybe tool changes should inhibit download-rustc in CI, but that's a separate topic) |
For post-merge test metrics, |
Please feel free to r=me after adding a synthetic |
Some changes occurred in coverage instrumentation. cc @Zalathar Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
I've pushed a trivial compiler style fix to inhibit download-rustc. No need to revert it afterwards. @bors r=jieyouxu |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 555e1d0 (parent) -> d3508a8 (this PR) Test differencesNo test diffs found Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d3508a8ad0163fab0c9b2188b3adf43c87200788 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (d3508a8): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 0.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary -0.6%, secondary 3.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 776.189s -> 775.41s (-0.10%) |
Certain filesystems are slow to service individual read requests, but can service many in parallel. This change brings down the time to run a single cached test on one of those filesystems from 40s to about 8s.