Metrics

Code Coverage

pgBackRest aims to have complete function/branch/line coverage for the core C code in /src .
Function/line coverage is complete with no exceptions.
Branch coverage excludes branches inside macros and assert() calls. Macros have their own unit tests so they do not need to be tested everywhere they appear. Asserts are not expected to have complete branch coverage since they test cases that should always be true.
Directory Functions Branches Lines
command 3/3 (100.0%) 46/46 (100.0%) 82/82 (100.0%)
command/archive 10/10 (100.0%) 56/56 (100.0%) 176/176 (100.0%)
command/archive/get 6/6 (100.0%) 86/86 (100.0%) 212/212 (100.0%)
command/archive/push 9/9 (100.0%) 86/86 (100.0%) 263/263 (100.0%)
command/backup 1/1 (100.0%) 14/14 (100.0%) 23/23 (100.0%)
command/control 2/2 (100.0%) 8/8 (100.0%) 17/17 (100.0%)
command/help 4/4 (100.0%) 110/110 (100.0%) 163/163 (100.0%)
command/info 7/7 (100.0%) 104/104 (100.0%) 259/259 (100.0%)
command/local 1/1 (100.0%) --- 15/15 (100.0%)
command/remote 1/1 (100.0%) 6/6 (100.0%) 27/27 (100.0%)
common 129/129 (100.0%) 444/444 (100.0%) 1375/1375 (100.0%)
common/compress/gzip 14/14 (100.0%) 22/22 (100.0%) 158/158 (100.0%)
common/crypto 23/23 (100.0%) 68/68 (100.0%) 310/310 (100.0%)
common/encode 5/5 (100.0%) 32/32 (100.0%) 81/81 (100.0%)
common/io 45/45 (100.0%) 108/108 (100.0%) 498/498 (100.0%)
common/io/filter 32/32 (100.0%) 80/80 (100.0%) 329/329 (100.0%)
common/io/http 29/29 (100.0%) 146/146 (100.0%) 388/388 (100.0%)
common/io/tls 13/13 (100.0%) 74/74 (100.0%) 228/228 (100.0%)
common/type 227/227 (100.0%) 490/490 (100.0%) 2694/2694 (100.0%)
config 97/97 (100.0%) 536/536 (100.0%) 1379/1379 (100.0%)
info 33/33 (100.0%) 94/94 (100.0%) 484/484 (100.0%)
perl 10/10 (100.0%) 26/26 (100.0%) 138/138 (100.0%)
postgres 14/14 (100.0%) 64/64 (100.0%) 184/184 (100.0%)
protocol 59/59 (100.0%) 136/136 (100.0%) 712/712 (100.0%)
storage 59/59 (100.0%) 138/138 (100.0%) 668/668 (100.0%)
storage/cifs 1/1 (100.0%) --- 9/9 (100.0%)
storage/posix 31/31 (100.0%) 181/182 (99.45%) 536/536 (100.0%)
storage/remote 22/22 (100.0%) 46/46 (100.0%) 387/387 (100.0%)
storage/s3 23/23 (100.0%) 96/96 (100.0%) 487/487 (100.0%)
TOTAL 910/910 (100.0%) 3297/3298 (99.97%) 12282/12282 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.