-
Notifications
You must be signed in to change notification settings - Fork 14
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
Expose Lithops wait_dur_sec
to speed up tests
#456
Conversation
…ompleted tasks Set to a smaller value for tests so they complete faster.
The tests running on ubuntu-latest Python 3.9 went from 13m52s to 8m49s. Others showed significant improvements too. (I also noticed that ubuntu-latest Python 3.12 is a lot slower than 3.9 - almost 2x - would be good to look into it.) |
Hi @tomwhite, While running the cubed tests recently, I noticed a few details that could help improve their performance: Firstly, regarding your observation about tests running 2x slower in Python 3.12, I found that this slowdown is caused by the - name: Run tests
run: |
if [ "$RUNNER_OS" == "Linux" ] && [ "${{ matrix.python-version }}" == "3.9" ]; then
pytest -v --cov=cubed --cov-report=term-missing --cov-fail-under=90
else
pytest -v
fi Secondly, in Lithops, there is a configuration parameter that allows you to disable the LITHOPS_LOCAL_CONFIG = {
"lithops": {
"backend": "localhost",
"storage": "localhost",
"monitoring_interval": 0.1,
"include_modules": None
}
} The overhead of the In summary, with these two changes, the tests can run in approximately 8 minutes instead of the current 17 minutes. |
Thanks for helping speed up the Cubed tests @JosepSampe! I found this issue about the slow down in Python 3.12: nedbat/coveragepy#1665. It looks like you can now set Regarding |
I've been thinking about this, but right now I'm not sure if all the use cases will align with yours. For example, in the Lithops tests, I need this activated to ensure the module_manager is working properly. Additionally, if you set a runtime different from the interpreter you use to invoke the Lithops script, such as a container image, this needs to be activated as well. But in any case, I will check if it is feasible and ensure it won't break any existing code from other users. |
+1 sounds good. |
Set to a smaller value for tests so they complete faster.
This is related to lithops-cloud/lithops#1292, but doesn't need any changes to Lithops. It's possible that there are more improvements to be made, but this already helps speed up the tests.