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%) 223/223 (100.0%)
command/archive/push 10/10 (100.0%) 82/82 (100.0%) 271/271 (100.0%)
command/backup 33/33 (100.0%) 466/466 (100.0%) 1089/1089 (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%) 134/134 (100.0%) 243/243 (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/restore 26/26 (100.0%) 462/462 (100.0%) 927/927 (100.0%)
command/stanza 7/7 (100.0%) 104/104 (100.0%) 155/155 (100.0%)
command/storage 3/3 (100.0%) 28/28 (100.0%) 76/76 (100.0%)
common 155/155 (100.0%) 514/514 (100.0%) 1595/1595 (100.0%)
common/compress/gzip 16/16 (100.0%) 24/24 (100.0%) 163/163 (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%) 285/285 (100.0%)
common/type 249/249 (100.0%) 554/554 (100.0%) 2894/2894 (100.0%)
config 101/101 (100.0%) 590/590 (100.0%) 1435/1435 (100.0%)
db 27/27 (100.0%) 100/100 (100.0%) 368/368 (100.0%)
info 117/117 (100.0%) 724/724 (100.0%) 2336/2336 (100.0%)
postgres 37/37 (100.0%) 122/122 (100.0%) 424/424 (100.0%)
protocol 67/67 (100.0%) 188/188 (100.0%) 814/814 (100.0%)
storage 67/67 (100.0%) 194/194 (100.0%) 774/774 (100.0%)
storage/cifs 1/1 (100.0%) --- 9/9 (100.0%)
storage/posix 28/28 (100.0%) 159/160 (99.38%) 493/493 (100.0%)
storage/remote 29/29 (100.0%) 108/108 (100.0%) 615/615 (100.0%)
storage/s3 29/29 (100.0%) 126/126 (100.0%) 587/587 (100.0%)
TOTAL 1228/1228 (100.0%) 5819/5820 (99.98%) 18602/18602 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.