-
Notifications
You must be signed in to change notification settings - Fork 815
Disable GCCollector in multiprocess mode #324
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
Disable GCCollector in multiprocess mode #324
Conversation
@@ -6,3 +6,6 @@ dist | |||
.coverage.* | |||
.coverage | |||
.tox | |||
.*cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The projects policy is that such things belong in your global gitignore, rather than us ending up with everything in ours.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm willing to move .idea
to my global gitignore, sure.
Since .coverage.*
and .tox
, which are generated by running tests, are in here, it makes sense that htmlcov
and .*cache
(to target
.pytest_cache, as used by newer versions of py.test, and
.cache`, to target older ones) that are similarly generated by running tests, are in here too.
import time | ||
|
||
from . import core | ||
|
||
class GCCollector(object): | ||
"""Collector for Garbage collection statistics.""" | ||
def __init__(self, registry=core.REGISTRY, gc=gc): | ||
if 'prometheus_multiproc_dir' in os.environ: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment with a link to the issue? We can revert this once it's fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done deal.
2385c7a
to
7bda793
Compare
Can you add the DCO please? |
Signed-off-by: Aarni Koskela <akx@iki.fi>
Works around prometheus#322 Signed-off-by: Aarni Koskela <akx@iki.fi>
7bda793
to
0245928
Compare
DCO done. |
Thanks! |
A patch release with this PR would be nice 👍 |
* Add Pytest cache and Coverage HTML report dirs to gitignore * Disable the GC collector in multiprocess mode Works around prometheus#322 Signed-off-by: Aarni Koskela <akx@iki.fi>
To avoid deadlocks (#322), disable the GC collector in multiprocess mode.