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%) 56/56 (100.0%) 176/176 (100.0%)
command/archive/get 6/6 (100.0%) 86/86 (100.0%) 214/214 (100.0%)
command/archive/push 9/9 (100.0%) 86/86 (100.0%) 265/265 (100.0%)
command/backup 5/5 (100.0%) 44/44 (100.0%) 117/117 (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%) 266/266 (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%) --- 16/16 (100.0%)
command/remote 1/1 (100.0%) 6/6 (100.0%) 27/27 (100.0%)
command/restore 2/2 (100.0%) 48/48 (100.0%) 85/85 (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 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 43/43 (100.0%) 104/104 (100.0%) 471/471 (100.0%)
common/io/filter 36/36 (100.0%) 84/84 (100.0%) 367/367 (100.0%)
common/io/http 36/36 (100.0%) 162/162 (100.0%) 463/463 (100.0%)
common/io/tls 14/14 (100.0%) 76/76 (100.0%) 239/239 (100.0%)
common/type 227/227 (100.0%) 504/504 (100.0%) 2708/2708 (100.0%)
config 98/98 (100.0%) 538/538 (100.0%) 1385/1385 (100.0%)
info 35/35 (100.0%) 106/106 (100.0%) 511/511 (100.0%)
perl 10/10 (100.0%) 26/26 (100.0%) 138/138 (100.0%)
postgres 15/15 (100.0%) 66/66 (100.0%) 189/189 (100.0%)
protocol 59/59 (100.0%) 136/136 (100.0%) 712/712 (100.0%)
storage 61/61 (100.0%) 154/154 (100.0%) 693/693 (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%) 78/78 (100.0%) 478/478 (100.0%)
storage/s3 28/28 (100.0%) 110/110 (100.0%) 582/582 (100.0%)
TOTAL 949/949 (100.0%) 3609/3610 (99.97%) 13085/13085 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.