{ "info": { "author": "Bryan Gillespie", "author_email": "rpgillespie6@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Utilities" ], "description": "[![Build Status](https://travis-ci.com/RPGillespie6/fastcov.svg?branch=master)](https://travis-ci.com/RPGillespie6/fastcov)\n[![Code Coverage](https://img.shields.io/codecov/c/github/rpgillespie6/fastcov.svg)](https://codecov.io/gh/RPGillespie6/fastcov)\n[![PyPI Version](https://img.shields.io/pypi/v/fastcov.svg)](https://pypi.org/project/fastcov/)\n\n# fastcov\nA parallelized gcov wrapper for generating intermediate coverage formats *fast*\n\nThe goal of fastcov is to generate code coverage intermediate formats *as fast as possible*, even for large projects with hundreds of gcda objects. The intermediate formats may then be consumed by a report generator such as lcov's genhtml, or a dedicated front end such as coveralls, codecov, etc. fastcov was originally designed to be a drop-in replacement for lcov (application coverage only, not kernel coverage).\n\nCurrently the only intermediate formats supported are gcov json format, fastcov json format, and lcov info format. Adding support for other formats should require just a few lines of python to transform fastcov json format to the desired shape.\n\nIn order to achieve the speed gains, a few constraints apply:\n\n1. GCC version >= 9.0.0\n\nThese versions of GCOV have support for JSON intermediate format as well as streaming report data straight to stdout. This second feature (the ability for gcov to stream report data to stdout) is critical - without it, fastcov cannot run multiple instances of gcov in parallel without loss of correctness.\n\nIf your linux distribution doesn't ship with GCC 9, the current easiest way (in my opinion) to try out fastcov is to use the fastcov docker image, which has GCC 9 compilers (`gcc-9` and `g++-9`), Python3, and CMake inside:\n\n```bash\ndocker pull rpgillespie6/fastcov:latest\n```\n\nIf you need other dependencies, just modify the Dockerfile and rebuild.\n\n2. Object files must be either be built:\n\n- Using absolute paths for all `-I` flags passed to the compiler\n\nor\n\n- Invoking the compiler from the same root directory\n\nIf you use CMake, you are almost certainly satisfying this second constraint (unless you care about `ExternalProject` coverage).\n\n## Quick Start\n\nAssuming you have docker, fastcov is easy to use:\n\n```bash\n$ docker pull rpgillespie6/fastcov\n$ docker run -it --rm -v ${PWD}:/mnt/workspace -w /mnt/workspace -u $(id -u ${USER}):$(id -g ${USER}) rpgillespie6/fastcov\n$ # Make sure to compile with gcc-9 or g++-9 and to pass \"-g -O0 -fprofile-arcs -ftest-coverage\" to all gcc/g++ statements\n$ \n$ fastcov.py --gcov gcov-9 --exclude /usr/include --lcov -o report.info\n$ genhtml -o code_coverage report.info\n$ firefox code_coverage/index.html\n```\n\nSee the [example](example/) directory for a working CMake example.\n\n## Installation\n\nA minimum of Python 3.5 is currently required.\n\nFastcov is a single source python tool. That means you can simply copy `fastcov.py` from this repository and run it directly with no other hassle.\n\nHowever, fastcov is also available as a Python3 package that can be installed via pip.\n\nInstall newest stable fastcov release from PyPI:\n\n```bash\n$ pip3 install fastcov\n```\n\nOr install the bleeding edge version from GitHub:\n\n```bash\n$ pip3 install git+https://github.com/rpgillespie6/fastcov.git\n```\n\n## Filtering Options\n\nFastcov uses *substring matching* (not regex) for all of its filtering options. Furthermore, all filtering options take a list of parameters as arguments.\n\nHere are some common filtering combinations you may find useful:\n\n```bash\n$ fastcov.py --exclude /usr/include test/ # Exclude system header files and test files from final report\n$ fastcov.py --include src/ # Only include files with \"src/\" in its path in the final report\n$ fastcov.py --source-files ../src/source1.cpp ../src/source2.cpp # Only include exactly ../src/source1.cpp and ../src/source2.cpp in the final rpeort\n$ fastcov.py --branch-coverage # Only include most useful branches (discards exceptional branches and initializer list branches)\n$ fastcov.py --exceptional-branch-coverage # Include ALL branches in coverage report\n```\n\nBranch filters furthermore can stack:\n\n```bash\n$ fastcov.py --branch-coverage --include-br-lines-starting-with if else # Only include branch coverage for lines starting with \"if\" or \"else\"\n$ fastcov.py --branch-coverage --exclude-br-lines-starting-with assert ASSERT # Don't include coverage for lines starting with \"assert\" or \"ASSERT\"\n```\n\nTechnically it's possible to include both `--include-br-lines-starting-with` and `--exclude-br-lines-starting-with`, though I'm not sure how useful that would be. Fastcov will always apply `--include-br-lines-starting-with` first, and then `--exclude-br-lines-starting-with` second.\n\n## Benchmarks\n\nAnecdotal testing on my own projects indicate that fastcov is over 100x faster than lcov and over 30x faster than gcovr:\n\nProject Size: ~250 .gcda, ~500 .gcov generated by gcov\n\nTime to process all gcda and parse all gcov:\n\n- fastcov: ~700ms\n- lcov: ~90s\n- gcovr: ~30s\n\nYour mileage may vary depending on the number of cores you have available for fastcov to use!", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/RPGillespie6/fastcov", "keywords": "", "license": "mit", "maintainer": "", "maintainer_email": "", "name": "fastcov", "package_url": "https://pypi.org/project/fastcov/", "platform": "any", "project_url": "https://pypi.org/project/fastcov/", "project_urls": { "Homepage": "https://github.com/RPGillespie6/fastcov" }, "release_url": "https://pypi.org/project/fastcov/1.4/", "requires_dist": null, "requires_python": ">= 3.5", "summary": "A massively parallel gcov wrapper for generating intermediate coverage formats fast", "version": "1.4" }, "last_serial": 5924478, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "8470a12a1f9e83a8378a75adef5f0957", "sha256": "b9e3debd9f1268cb38f12c14710405f9e907d82d9ceec61229d089fadead3e68" }, "downloads": -1, "filename": "fastcov-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8470a12a1f9e83a8378a75adef5f0957", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 3.5", "size": 8753, "upload_time": "2019-05-29T19:40:39", "url": "https://files.pythonhosted.org/packages/97/30/d05d0974346ecff763b265f38d6b126c8f4f7d7bfdc0c9883513a81fbc84/fastcov-1.0-py3-none-any.whl" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "59486084c425ef0200fc851f6836e199", "sha256": "e996843f4a50613d4e3298d7eda6b9ad3866a96622377d20f14274d669fa627a" }, "downloads": -1, "filename": "fastcov-1.1.tar.gz", "has_sig": false, "md5_digest": "59486084c425ef0200fc851f6836e199", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 8463, "upload_time": "2019-08-06T22:03:02", "url": "https://files.pythonhosted.org/packages/39/8b/ae6ef5bfae2fc006053d0fb0f11557f799a45347fdbc216373894e3e2c58/fastcov-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "60ad898b2d1b5b263a430afb5a1698bd", "sha256": "0c10fdefbab037ac580b642f085d7d3e2e1a5c7046a3fc5aa9ea98df81f04687" }, "downloads": -1, "filename": "fastcov-1.2.tar.gz", "has_sig": false, "md5_digest": "60ad898b2d1b5b263a430afb5a1698bd", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 9199, "upload_time": "2019-08-06T22:31:30", "url": "https://files.pythonhosted.org/packages/a2/2e/654418d27f0317a7dde0ca90b0a20233503dd0a03e6b789a96a87fe83895/fastcov-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "993eabb628d1df886eb4027b0f7208c7", "sha256": "d9a3c02b36b81bd18822450a964199199575b4bb034e0b1e00718a0c4da8665b" }, "downloads": -1, "filename": "fastcov-1.3.tar.gz", "has_sig": false, "md5_digest": "993eabb628d1df886eb4027b0f7208c7", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 9907, "upload_time": "2019-09-13T23:40:56", "url": "https://files.pythonhosted.org/packages/b8/4e/893f69a912b9bb796284be953ceb59bed1f465961fb3e2a1da0aa006809e/fastcov-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "c998f4c4114dc6503525e3d4d2c845ec", "sha256": "0e978708bc62a1f1ad608ded3a71a16e1ff83332f1a5fa1d1e2dd1f6ef50be91" }, "downloads": -1, "filename": "fastcov-1.4.tar.gz", "has_sig": false, "md5_digest": "c998f4c4114dc6503525e3d4d2c845ec", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 9904, "upload_time": "2019-10-03T17:28:48", "url": "https://files.pythonhosted.org/packages/c1/e6/199749645c8f23b21ed2b67fbfe7136b77bf8c9aa814f1a977cb4fe65529/fastcov-1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c998f4c4114dc6503525e3d4d2c845ec", "sha256": "0e978708bc62a1f1ad608ded3a71a16e1ff83332f1a5fa1d1e2dd1f6ef50be91" }, "downloads": -1, "filename": "fastcov-1.4.tar.gz", "has_sig": false, "md5_digest": "c998f4c4114dc6503525e3d4d2c845ec", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.5", "size": 9904, "upload_time": "2019-10-03T17:28:48", "url": "https://files.pythonhosted.org/packages/c1/e6/199749645c8f23b21ed2b67fbfe7136b77bf8c9aa814f1a977cb4fe65529/fastcov-1.4.tar.gz" } ] }