Skip to content

Commit

Permalink
Revise coverage section in BUILD.md to use cargo-llvm-cov
Browse files Browse the repository at this point in the history
  • Loading branch information
LDeakin committed Dec 21, 2023
1 parent 6373dec commit d8fbc89
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 42 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ Cargo.lock

# Misc config files
.config

# Profiling files
*.profraw
lcov.info
20 changes: 15 additions & 5 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,20 @@ cargo bench -- --save-baseline baseline
cargo bench -- --baseline baseline
```

## Coverage report
## Coverage report (using [cargo-llvm-cov](https://crates.io/crates/cargo-llvm-cov))

Install `cargo-llvm-cov`
```bash
cargo +stable install cargo-llvm-cov --locked
```

Generate a HTML report
```bash
cargo +nightly llvm-cov --doctests --html
open target/llvm-cov/html/index.html
```

Generate a coverage file for [Coverage Gutters](https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters) in VSCode
```bash
# on ubuntu..
# apt install llvm-14 jq
# cargo install rustfilt
./coverage.sh
cargo +nightly llvm-cov --doctests --lcov --output-path lcov.info
```
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `From<ChunkKeyEncodingTraits>` for `ChunkKeyEncoding`
- Add chunk key encoding tests

### Changed
- Revise coverage section in `BUILD.md` to use `cargo-llvm-cov`

### Fixed
- Fixed chunk key encoding for 0 dimensional arrays with `default` and `v2` encoding

Expand Down
37 changes: 0 additions & 37 deletions coverage.sh

This file was deleted.

0 comments on commit d8fbc89

Please sign in to comment.