~/talk

Near Zero-Overhead Python Code Coverage

Talkat PyCon US 2024 · 2024-05-15..05-23· [python]
links:none on file
slides:none on file

Coverage.py can slow tests up to 2.6x; SlipCover claims near-zero overhead by instrumenting bytecode and inserting tiny native C probes that record a line once, batch instrumentation, and de‑instrument hot paths when counters cross a threshold. Result: roughly 5% overhead for line+branch coverage on CPython and about 31% on PyPy, supports Python 3.12 via the Low Impact Monitoring API (PEP669), and maps branches using phantom source lines to preserve familiar metrics.

AI-written summary · about

  1. 0:00Understanding code coverage
  2. 2:52Introducing SlipCover
  3. 4:27Optimization techniques
  4. 7:38Evolution of SlipCover
  5. 11:43Leveraging sys.monitoring
  6. 15:20Implementing branch coverage
  7. 20:43Future directions and summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.