Skip to content

Make test suite finish faster - #320

Merged
jorajeev merged 2 commits into
mainfrom
fast-tests2
Sep 4, 2026
Merged

Make test suite finish faster#320
jorajeev merged 2 commits into
mainfrom
fast-tests2

Conversation

@sarsko

@sarsko sarsko commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Made the test suite faster. The semaphore changes are quite interesting, as the only thing happening there is that we use the main thread for one of the tasks instead of spawning, which drastically cuts down on the number of schedules.

Slowest tests: before vs. after

# Before Time After Time
1 mpsc_some_senders_with_blocking 77.8s async_mpsc_some_senders_with_blocking 22.7s
2 async_mpsc_some_senders_with_blocking 52.2s dropped_acquire_must_release_random (fair) 5.8s
3 batch_semaphore_test_2 34.5s dropped_acquire_must_release_random (unfair) 5.6s
4 semtest_2 30.6s ui (trybuild) 5.0s
5 async_mpsc_many_senders_with_blocking 30.2s clock_condvar_notify_all_dfs 3.2s
6 runtime_mpsc_many_senders_with_blocking 25.0s mpsc_recv_from_outside_runtime 3.0s
Sum of top 6 250.3s Sum of top 6 45.3s

Slowest single test: 77.8s → 22.7s (~3.4x faster). Combined top-6 time: 250.3s → 45.3s (~5.5x faster).
The mpsc/semaphore tests that dominated the old tail are gone from the top 6 entirely.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jorajeev jorajeev 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.

Generally looks fine, though for non-dfs tests, we really don't have a great way to know "how many iterations are enough"

@jorajeev
jorajeev merged commit 1d98077 into main Sep 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants