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 8/8 (100.0%) 10/10 (100.0%) 96/96 (100.0%)
build/config 30/30 (100.0%) 440/440 (100.0%) 914/914 (100.0%)
build/error 6/6 (100.0%) 26/26 (100.0%) 78/78 (100.0%)
build/help 12/12 (100.0%) 126/126 (100.0%) 231/231 (100.0%)
command 4/4 (100.0%) 50/50 (100.0%) 93/93 (100.0%)
command/archive 13/13 (100.0%) 76/76 (100.0%) 225/225 (100.0%)
command/archive/get 9/9 (100.0%) 196/196 (100.0%) 466/466 (100.0%)
command/archive/push 12/12 (100.0%) 132/132 (100.0%) 407/407 (100.0%)
command/backup 36/36 (100.0%) 532/532 (100.0%) 1253/1253 (100.0%)
command/check 8/8 (100.0%) 62/62 (100.0%) 136/136 (100.0%)
command/control 4/4 (100.0%) 32/32 (100.0%) 59/59 (100.0%)
command/expire 10/10 (100.0%) 240/240 (100.0%) 397/397 (100.0%)
command/help 5/5 (100.0%) 132/132 (100.0%) 241/241 (100.0%)
command/info 12/12 (100.0%) 328/328 (100.0%) 666/666 (100.0%)
command/local 1/1 (100.0%) --- 7/7 (100.0%)
command/remote 1/1 (100.0%) 6/6 (100.0%) 20/20 (100.0%)
command/repo 9/9 (100.0%) 110/110 (100.0%) 227/227 (100.0%)
command/restore 28/28 (100.0%) 590/590 (100.0%) 1135/1135 (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%) 316/316 (100.0%) 750/750 (100.0%)
common 176/176 (100.0%) 570/570 (100.0%) 1935/1935 (100.0%)
common/compress 11/11 (100.0%) 24/24 (100.0%) 103/103 (100.0%)
common/compress/bz2 13/13 (100.0%) 20/20 (100.0%) 176/176 (100.0%)
common/compress/gz 13/13 (100.0%) 22/22 (100.0%) 168/168 (100.0%)
common/compress/lz4 15/15 (100.0%) 24/24 (100.0%) 179/179 (100.0%)
common/compress/zst 13/13 (100.0%) 12/12 (100.0%) 150/150 (100.0%)
common/crypto 28/28 (100.0%) 80/80 (100.0%) 490/490 (100.0%)
common/io 53/53 (100.0%) 160/160 (100.0%) 658/658 (100.0%)
common/io/filter 31/31 (100.0%) 92/92 (100.0%) 388/388 (100.0%)
common/io/http 47/47 (100.0%) 250/250 (100.0%) 710/710 (100.0%)
common/io/socket 22/22 (100.0%) 34/34 (100.0%) 287/287 (100.0%)
common/io/tls 34/34 (100.0%) 98/98 (100.0%) 513/513 (100.0%)
common/type 327/327 (100.0%) 848/848 (100.0%) 4188/4188 (100.0%)
config 88/88 (100.0%) 882/882 (100.0%) 1746/1746 (100.0%)
db 24/24 (100.0%) 126/126 (100.0%) 434/434 (100.0%)
info 92/92 (100.0%) 816/816 (100.0%) 2297/2297 (100.0%)
postgres 33/33 (100.0%) 112/112 (100.0%) 389/389 (100.0%)
postgres/interface 1/1 (100.0%) --- 2/2 (100.0%)
protocol 55/55 (100.0%) 232/232 (100.0%) 954/954 (100.0%)
storage 48/48 (100.0%) 222/222 (100.0%) 693/693 (100.0%)
storage/azure 24/24 (100.0%) 110/110 (100.0%) 524/524 (100.0%)
storage/cifs 2/2 (100.0%) --- 18/18 (100.0%)
storage/gcs 31/31 (100.0%) 116/116 (100.0%) 650/650 (100.0%)
storage/posix 26/26 (100.0%) 153/154 (99.35%) 476/476 (100.0%)
storage/remote 31/31 (100.0%) 100/100 (100.0%) 742/742 (100.0%)
storage/s3 29/29 (100.0%) 142/142 (100.0%) 715/715 (100.0%)
TOTAL 1507/1507 (100.0%) 8779/8780 (99.99%) 27209/27209 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.