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%) 97/97 (100.0%)
build/config 30/30 (100.0%) 432/432 (100.0%) 903/903 (100.0%)
build/error 6/6 (100.0%) 18/18 (100.0%) 64/64 (100.0%)
build/help 12/12 (100.0%) 126/126 (100.0%) 232/232 (100.0%)
command 4/4 (100.0%) 50/50 (100.0%) 94/94 (100.0%)
command/archive 13/13 (100.0%) 76/76 (100.0%) 223/223 (100.0%)
command/archive/get 9/9 (100.0%) 192/192 (100.0%) 468/468 (100.0%)
command/archive/push 12/12 (100.0%) 130/130 (100.0%) 407/407 (100.0%)
command/backup 35/35 (100.0%) 484/484 (100.0%) 1172/1172 (100.0%)
command/check 8/8 (100.0%) 62/62 (100.0%) 139/139 (100.0%)
command/control 4/4 (100.0%) 34/34 (100.0%) 64/64 (100.0%)
command/expire 10/10 (100.0%) 240/240 (100.0%) 396/396 (100.0%)
command/help 5/5 (100.0%) 132/132 (100.0%) 241/241 (100.0%)
command/info 12/12 (100.0%) 304/304 (100.0%) 654/654 (100.0%)
command/local 1/1 (100.0%) --- 8/8 (100.0%)
command/remote 1/1 (100.0%) 6/6 (100.0%) 20/20 (100.0%)
command/repo 8/8 (100.0%) 108/108 (100.0%) 213/213 (100.0%)
command/restore 27/27 (100.0%) 506/506 (100.0%) 1034/1034 (100.0%)
command/server 6/6 (100.0%) 24/24 (100.0%) 87/87 (100.0%)
command/stanza 6/6 (100.0%) 106/106 (100.0%) 149/149 (100.0%)
command/verify 20/20 (100.0%) 268/268 (100.0%) 702/702 (100.0%)
common 169/169 (100.0%) 548/548 (100.0%) 1866/1866 (100.0%)
common/compress 11/11 (100.0%) 24/24 (100.0%) 105/105 (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%) 180/180 (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%) 486/486 (100.0%)
common/io 52/52 (100.0%) 152/152 (100.0%) 640/640 (100.0%)
common/io/filter 31/31 (100.0%) 92/92 (100.0%) 390/390 (100.0%)
common/io/http 45/45 (100.0%) 240/240 (100.0%) 695/695 (100.0%)
common/io/socket 22/22 (100.0%) 34/34 (100.0%) 286/286 (100.0%)
common/io/tls 34/34 (100.0%) 98/98 (100.0%) 514/514 (100.0%)
common/type 282/282 (100.0%) 802/802 (100.0%) 3640/3640 (100.0%)
config 88/88 (100.0%) 874/874 (100.0%) 1716/1716 (100.0%)
db 24/24 (100.0%) 128/128 (100.0%) 429/429 (100.0%)
info 88/88 (100.0%) 770/770 (100.0%) 2249/2249 (100.0%)
postgres 30/30 (100.0%) 96/96 (100.0%) 367/367 (100.0%)
postgres/interface 1/1 (100.0%) --- 2/2 (100.0%)
protocol 55/55 (100.0%) 232/232 (100.0%) 938/938 (100.0%)
storage 48/48 (100.0%) 224/224 (100.0%) 705/705 (100.0%)
storage/azure 24/24 (100.0%) 106/106 (100.0%) 505/505 (100.0%)
storage/cifs 2/2 (100.0%) --- 18/18 (100.0%)
storage/gcs 31/31 (100.0%) 116/116 (100.0%) 634/634 (100.0%)
storage/posix 26/26 (100.0%) 153/154 (99.35%) 473/473 (100.0%)
storage/remote 31/31 (100.0%) 96/96 (100.0%) 737/737 (100.0%)
storage/s3 29/29 (100.0%) 134/134 (100.0%) 677/677 (100.0%)
TOTAL 1442/1442 (100.0%) 8385/8386 (99.99%) 26113/26113 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.