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
build/common 17/17 (100.0%) 38/38 (100.0%) 208/208 (100.0%)
build/config 30/30 (100.0%) 454/454 (100.0%) 960/960 (100.0%)
build/error 6/6 (100.0%) 26/26 (100.0%) 78/78 (100.0%)
build/help 12/12 (100.0%) 128/128 (100.0%) 235/235 (100.0%)
build/postgres 6/6 (100.0%) 52/52 (100.0%) 123/123 (100.0%)
command 9/9 (100.0%) 72/72 (100.0%) 158/158 (100.0%)
command/annotate 1/1 (100.0%) 12/12 (100.0%) 33/33 (100.0%)
command/archive 13/13 (100.0%) 72/72 (100.0%) 220/220 (100.0%)
command/archive/get 9/9 (100.0%) 196/196 (100.0%) 469/469 (100.0%)
command/archive/push 12/12 (100.0%) 132/132 (100.0%) 411/411 (100.0%)
command/backup 50/50 (100.0%) 754/754 (100.0%) 1851/1851 (100.0%)
command/check 8/8 (100.0%) 62/62 (100.0%) 137/137 (100.0%)
command/control 4/4 (100.0%) 32/32 (100.0%) 60/60 (100.0%)
command/expire 10/10 (100.0%) 240/240 (100.0%) 397/397 (100.0%)
command/help 5/5 (100.0%) 134/134 (100.0%) 244/244 (100.0%)
command/info 12/12 (100.0%) 338/338 (100.0%) 687/687 (100.0%)
command/local 1/1 (100.0%) --- 7/7 (100.0%)
command/remote 1/1 (100.0%) 6/6 (100.0%) 21/21 (100.0%)
command/repo 9/9 (100.0%) 108/108 (100.0%) 235/235 (100.0%)
command/restore 33/33 (100.0%) 688/688 (100.0%) 1419/1419 (100.0%)
command/server 6/6 (100.0%) 24/24 (100.0%) 88/88 (100.0%)
command/stanza 5/5 (100.0%) 106/106 (100.0%) 135/135 (100.0%)
command/verify 21/21 (100.0%) 314/314 (100.0%) 760/760 (100.0%)
common 183/183 (100.0%) 692/692 (100.0%) 2117/2117 (100.0%)
common/compress 13/13 (100.0%) 24/24 (100.0%) 122/122 (100.0%)
common/compress/bz2 13/13 (100.0%) 20/20 (100.0%) 180/180 (100.0%)
common/compress/gz 13/13 (100.0%) 26/26 (100.0%) 182/182 (100.0%)
common/compress/lz4 15/15 (100.0%) 24/24 (100.0%) 186/186 (100.0%)
common/compress/zst 13/13 (100.0%) 12/12 (100.0%) 153/153 (100.0%)
common/crypto 32/32 (100.0%) 88/88 (100.0%) 555/555 (100.0%)
common/io 60/60 (100.0%) 182/182 (100.0%) 768/768 (100.0%)
common/io/filter 35/35 (100.0%) 106/106 (100.0%) 453/453 (100.0%)
common/io/http 47/47 (100.0%) 248/248 (100.0%) 722/722 (100.0%)
common/io/socket 22/22 (100.0%) 34/34 (100.0%) 291/291 (100.0%)
common/io/tls 34/34 (100.0%) 98/98 (100.0%) 518/518 (100.0%)
common/type 321/321 (100.0%) 844/844 (100.0%) 4179/4179 (100.0%)
config 86/86 (100.0%) 930/930 (100.0%) 1772/1772 (100.0%)
db 24/24 (100.0%) 116/116 (100.0%) 444/444 (100.0%)
info 92/92 (100.0%) 932/932 (100.0%) 2482/2482 (100.0%)
postgres 32/32 (100.0%) 110/110 (100.0%) 394/394 (100.0%)
postgres/interface 1/1 (100.0%) --- 2/2 (100.0%)
protocol 55/55 (100.0%) 230/230 (100.0%) 979/979 (100.0%)
storage 53/53 (100.0%) 226/226 (100.0%) 813/813 (100.0%)
storage/azure 25/25 (100.0%) 110/110 (100.0%) 531/531 (100.0%)
storage/cifs 2/2 (100.0%) --- 18/18 (100.0%)
storage/gcs 32/32 (100.0%) 116/116 (100.0%) 659/659 (100.0%)
storage/posix 26/26 (100.0%) 159/160 (99.38%) 482/482 (100.0%)
storage/remote 35/35 (100.0%) 118/118 (100.0%) 809/809 (100.0%)
storage/s3 30/30 (100.0%) 142/142 (100.0%) 724/724 (100.0%)
TOTAL 1574/1574 (100.0%) 9575/9576 (99.99%) 29471/29471 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.