-
Notifications
You must be signed in to change notification settings - Fork 213
4-5x slowdown using pytest-cov #159
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
Comments
Maybe you forgot to install the python-dev(el) package in your container (coverage would be compiled without the C extensions then). Tracing with pure python code is sloooooooow. |
Looks like that was it. I made sure python-dev was installed in the container I build my wheels in and I'm now seeing similar times with and without coverage. Thanks! |
@jwineinger can you let me know how exactly did you do this? I run the tests within the docker container and the below command to install the same within the container does not seem to improve the speed. the tests without
|
@emjeyforta I use a multi-stage build. First stage builds wheels of my package and all dependencies. Later stages install them, and then we run tests in the resulting image. The first stage (now from python:3.12-slim) installs python3-dev (along with gcc and other non-python dev packages) like you have. I see nothing else relevant that pops out, sorry. 7 years is a long time to remember details. |
For some reason, I'm seeing a significant slowdown when using pytest-cov. The following test runs were literally one right after another.
FWIW, I'm running these in a docker-compose environment on docker for mac.
with coverage:
without coverage:
Ideas on how to debug this?
The text was updated successfully, but these errors were encountered: