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%) 52/52 (100.0%) 92/92 (100.0%)
command/archive 12/12 (100.0%) 72/72 (100.0%) 214/214 (100.0%)
command/archive/get 7/7 (100.0%) 84/84 (100.0%) 224/224 (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%) 1106/1106 (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%) 322/322 (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%) --- 17/17 (100.0%)
command/remote 1/1 (100.0%) 6/6 (100.0%) 28/28 (100.0%)
command/repo 8/8 (100.0%) 70/70 (100.0%) 176/176 (100.0%)
command/restore 26/26 (100.0%) 450/450 (100.0%) 927/927 (100.0%)
command/stanza 7/7 (100.0%) 104/104 (100.0%) 155/155 (100.0%)
common 165/165 (100.0%) 532/532 (100.0%) 1675/1675 (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 45/45 (100.0%) 110/110 (100.0%) 487/487 (100.0%)
common/io/filter 41/41 (100.0%) 86/86 (100.0%) 411/411 (100.0%)
common/io/http 37/37 (100.0%) 164/164 (100.0%) 475/475 (100.0%)
common/io/socket 24/24 (100.0%) 52/52 (100.0%) 225/225 (100.0%)
common/io/tls 20/20 (100.0%) 72/72 (100.0%) 270/270 (100.0%)
common/type 251/251 (100.0%) 570/570 (100.0%) 2935/2935 (100.0%)
config 103/103 (100.0%) 632/632 (100.0%) 1462/1462 (100.0%)
db 27/27 (100.0%) 100/100 (100.0%) 368/368 (100.0%)
info 119/119 (100.0%) 740/740 (100.0%) 2370/2370 (100.0%)
postgres 32/32 (100.0%) 98/98 (100.0%) 358/358 (100.0%)
postgres/interface 1/1 (100.0%) --- 2/2 (100.0%)
protocol 67/67 (100.0%) 194/194 (100.0%) 818/818 (100.0%)
storage 68/68 (100.0%) 208/208 (100.0%) 792/792 (100.0%)
storage/cifs 1/1 (100.0%) --- 9/9 (100.0%)
storage/posix 26/26 (100.0%) 149/150 (99.33%) 459/459 (100.0%)
storage/remote 26/26 (100.0%) 104/104 (100.0%) 571/571 (100.0%)
storage/s3 26/26 (100.0%) 120/120 (100.0%) 549/549 (100.0%)
TOTAL 1321/1321 (100.0%) 6123/6124 (99.98%) 19736/19736 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.