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

Improve test suite time by 25% #606

Merged
merged 2 commits into from
May 30, 2023
Merged

Improve test suite time by 25% #606

merged 2 commits into from
May 30, 2023

Conversation

stefsmeets
Copy link
Contributor

@stefsmeets stefsmeets commented May 30, 2023

Hey, I noticed that some of the tests are quite slow. I had a quick look and noticed the RISE image pipeline test can be made about 20 times faster by reducing the shape of the image:

Before:
28.10s call tests/test_common_usage.py::test_common_RISE_image_pipeline

After:
1.74s call tests/test_common_usage.py::test_common_RISE_image_pipeline

Since we are testing the pipeline only, the size of the image is irrelevant (it's filled with random data anyway). This takes the time needed to run the tests down from 0:01:59 to 0:01:31 on my setup.

Copy link
Member

@geek-yang geek-yang left a comment

Choose a reason for hiding this comment

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

Well spot! Nice change. I simply time the execution with time pytest tests/test_common_usage.py::test_common_RISE_image_pipeline and the actual time for the process is "0.852s" and "0.158s", before and after. 😎 Good to have this improved!

@stefsmeets stefsmeets merged commit 6f32ed3 into main May 30, 2023
@stefsmeets stefsmeets deleted the tests-speed branch May 30, 2023 12:29
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