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 4/4 (100.0%) 48/48 (100.0%) 94/94 (100.0%)
command/archive 12/12 (100.0%) 74/74 (100.0%) 216/216 (100.0%)
command/archive/get 7/7 (100.0%) 84/84 (100.0%) 223/223 (100.0%)
command/archive/push 10/10 (100.0%) 86/86 (100.0%) 274/274 (100.0%)
command/backup 34/34 (100.0%) 470/470 (100.0%) 1105/1105 (100.0%)
command/check 8/8 (100.0%) 54/54 (100.0%) 125/125 (100.0%)
command/control 4/4 (100.0%) 34/34 (100.0%) 63/63 (100.0%)
command/expire 10/10 (100.0%) 202/202 (100.0%) 320/320 (100.0%)
command/help 4/4 (100.0%) 114/114 (100.0%) 161/161 (100.0%)
command/info 7/7 (100.0%) 164/164 (100.0%) 360/360 (100.0%)
command/local 1/1 (100.0%) --- 20/20 (100.0%)
command/remote 1/1 (100.0%) 6/6 (100.0%) 28/28 (100.0%)
command/repo 8/8 (100.0%) 112/112 (100.0%) 210/210 (100.0%)
command/restore 26/26 (100.0%) 454/454 (100.0%) 933/933 (100.0%)
command/stanza 7/7 (100.0%) 104/104 (100.0%) 155/155 (100.0%)
common 172/172 (100.0%) 548/548 (100.0%) 1752/1752 (100.0%)
common/compress 11/11 (100.0%) 28/28 (100.0%) 102/102 (100.0%)
common/compress/bz2 13/13 (100.0%) 20/20 (100.0%) 159/159 (100.0%)
common/compress/gz 13/13 (100.0%) 22/22 (100.0%) 151/151 (100.0%)
common/compress/lz4 15/15 (100.0%) 24/24 (100.0%) 163/163 (100.0%)
common/compress/zst 13/13 (100.0%) 12/12 (100.0%) 133/133 (100.0%)
common/crypto 30/30 (100.0%) 92/92 (100.0%) 467/467 (100.0%)
common/encode 5/5 (100.0%) 32/32 (100.0%) 81/81 (100.0%)
common/io 66/66 (100.0%) 138/138 (100.0%) 659/659 (100.0%)
common/io/filter 41/41 (100.0%) 86/86 (100.0%) 411/411 (100.0%)
common/io/http 62/62 (100.0%) 212/212 (100.0%) 653/653 (100.0%)
common/io/socket 16/16 (100.0%) 32/32 (100.0%) 203/203 (100.0%)
common/io/tls 20/20 (100.0%) 76/76 (100.0%) 304/304 (100.0%)
common/type 244/244 (100.0%) 572/572 (100.0%) 2901/2901 (100.0%)
config 103/103 (100.0%) 632/632 (100.0%) 1460/1460 (100.0%)
db 27/27 (100.0%) 102/102 (100.0%) 370/370 (100.0%)
info 119/119 (100.0%) 740/740 (100.0%) 2381/2381 (100.0%)
postgres 34/34 (100.0%) 100/100 (100.0%) 378/378 (100.0%)
postgres/interface 1/1 (100.0%) --- 2/2 (100.0%)
protocol 69/69 (100.0%) 202/202 (100.0%) 855/855 (100.0%)
storage 68/68 (100.0%) 214/214 (100.0%) 798/798 (100.0%)
storage/azure 24/24 (100.0%) 100/100 (100.0%) 498/498 (100.0%)
storage/cifs 1/1 (100.0%) --- 9/9 (100.0%)
storage/posix 26/26 (100.0%) 149/150 (99.33%) 461/461 (100.0%)
storage/remote 24/24 (100.0%) 104/104 (100.0%) 537/537 (100.0%)
storage/s3 27/27 (100.0%) 120/120 (100.0%) 591/591 (100.0%)
TOTAL 1387/1387 (100.0%) 6363/6364 (99.98%) 20766/20766 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.