Last active
September 3, 2024 13:08
-
-
Save rngadam/3be78ce66a9afc0326de08f4f36ccc15 to your computer and use it in GitHub Desktop.
measuring coverage for anoncreds-rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt install rustfilt llvm | |
$ RUSTFLAGS="-C instrument-coverage" cargo test --tests | |
$ llvm-profdata merge -sparse default_*.profraw -o json5format.profdata | |
$ llvm-cov report --use-color --ignore-filename-regex='/.cargo/registry' --instr-profile=json5format.profdata --object target/debug/deps/anoncreds-8fe56f9dd9e403dd | |
Filename Regions Missed Regions Cover Functions Missed Functions Executed Lines Missed Lines Cover Branches Missed Branches Cover | |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
build/rustc-kAv1jW/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/core/src/panic.rs 1 1 0.00% 1 1 0.00% 3 3 0.00% 0 0 - | |
build/rustc-kAv1jW/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/std/src/sys/common/thread_local/fast_local.rs 5 1 80.00% 2 0 100.00% 13 0 100.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/cred_def.rs 124 72 41.94% 36 18 50.00% 133 35 73.68% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/cred_offer.rs 35 35 0.00% 4 4 0.00% 8 8 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/cred_request.rs 262 88 66.41% 34 7 79.41% 256 17 93.36% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/credential.rs 133 97 27.07% 34 20 41.18% 101 48 52.48% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/issuer_id.rs 31 0 100.00% 2 0 100.00% 34 0 100.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/link_secret.rs 39 11 71.79% 15 5 66.67% 56 15 73.21% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/macros.rs 39 14 64.10% 19 7 63.16% 69 25 63.77% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/nonce.rs 89 34 61.80% 37 18 51.35% 218 65 70.18% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/pres_request.rs 360 282 21.67% 68 46 32.35% 296 179 39.53% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/presentation.rs 178 157 11.80% 44 37 15.91% 67 47 29.85% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/rev_reg.rs 13 13 0.00% 4 4 0.00% 4 4 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/rev_reg_def.rs 97 97 0.00% 22 22 0.00% 30 30 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/rev_status_list.rs 123 55 55.28% 28 10 64.29% 187 62 66.84% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/schema.rs 80 28 65.00% 28 10 64.29% 109 21 80.73% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/w3c/constants.rs 5 0 100.00% 5 0 100.00% 20 0 100.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/w3c/context.rs 56 18 67.86% 16 4 75.00% 57 18 68.42% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/w3c/credential.rs 117 58 50.43% 32 11 65.62% 126 43 65.87% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/w3c/credential_attributes.rs 66 23 65.15% 20 6 70.00% 83 31 62.65% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/w3c/format.rs 44 14 68.18% 16 3 81.25% 84 9 89.29% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/w3c/mod.rs 19 15 21.05% 7 4 42.86% 17 12 29.41% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/w3c/one_or_many.rs 22 11 50.00% 8 3 62.50% 21 11 47.62% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/w3c/presentation.rs 43 24 44.19% 13 5 61.54% 54 17 68.52% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/w3c/proof.rs 267 148 44.57% 67 19 71.64% 360 46 87.22% 0 0 - | |
home/user/repos/anoncreds-rs/src/data_types/w3c/uri.rs 20 6 70.00% 9 4 55.56% 21 4 80.95% 0 0 - | |
home/user/repos/anoncreds-rs/src/error.rs 87 75 13.79% 47 38 19.15% 203 161 20.69% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/cred_def.rs 55 55 0.00% 10 10 0.00% 69 69 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/cred_offer.rs 29 29 0.00% 5 5 0.00% 28 28 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/cred_req.rs 40 40 0.00% 6 6 0.00% 50 50 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/credential.rs 178 178 0.00% 23 23 0.00% 197 197 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/error.rs 40 40 0.00% 12 12 0.00% 56 56 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/link_secret.rs 11 11 0.00% 2 2 0.00% 11 11 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/mod.rs 10 10 0.00% 6 6 0.00% 20 20 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/object.rs 98 98 0.00% 35 35 0.00% 153 153 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/pres_req.rs 9 9 0.00% 3 3 0.00% 14 14 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/presentation.rs 259 259 0.00% 32 32 0.00% 300 300 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/revocation.rs 198 198 0.00% 27 27 0.00% 224 224 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/schema.rs 31 31 0.00% 6 6 0.00% 36 36 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/util.rs 24 24 0.00% 9 9 0.00% 34 34 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/w3c/credential.rs 186 186 0.00% 20 20 0.00% 188 188 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/ffi/w3c/presentation.rs 67 67 0.00% 5 5 0.00% 73 73 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/services/helpers.rs 191 146 23.56% 23 14 39.13% 213 155 27.23% 0 0 - | |
home/user/repos/anoncreds-rs/src/services/issuer.rs 186 109 41.40% 25 17 32.00% 438 222 49.32% 0 0 - | |
home/user/repos/anoncreds-rs/src/services/prover.rs 292 212 27.40% 62 27 56.45% 666 417 37.39% 0 0 - | |
home/user/repos/anoncreds-rs/src/services/tails.rs 79 55 30.38% 14 11 21.43% 115 53 53.91% 0 0 - | |
home/user/repos/anoncreds-rs/src/services/types.rs 97 89 8.25% 36 32 11.11% 136 119 12.50% 0 0 - | |
home/user/repos/anoncreds-rs/src/services/verifier.rs 616 422 31.49% 118 63 46.61% 1138 663 41.74% 0 0 - | |
home/user/repos/anoncreds-rs/src/services/w3c/credential_conversion.rs 56 9 83.93% 18 0 100.00% 147 2 98.64% 0 0 - | |
home/user/repos/anoncreds-rs/src/services/w3c/helpers.rs 27 3 88.89% 8 0 100.00% 47 8 82.98% 0 0 - | |
home/user/repos/anoncreds-rs/src/services/w3c/issuer.rs 16 16 0.00% 1 1 0.00% 42 42 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/services/w3c/prover.rs 109 109 0.00% 5 5 0.00% 133 133 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/services/w3c/types.rs 10 10 0.00% 4 4 0.00% 12 12 0.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/services/w3c/verifier.rs 225 49 78.22% 55 6 89.09% 434 79 81.80% 0 0 - | |
home/user/repos/anoncreds-rs/src/utils/base58.rs 1 0 100.00% 1 0 100.00% 3 0 100.00% 0 0 - | |
home/user/repos/anoncreds-rs/src/utils/base64.rs 4 1 75.00% 3 1 66.67% 9 1 88.89% 0 0 - | |
home/user/repos/anoncreds-rs/src/utils/hash.rs 19 11 42.11% 9 3 66.67% 45 23 48.89% 0 0 - | |
home/user/repos/anoncreds-rs/src/utils/macros.rs 20 14 30.00% 15 11 26.67% 32 21 34.38% 0 0 - | |
home/user/repos/anoncreds-rs/src/utils/msg_pack.rs 6 2 66.67% 4 2 50.00% 9 2 77.78% 0 0 - | |
home/user/repos/anoncreds-rs/src/utils/query.rs 676 158 76.63% 294 17 94.22% 2709 147 94.57% 0 0 - | |
home/user/repos/anoncreds-rs/src/utils/validation.rs 39 1 97.44% 11 1 90.91% 67 3 95.52% 0 0 - | |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
TOTAL 6259 4028 35.64% 1525 722 52.66% 10478 4466 57.38% 0 0 - | |
$ llvm-cov export --ignore-filename-regex='/.cargo/registry' --instr-profile=json5format.profdata --object target/debug/deps/anoncreds-8fe56f9dd9e403dd --format=text --summary-only | jq > summary.json | |
$ cat summary.json | jq .data[0].totals.lines.percent | |
57.37736209200229 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment