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%) 50/50 (100.0%) 89/89 (100.0%)
command/archive 12/12 (100.0%) 76/76 (100.0%) 212/212 (100.0%)
command/archive/get 7/7 (100.0%) 84/84 (100.0%) 224/224 (100.0%)
command/archive/push 10/10 (100.0%) 82/82 (100.0%) 270/270 (100.0%)
command/backup 33/33 (100.0%) 466/466 (100.0%) 1095/1095 (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 8/8 (100.0%) 152/152 (100.0%) 240/240 (100.0%)
command/help 4/4 (100.0%) 114/114 (100.0%) 161/161 (100.0%)
command/info 7/7 (100.0%) 162/162 (100.0%) 347/347 (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%) 460/460 (100.0%) 927/927 (100.0%)
command/stanza 7/7 (100.0%) 104/104 (100.0%) 155/155 (100.0%)
common 161/161 (100.0%) 532/532 (100.0%) 1662/1662 (100.0%)
common/compress 11/11 (100.0%) 28/28 (100.0%) 102/102 (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%) 162/162 (100.0%)
common/crypto 26/26 (100.0%) 74/74 (100.0%) 332/332 (100.0%)
common/encode 5/5 (100.0%) 32/32 (100.0%) 81/81 (100.0%)
common/io 45/45 (100.0%) 108/108 (100.0%) 488/488 (100.0%)
common/io/filter 41/41 (100.0%) 86/86 (100.0%) 411/411 (100.0%)
common/io/http 37/37 (100.0%) 172/172 (100.0%) 472/472 (100.0%)
common/io/tls 17/17 (100.0%) 88/88 (100.0%) 290/290 (100.0%)
common/type 250/250 (100.0%) 570/570 (100.0%) 2929/2929 (100.0%)
config 101/101 (100.0%) 614/614 (100.0%) 1450/1450 (100.0%)
db 27/27 (100.0%) 100/100 (100.0%) 368/368 (100.0%)
info 119/119 (100.0%) 732/732 (100.0%) 2364/2364 (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%) 188/188 (100.0%) 814/814 (100.0%)
storage 69/69 (100.0%) 206/206 (100.0%) 797/797 (100.0%)
storage/cifs 1/1 (100.0%) --- 9/9 (100.0%)
storage/posix 28/28 (100.0%) 165/166 (99.40%) 500/500 (100.0%)
storage/remote 29/29 (100.0%) 106/106 (100.0%) 622/622 (100.0%)
storage/s3 29/29 (100.0%) 126/126 (100.0%) 587/587 (100.0%)
TOTAL 1263/1263 (100.0%) 5985/5986 (99.98%) 19080/19080 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.