Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source-based coverage #840

Merged
merged 12 commits into from
Mar 31, 2021
Merged

Source-based coverage #840

merged 12 commits into from
Mar 31, 2021

Conversation

vitorenesduarte
Copy link
Contributor

@vitorenesduarte vitorenesduarte commented Mar 25, 2021

With this PR, we start tracking coverage using LLVM's source-based coverage: https://blog.rust-lang.org/inside-rust/2020/11/12/source-based-code-coverage.html

With this, coverage is at 67.7%, which seems to be an all-time high 😄

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG.md

@vitorenesduarte vitorenesduarte changed the title Run grcov and codecov manually in CI Source-based coverage Mar 25, 2021
@codecov-io
Copy link

codecov-io commented Mar 25, 2021

Codecov Report

Merging #840 (3f9563a) into master (4b0318c) will increase coverage by 38.5%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #840      +/-   ##
=========================================
+ Coverage    29.1%   67.7%   +38.5%     
=========================================
  Files         194     209      +15     
  Lines       10766   16812    +6046     
  Branches     4444       0    -4444     
=========================================
+ Hits         3134   11382    +8248     
- Misses       4653    5430     +777     
+ Partials     2979       0    -2979     
Impacted Files Coverage Δ
light-client/src/macros.rs 14.7% <0.0%> (-25.3%) ⬇️
tendermint/src/config/node_key.rs 46.4% <0.0%> (-23.6%) ⬇️
tendermint/src/channel.rs 22.0% <0.0%> (-15.0%) ⬇️
light-client/src/types.rs 30.6% <0.0%> (-12.4%) ⬇️
tendermint/src/hash.rs 36.5% <0.0%> (-12.1%) ⬇️
tendermint/src/config/priv_validator_key.rs 39.1% <0.0%> (-10.9%) ⬇️
light-client/src/errors.rs 3.1% <0.0%> (-7.8%) ⬇️
testgen/src/jsonatr.rs 0.0% <0.0%> (ø)
light-node/src/error.rs 0.0% <0.0%> (ø)
light-node/src/config.rs 0.0% <0.0%> (ø)
... and 192 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b0318c...3f9563a. Read the comment docs.

Copy link
Contributor

@thanethomson thanethomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's give this a try 👍 I'm looking forward to the results. Thanks @vitorenesduarte!

@thanethomson thanethomson merged commit 4a6c450 into informalsystems:master Mar 31, 2021
@vitorenesduarte vitorenesduarte deleted the vitor/grcov branch March 31, 2021 19:43
@romac
Copy link
Member

romac commented Apr 4, 2021

Awesome, thanks a lot @vitorenesduarte !

@marco-c
Copy link

marco-c commented Apr 19, 2021

@vitorenesduarte could you try the latest version of grcov, with LLVM_PROFILE_FILE set to %p-%m.profraw instead of %m.profraw?

@vitorenesduarte
Copy link
Contributor Author

@vitorenesduarte could you try the latest version of grcov, with LLVM_PROFILE_FILE set to %p-%m.profraw instead of %m.profraw?

@marco-c trying it here: #864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants