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

Speed-up test by slicing time.sleep #1345

Merged
merged 1 commit into from
Nov 2, 2023
Merged

Speed-up test by slicing time.sleep #1345

merged 1 commit into from
Nov 2, 2023

Conversation

khk-globus
Copy link
Contributor

CPython's time.sleep() holds the thread in C-land, making it, for most usages, uninterruptible. Sleeping in small increments for the total duration allows the thread to be interrupted, which allows us to shave about 1 second off the run-time.

Type of change

  • Code maintenance/cleanup

CPython's `time.sleep()` holds the thread in C-land, making it, for most
usages, uninterruptible.  Sleeping in small increments for the total duration
allows the thread to be interrupted, which allows us to shave about 1 second
off the run-time.
@khk-globus khk-globus added no-news-is-good-news This change does not require a news file quick-review Review of this should be quick and easy labels Nov 2, 2023
Copy link
Member

@rjmello rjmello left a comment

Choose a reason for hiding this comment

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

Nice! 🎸

@khk-globus khk-globus merged commit 69e4a52 into main Nov 2, 2023
30 checks passed
@khk-globus khk-globus deleted the improve_test_speed branch November 2, 2023 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-news-is-good-news This change does not require a news file quick-review Review of this should be quick and easy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants