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%) 50/50 (100.0%) 88/88 (100.0%)
command/archive 10/10 (100.0%) 64/64 (100.0%) 179/179 (100.0%)
command/archive/get 6/6 (100.0%) 86/86 (100.0%) 213/213 (100.0%)
command/archive/push 9/9 (100.0%) 84/84 (100.0%) 259/259 (100.0%)
command/backup 9/9 (100.0%) 108/108 (100.0%) 259/259 (100.0%)
command/check 1/1 (100.0%) 4/4 (100.0%) 20/20 (100.0%)
command/control 2/2 (100.0%) 8/8 (100.0%) 17/17 (100.0%)
command/expire 10/10 (100.0%) 130/130 (100.0%) 264/264 (100.0%)
command/help 4/4 (100.0%) 114/114 (100.0%) 161/161 (100.0%)
command/info 7/7 (100.0%) 100/100 (100.0%) 257/257 (100.0%)
command/local 1/1 (100.0%) --- 17/17 (100.0%)
command/remote 1/1 (100.0%) 6/6 (100.0%) 28/28 (100.0%)
command/restore 2/2 (100.0%) 46/46 (100.0%) 80/80 (100.0%)
command/storage 2/2 (100.0%) 6/6 (100.0%) 20/20 (100.0%)
common 129/129 (100.0%) 444/444 (100.0%) 1375/1375 (100.0%)
common/compress/gzip 16/16 (100.0%) 22/22 (100.0%) 167/167 (100.0%)
common/crypto 25/25 (100.0%) 72/72 (100.0%) 323/323 (100.0%)
common/encode 5/5 (100.0%) 32/32 (100.0%) 81/81 (100.0%)
common/io 44/44 (100.0%) 106/106 (100.0%) 485/485 (100.0%)
common/io/filter 41/41 (100.0%) 88/88 (100.0%) 419/419 (100.0%)
common/io/http 36/36 (100.0%) 162/162 (100.0%) 463/463 (100.0%)
common/io/tls 17/17 (100.0%) 88/88 (100.0%) 292/292 (100.0%)
common/type 228/228 (100.0%) 516/516 (100.0%) 2730/2730 (100.0%)
config 98/98 (100.0%) 538/538 (100.0%) 1384/1384 (100.0%)
db 15/15 (100.0%) 48/48 (100.0%) 214/214 (100.0%)
info 34/34 (100.0%) 98/98 (100.0%) 496/496 (100.0%)
perl 10/10 (100.0%) 26/26 (100.0%) 138/138 (100.0%)
postgres 26/26 (100.0%) 110/110 (100.0%) 343/343 (100.0%)
protocol 60/60 (100.0%) 164/164 (100.0%) 738/738 (100.0%)
storage 63/63 (100.0%) 162/162 (100.0%) 715/715 (100.0%)
storage/cifs 1/1 (100.0%) --- 9/9 (100.0%)
storage/posix 28/28 (100.0%) 165/166 (99.40%) 498/498 (100.0%)
storage/remote 23/23 (100.0%) 90/90 (100.0%) 493/493 (100.0%)
storage/s3 28/28 (100.0%) 120/120 (100.0%) 595/595 (100.0%)
TOTAL 994/994 (100.0%) 3857/3858 (99.97%) 13820/13820 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.