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%) 88/88 (100.0%)
command/archive 10/10 (100.0%) 64/64 (100.0%) 180/180 (100.0%)
command/archive/get 7/7 (100.0%) 86/86 (100.0%) 223/223 (100.0%)
command/archive/push 10/10 (100.0%) 84/84 (100.0%) 271/271 (100.0%)
command/backup 11/11 (100.0%) 114/114 (100.0%) 289/289 (100.0%)
command/check 2/2 (100.0%) 8/8 (100.0%) 34/34 (100.0%)
command/control 4/4 (100.0%) 34/34 (100.0%) 63/63 (100.0%)
command/expire 8/8 (100.0%) 130/130 (100.0%) 244/244 (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 25/25 (100.0%) 442/442 (100.0%) 880/880 (100.0%)
command/stanza 8/8 (100.0%) 114/114 (100.0%) 175/175 (100.0%)
command/storage 3/3 (100.0%) 28/28 (100.0%) 75/75 (100.0%)
common 140/140 (100.0%) 466/466 (100.0%) 1447/1447 (100.0%)
common/compress/gzip 16/16 (100.0%) 22/22 (100.0%) 167/167 (100.0%)
common/crypto 26/26 (100.0%) 74/74 (100.0%) 335/335 (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%) 492/492 (100.0%)
common/io/filter 41/41 (100.0%) 86/86 (100.0%) 411/411 (100.0%)
common/io/http 36/36 (100.0%) 158/158 (100.0%) 447/447 (100.0%)
common/io/tls 17/17 (100.0%) 88/88 (100.0%) 292/292 (100.0%)
common/type 248/248 (100.0%) 564/564 (100.0%) 2923/2923 (100.0%)
config 98/98 (100.0%) 546/546 (100.0%) 1390/1390 (100.0%)
db 17/17 (100.0%) 46/46 (100.0%) 218/218 (100.0%)
info 103/103 (100.0%) 440/440 (100.0%) 1751/1751 (100.0%)
perl 10/10 (100.0%) 26/26 (100.0%) 138/138 (100.0%)
postgres 30/30 (100.0%) 104/104 (100.0%) 358/358 (100.0%)
protocol 60/60 (100.0%) 156/156 (100.0%) 710/710 (100.0%)
storage 68/68 (100.0%) 198/198 (100.0%) 790/790 (100.0%)
storage/cifs 1/1 (100.0%) --- 9/9 (100.0%)
storage/posix 28/28 (100.0%) 157/158 (99.37%) 497/497 (100.0%)
storage/remote 23/23 (100.0%) 90/90 (100.0%) 493/493 (100.0%)
storage/s3 28/28 (100.0%) 120/120 (100.0%) 594/594 (100.0%)
TOTAL 1144/1144 (100.0%) 4917/4918 (99.98%) 16618/16618 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.