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%) 89/89 (100.0%)
command/archive 10/10 (100.0%) 68/68 (100.0%) 186/186 (100.0%)
command/archive/get 7/7 (100.0%) 86/86 (100.0%) 223/223 (100.0%)
command/archive/push 10/10 (100.0%) 84/84 (100.0%) 271/271 (100.0%)
command/backup 11/11 (100.0%) 114/114 (100.0%) 292/292 (100.0%)
command/check 8/8 (100.0%) 56/56 (100.0%) 127/127 (100.0%)
command/control 4/4 (100.0%) 34/34 (100.0%) 63/63 (100.0%)
command/expire 8/8 (100.0%) 134/134 (100.0%) 243/243 (100.0%)
command/help 4/4 (100.0%) 114/114 (100.0%) 161/161 (100.0%)
command/info 7/7 (100.0%) 162/162 (100.0%) 347/347 (100.0%)
command/local 1/1 (100.0%) --- 17/17 (100.0%)
command/remote 1/1 (100.0%) 6/6 (100.0%) 29/29 (100.0%)
command/restore 25/25 (100.0%) 442/442 (100.0%) 880/880 (100.0%)
command/stanza 7/7 (100.0%) 104/104 (100.0%) 155/155 (100.0%)
command/storage 3/3 (100.0%) 28/28 (100.0%) 75/75 (100.0%)
common 146/146 (100.0%) 470/470 (100.0%) 1517/1517 (100.0%)
common/compress/gzip 16/16 (100.0%) 24/24 (100.0%) 168/168 (100.0%)
common/crypto 26/26 (100.0%) 74/74 (100.0%) 335/335 (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%) 492/492 (100.0%)
common/io/filter 41/41 (100.0%) 86/86 (100.0%) 411/411 (100.0%)
common/io/http 36/36 (100.0%) 158/158 (100.0%) 453/453 (100.0%)
common/io/tls 17/17 (100.0%) 88/88 (100.0%) 292/292 (100.0%)
common/type 249/249 (100.0%) 554/554 (100.0%) 2900/2900 (100.0%)
config 98/98 (100.0%) 546/546 (100.0%) 1390/1390 (100.0%)
db 27/27 (100.0%) 98/98 (100.0%) 366/366 (100.0%)
info 116/116 (100.0%) 696/696 (100.0%) 2303/2303 (100.0%)
perl 10/10 (100.0%) 26/26 (100.0%) 138/138 (100.0%)
postgres 35/35 (100.0%) 108/108 (100.0%) 389/389 (100.0%)
protocol 66/66 (100.0%) 168/168 (100.0%) 791/791 (100.0%)
storage 68/68 (100.0%) 196/196 (100.0%) 789/789 (100.0%)
storage/cifs 1/1 (100.0%) --- 9/9 (100.0%)
storage/posix 28/28 (100.0%) 159/160 (99.38%) 500/500 (100.0%)
storage/remote 29/29 (100.0%) 108/108 (100.0%) 624/624 (100.0%)
storage/s3 28/28 (100.0%) 120/120 (100.0%) 587/587 (100.0%)
TOTAL 1196/1196 (100.0%) 5301/5302 (99.98%) 17693/17693 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.