<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-coveragepy-git.git/coverage/pytracer.py, branch 6.5.0</title>
<subtitle>github.com: nedbat/coveragepy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-coveragepy-git.git/'/>
<entry>
<title>docs: mentioned pull #1388</title>
<updated>2022-05-30T16:42:25+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2022-05-30T16:42:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-coveragepy-git.git/commit/?id=73f4a6787b69138f5fe3e682a5cbb08432919e72'/>
<id>73f4a6787b69138f5fe3e682a5cbb08432919e72</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>perf: PyTracer improvements (#1388)</title>
<updated>2022-05-30T16:35:05+00:00</updated>
<author>
<name>Carl Friedrich Bolz-Tereick</name>
<email>cfbolz@gmx.de</email>
</author>
<published>2022-05-30T16:35:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-coveragepy-git.git/commit/?id=f40da644142bd89092e81ef72beaf66687fe9a15'/>
<id>f40da644142bd89092e81ef72beaf66687fe9a15</id>
<content type='text'>
* cache the bound method of _trace on self

this speeds up pure python tracing because we don't have to re-create a
bound method object all the time

* optimize checking whether a file should be traced

the optimization works based on the following heuristic: in a
majority of cases, functions call other functions in the same file. In
that situation we don't have to re-check whether we should trace the
file

* fix optimization in the presence of contexts

* fix too long line</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* cache the bound method of _trace on self

this speeds up pure python tracing because we don't have to re-create a
bound method object all the time

* optimize checking whether a file should be traced

the optimization works based on the following heuristic: in a
majority of cases, functions call other functions in the same file. In
that situation we don't have to re-check whether we should trace the
file

* fix optimization in the presence of contexts

* fix too long line</pre>
</div>
</content>
</entry>
<entry>
<title>perf: set frame-&gt;f_trace_lines=0 when not tracing. ~3% faster</title>
<updated>2022-05-28T20:12:14+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2022-05-28T20:12:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-coveragepy-git.git/commit/?id=4b592fe30a7ebf871ba9a3d883ec955dae198c15'/>
<id>4b592fe30a7ebf871ba9a3d883ec955dae198c15</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>perf: speed up python tracer with frame.f_trace_lines = False (#1381)</title>
<updated>2022-05-28T19:34:43+00:00</updated>
<author>
<name>Carl Friedrich Bolz-Tereick</name>
<email>cfbolz@gmx.de</email>
</author>
<published>2022-05-28T19:34:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-coveragepy-git.git/commit/?id=08ec70fe8acbd5864b3c8c3dcc4c65c38afeeff8'/>
<id>08ec70fe8acbd5864b3c8c3dcc4c65c38afeeff8</id>
<content type='text'>
use the python &gt;= 3.7 feature of being able to disable line tracing by
setting the frame attribute f_trace_lines to False. This can be used for
the frames of functions that we aren't collecting coverage information
for (eg those functions in the stdlib).

This speeds up the pure python tracer in CPython by ~9x and in PyPy by
80% on a coverage run of one realistic project that I tried.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
use the python &gt;= 3.7 feature of being able to disable line tracing by
setting the frame attribute f_trace_lines to False. This can be used for
the frames of functions that we aren't collecting coverage information
for (eg those functions in the stdlib).

This speeds up the pure python tracer in CPython by ~9x and in PyPy by
80% on a coverage run of one realistic project that I tried.</pre>
</div>
</content>
</entry>
<entry>
<title>debug: tweaks to make these clearer</title>
<updated>2022-02-06T16:09:53+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2022-02-06T12:51:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-coveragepy-git.git/commit/?id=375b4ae48def9734b6c93fdbf2bc99d684e2457d'/>
<id>375b4ae48def9734b6c93fdbf2bc99d684e2457d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>debug: better tracing of pytracer changed</title>
<updated>2022-01-30T17:42:38+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2022-01-30T13:43:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-coveragepy-git.git/commit/?id=d35e8c4624bd074c4e55a8e8a33c343f734299db'/>
<id>d35e8c4624bd074c4e55a8e8a33c343f734299db</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: proper tracing of call/return for Python 3.11.0a4</title>
<updated>2022-01-15T19:18:00+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2022-01-15T18:58:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-coveragepy-git.git/commit/?id=37ef7c7d8625ee7f364774110e3c467e82444d9b'/>
<id>37ef7c7d8625ee7f364774110e3c467e82444d9b</id>
<content type='text'>
Version 3.11.0a4 introduced RESUME, so returns and calls are different now.
This change also fixes some mishandling of yield-from in previous releases.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Version 3.11.0a4 introduced RESUME, so returns and calls are different now.
This change also fixes some mishandling of yield-from in previous releases.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: update pytracer.py for Python 3.11</title>
<updated>2022-01-15T19:01:33+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2022-01-15T16:17:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-coveragepy-git.git/commit/?id=e3be855a07685b383f020e2f0f2924326cb48268'/>
<id>e3be855a07685b383f020e2f0f2924326cb48268</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: no need for specialized pyexpat code anymore</title>
<updated>2021-10-18T22:04:18+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2021-10-18T22:04:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-coveragepy-git.git/commit/?id=8021196662dcadf161cbeaebb3be4b0392b51803'/>
<id>8021196662dcadf161cbeaebb3be4b0392b51803</id>
<content type='text'>
The pyexpat bug that plagued us was fixed in Python 3.4:
https://bugs.python.org/issue22462

We no longer need the code that adapted to it.  The test will remain, couldn't
hurt.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The pyexpat bug that plagued us was fixed in Python 3.4:
https://bugs.python.org/issue22462

We no longer need the code that adapted to it.  The test will remain, couldn't
hurt.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: use sets to collect data</title>
<updated>2021-08-15T12:26:36+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2021-08-15T12:26:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-coveragepy-git.git/commit/?id=db235732dd9a0198f6e5d00b895baa516221fee2'/>
<id>db235732dd9a0198f6e5d00b895baa516221fee2</id>
<content type='text'>
Coverage.py predates sets as a built-in data structure, so the file data
collection has long been dicts with None as the values.  Sets are
available to us now (since Python 2.4 in 2004, which coverage.py dropped
support for in 2014!), we use sets.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Coverage.py predates sets as a built-in data structure, so the file data
collection has long been dicts with None as the values.  Sets are
available to us now (since Python 2.4 in 2004, which coverage.py dropped
support for in 2014!), we use sets.
</pre>
</div>
</content>
</entry>
</feed>
