diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-07-21 20:35:47 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-07-21 20:35:47 -0400 |
commit | ffa01b106cf01a37e34a444d3e24dc6ece84217e (patch) | |
tree | a1c278cbc2397cec95846db215133a3d0ea4cd82 /doc/faq.rst | |
parent | 293ac5250287366e85bb0757d666c70e2a53542c (diff) | |
download | python-coveragepy-ffa01b106cf01a37e34a444d3e24dc6ece84217e.tar.gz |
Add a FAQ about slowness due to PyTracer
Diffstat (limited to 'doc/faq.rst')
-rw-r--r-- | doc/faq.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/faq.rst b/doc/faq.rst index 78db591..d7ae364 100644 --- a/doc/faq.rst +++ b/doc/faq.rst @@ -50,6 +50,19 @@ If you are using the :ref:`API <api>`, you need to call coverage.start() before importing the modules that define your functions. +**Q: Coverage is much slower than I remember, what's going on?** + +Make sure you are using the C trace function. Coverage.py provides two +implementations of the trace function. The C implementation runs much faster. +To see what you are running, use ``coverage debug sys``. The output contains +details of the environment, including a line that says either ``tracer: CTracer`` +or ``tracer: PyTracer``. If it says ``PyTracer`` then you are using the +slow Python implementation. + +Try re-installing coverage.py to see what happened and if you get the CTracer +as you should. + + **Q: Does coverage.py work on Python 3.x?** Yes, Python 3 is fully supported. |