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 13/13 (100.0%) 74/74 (100.0%) 222/222 (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 9/9 (100.0%) 202/202 (100.0%) 314/314 (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%) --- 21/21 (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%) 935/935 (100.0%)
command/stanza 7/7 (100.0%) 104/104 (100.0%) 155/155 (100.0%)
command/verify 17/17 (100.0%) 176/176 (100.0%) 479/479 (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%) 106/106 (100.0%) 373/373 (100.0%)
info 122/122 (100.0%) 752/752 (100.0%) 2394/2394 (100.0%)
postgres 34/34 (100.0%) 102/102 (100.0%) 381/381 (100.0%)
postgres/interface 1/1 (100.0%) --- 2/2 (100.0%)
protocol 69/69 (100.0%) 204/204 (100.0%) 857/857 (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 1407/1407 (100.0%) 6559/6560 (99.98%) 21269/21269 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.