Repository navigation
Closed
Description
The list of remaining work necessary for automated code coverage:
Full code coverage
Currently cc for System.Private.CoreLib is broken. These steps are necessary to fix that:
- Merge Revert "Merge pull request #276 from petli/memory-mapped-hit-counts" coverlet-coverage/coverlet#322
- Consume a new released version of coverlet and use the IL version of S.P.CoreLib. (Enable CoreLib coverage corefx#37172)
- Port official cc run to AzDO (and potentially helix?) and add a Linux (Ubuntu) and OSX leg ([WIP] Add code coverage build definition. corefx#35296)
Make code coverage faster (optional)
- Spend less time in cc runs by instrumenting less code: Combine sequence point hits with adjacent branch hits coverlet-coverage/coverlet#307
- Use single hit option for non official builds: Single hit coverlet-coverage/coverlet#309
Integrate codecov into corefx
- Add codecov token to Azure Pipelines ([WIP] Add code coverage build definition. corefx#35296)
- Publish refactor codecov-exe as AzDO task (External dependency, needs PR, blocked)
- Make global tools work with helix runs (Make global tools work with helix corefx#34913)
- Setup codecov page for corefx (https://codecov.io/gh/dotnet/corefx/)
- Add codecov.yml file (Add codecov yml configuration corefx#34896)
- Add badge to README.md ([WIP] Add code coverage build definition. corefx#35296)
Integrate cc and codecov into continuous PRs
- Add a Windows, Linux (Ubuntu) and OSX leg to AzDO that runs with every PR and enable codecov uploads.
cc @danmosemsft @safern @ericstj @stephentoub
Reacted by Ganbarukamo41
Activity
ViktorHofer commentedon Jan 27, 2019
@safern do we use Helix for official runs too? It would be nice if we could use helix for the official code coverage run(s).
danmoseley commentedon Jan 27, 2019
We also need to solve the early termination problem right? I see in the vstest issue they say it needs to be a DiagnosticCollector to avoid early termination.
Re speed, I dont believe we often use branch coverage today . Is there a flag to only instrument for block coverage, would that help?
ViktorHofer commentedon Jan 27, 2019
No that issue doesn't affect us as we don't use vstest right now.
ViktorHofer commentedon Jan 28, 2019
There isn't such a flag yet. Fixing the above linked issue would be the ideal first step to increase perf. The current instrumentation logic is suboptimal.
stephentoub commentedon Jan 28, 2019
@danmosemsft, what do you mean by this? Where do we "use" line/block coverage but don't branch coverage? I personally look at both.
danmoseley commentedon Jan 28, 2019
If it made a significant difference in perf it might mean we could afford to get at least some coverage data automatically in CI rather than none. If we can get both great.
stephentoub commentedon Jan 28, 2019
Ok
sharwell commentedon Jan 28, 2019
I strongly recommend not going down this path. Branch and/or sequence point coverage is an extremely valuable metric for the primary value-add of code coverage (guided code reviews).
It will not have a substantial impact on performance. Your biggest performance gains will come from
--single-hit(coverlet-coverage/coverlet#309) and, if required, selective exclusions of extremely-frequently-hit helpers. The latter is a PerfView-guided process that I'm happy to help with after coverage tooling is set up.sharwell commentedon Jan 28, 2019
I recommend starting with Windows Debug and observing stable uploads for at least a week. After that, we can add one additional Debug upload (Linux Debug or Mac Debug), and let it stablize for at least a week. Our uploads will stress the report merge process used by codecov on multiple fronts:
if (IsWindows)statement with a true branch covered in one build and a false branch covered in a different build, the combined report should show that the statement is fully covered by the combined report but only partially covered when you filter the view to just Windows or Linux. However, the merge process assumes that the IL offset of the branch will not change between the two uploads, and does a suboptimal job of handling cases where it does change. This is especially problematic when attempting to upload Debug and Release reports, and less problematic when uploading reports combining deterministic+unconditional compilation.safern commentedon Jan 28, 2019
Yes, we do use Helix for official runs. Yes we should figure out how to hook up code coverage with helix 😄
ViktorHofer commentedon Feb 6, 2019
The codecov dotnet tool is now available: https://www.nuget.org/packages/Codecov.Tool/
Remaining external blocker is the release of an updated coverlet.console package.
ViktorHofer commentedon Mar 25, 2019
Updated issue with current status.
MarcoRossignoli commentedon May 9, 2019
@ViktorHofer new package with your fixes https://www.nuget.org/packages/coverlet.console/
ViktorHofer commentedon Jun 7, 2019
Status: dotnet test 3.x soon supports coverlet inbox which would help a lot here. Maybe we should give https://github.com/dotnet/corefx/issues/34338 another try.
2 remaining items
Merge pull request dotnet#960 from jkotas/merge-runtime
dotnet-policy-service commentedon Dec 24, 2024
Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.
This process is part of our issue cleanup automation.
dotnet-policy-service commentedon Jan 7, 2025
This issue will now be closed since it had been marked
no-recent-activitybut received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.