Blue sky: separate coverage reports for unit test + benchmarks
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 74
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
## Context
We use https://codecov.io for online reports of code coverage. We consider code coverage a critical tool in ensuring robust code since it:
- Allows you to quickly see what code is actually run in your tests (to help find either dead code or code needing tests)
- Helps you be motivated to write tests
- Coverage shows how many times code is executed, by line: this can be a really helpful indication of where performance bottlenecks might be.
Currently we have coverage reporting available, by file and by line, that reflects just one metric: what code was executed when running the unit tests. This is viewable at https://codecov.io/gh/mapbox/node-cpp-skel/tree/620a268920ca47ca3bc49dd96fd8839e80774411/src.
## Opportunity
@GretaCB is working on benchmarking scripts in #61. While the current code coverage answers the question of "what code do I have unit tests for?" it could also be useful, after #61 lands, to answer the question of "what code do I have benchmarks for?".
If the answer were: "only for some of the performance critical code and not all the performance critical code" **_then we have a problem_**. One of the easiest mistakes to make in performance optimization is to spend time optimizing the wrong thing. Performance optimization is hard enough when you are focused on the right code. So we should use all the tools we have to try to avoid this issue.
## Solution
Codecov has a feature called `flags`. This allows you to mark a specific coverage upload by name. We could use this to provide display of coverage isolated to our unit tests vs our benchmark scripts. See more at https://docs.codecov.io/docs/flags
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the benchmark work described in issue #61 alongside the existing unit-test coverage reporting and Codecov's flags documentation. Define separate coverage uploads for unit tests and benchmark scripts, then verify that Codecov displays the two reports independently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100