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 | b0097db7c957b0e633a8a0453bd0978dccb61c31 (patch) | |
tree | c29f6dfb309a7347fcf0b28a8d779dd2f5663085 | |
parent | 14efcde8964bac184fc5ad97b80e6af73d303cdb (diff) | |
download | python-coveragepy-git-b0097db7c957b0e633a8a0453bd0978dccb61c31.tar.gz |
Add a FAQ about slowness due to PyTracer
-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 78db591f..d7ae3641 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. |