-
Notifications
You must be signed in to change notification settings - Fork 253
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
test: Run tests faster with nextest
#778
Conversation
nextest doesn't support doctests. We will have to run |
Codecov Report
@@ Coverage Diff @@
## main #778 +/- ##
==========================================
+ Coverage 77.37% 77.39% +0.02%
==========================================
Files 94 94
Lines 13735 13730 -5
==========================================
- Hits 10627 10626 -1
+ Misses 3108 3104 -4
Continue to review full report at Codecov.
|
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.
Are the figures from the first commit description up-to-date now?
We may be able to run Edit: |
With
Benchmark 2 is 1.16 times faster than Benchmark 1 I'm not sure how it is possible to run such |
Without
Just on those examples, running tests is 2.01 times faster on average. |
When running |
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.
Removal of dead code is still not a separate commit afaict but otherwise looks good.
> [`cargo-nextest`](https://nexte.st/index.html) is a next-generation > test runner for Rust projects. This patch installs and uses `nextest` to run our own tests. Comparing `cargo test` and `cargo nextest` with hyperfine provides the following results: ```sh $ hyperfine 'cargo test --workspace' 'cargo nextest run --workspace && cargo test --doc' Benchmark 1: cargo test --workspace Time (mean ± σ): 51.785 s ± 2.066 s [User: 183.471 s, System: 10.563 s] Range (min … max): 49.151 s … 56.641 s 10 runs Benchmark 2: cargo nextest run --workspace && cargo test --doc Time (mean ± σ): 44.556 s ± 0.894 s [User: 192.213 s, System: 11.441 s] Range (min … max): 43.170 s … 45.762 s 10 runs ``` Benchmark 2 is 1.16 times faster than Benchmark 1.
`cargo-nextest` doesn't support doctests for now, so we must run them “manually” by running a separate `cargo test --doc` command.
This patch also changes the step's name from Clippy to Test.
Done, d9475c1 :-). |
This patch installs and uses
nextest
to run our own tests.Comparing
cargo test
andcargo nextest
with hyperfine provides thefollowing results:
Benchmark 2 is 1.16 times faster than Benchmark 1
Real numbers are described in #778 (comment).