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

Try slipcover for coverage measurement on <= py3.11 #9

Open
Zac-HD opened this issue Oct 26, 2022 · 2 comments
Open

Try slipcover for coverage measurement on <= py3.11 #9

Zac-HD opened this issue Oct 26, 2022 · 2 comments

Comments

@Zac-HD
Copy link
Owner

Zac-HD commented Oct 26, 2022

https://github.com/plasma-umass/slipcover - if the overhead of adding instrumentation is low, this could be a big win - and amortized across many unlikely-to-find-new-branches executions anyway if not. Note that we don't want to remove the instrumentation once hit, since we collect coverage for each test case.

@Zac-HD
Copy link
Owner Author

Zac-HD commented Oct 21, 2023

From Python 3.12, PEP-669, the sys.monitoring module offers a lower-overhead alternative to sys.settrace(). I'm planning to support that in HypothesisWorks/hypothesis#3773, and we should see if it makes sense to share code - or derive a variant if not.

@Zac-HD Zac-HD changed the title Try slipcover for coverage measurement Try slipcover for coverage measurement, and sys.monitoring (in py3.12+) Oct 21, 2023
@tybug
Copy link
Collaborator

tybug commented Jan 24, 2025

As of 25.01.2, we now use sys.monitoring for coverage on 3.12+! Slipcover could still provide significant speedups for older versions, but is currently low priority as supporting another coverage-measurement interface would increase complexity.

@tybug tybug changed the title Try slipcover for coverage measurement, and sys.monitoring (in py3.12+) Try slipcover for coverage measurement on <= py3.11 Jan 24, 2025
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

No branches or pull requests

2 participants