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 | 23/23 (100.0%) | 56/56 (100.0%) | 297/297 (100.0%) |
build/config | 35/35 (100.0%) | 462/462 (100.0%) | 972/972 (100.0%) |
build/error | 6/6 (100.0%) | 26/26 (100.0%) | 78/78 (100.0%) |
build/help | 13/13 (100.0%) | 134/134 (100.0%) | 262/262 (100.0%) |
build/postgres | 8/8 (100.0%) | 60/60 (100.0%) | 151/151 (100.0%) |
command | 15/15 (100.0%) | 94/94 (100.0%) | 239/239 (100.0%) |
command/annotate | 1/1 (100.0%) | 12/12 (100.0%) | 33/33 (100.0%) |
command/archive | 15/15 (100.0%) | 104/104 (100.0%) | 273/273 (100.0%) |
command/archive/get | 9/9 (100.0%) | 200/200 (100.0%) | 472/472 (100.0%) |
command/archive/push | 12/12 (100.0%) | 130/130 (100.0%) | 406/406 (100.0%) |
command/backup | 50/50 (100.0%) | 792/792 (100.0%) | 1898/1898 (100.0%) |
command/check | 13/13 (100.0%) | 106/106 (100.0%) | 272/272 (100.0%) |
command/control | 4/4 (100.0%) | 34/34 (100.0%) | 60/60 (100.0%) |
command/expire | 10/10 (100.0%) | 240/240 (100.0%) | 404/404 (100.0%) |
command/help | 5/5 (100.0%) | 134/134 (100.0%) | 244/244 (100.0%) |
command/info | 13/13 (100.0%) | 342/342 (100.0%) | 712/712 (100.0%) |
command/local | 1/1 (100.0%) | --- | 7/7 (100.0%) |
command/remote | 1/1 (100.0%) | 6/6 (100.0%) | 21/21 (100.0%) |
command/repo | 9/9 (100.0%) | 108/108 (100.0%) | 235/235 (100.0%) |
command/restore | 34/34 (100.0%) | 696/696 (100.0%) | 1449/1449 (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%) | 138/138 (100.0%) |
command/verify | 21/21 (100.0%) | 314/314 (100.0%) | 762/762 (100.0%) |
common | 143/143 (100.0%) | 614/614 (100.0%) | 1782/1782 (100.0%) |
common/compress | 13/13 (100.0%) | 24/24 (100.0%) | 122/122 (100.0%) |
common/compress/bz2 | 13/13 (100.0%) | 20/20 (100.0%) | 173/173 (100.0%) |
common/compress/gz | 13/13 (100.0%) | 26/26 (100.0%) | 174/174 (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%) | 146/146 (100.0%) |
common/crypto | 32/32 (100.0%) | 88/88 (100.0%) | 540/540 (100.0%) |
common/error | 33/33 (100.0%) | 62/62 (100.0%) | 188/188 (100.0%) |
common/io | 59/59 (100.0%) | 182/182 (100.0%) | 739/739 (100.0%) |
common/io/filter | 31/31 (100.0%) | 92/92 (100.0%) | 385/385 (100.0%) |
common/io/http | 57/57 (100.0%) | 274/274 (100.0%) | 875/875 (100.0%) |
common/io/socket | 28/28 (100.0%) | 104/104 (100.0%) | 442/442 (100.0%) |
common/io/tls | 36/36 (100.0%) | 114/114 (100.0%) | 536/536 (100.0%) |
common/type | 323/323 (100.0%) | 850/850 (100.0%) | 4179/4179 (100.0%) |
config | 92/92 (100.0%) | 1002/1002 (100.0%) | 1957/1957 (100.0%) |
db | 24/24 (100.0%) | 118/118 (100.0%) | 440/440 (100.0%) |
info | 92/92 (100.0%) | 936/936 (100.0%) | 2494/2494 (100.0%) |
postgres | 37/37 (100.0%) | 132/132 (100.0%) | 469/469 (100.0%) |
postgres/interface | 5/5 (100.0%) | 12/12 (100.0%) | 52/52 (100.0%) |
protocol | 55/55 (100.0%) | 230/230 (100.0%) | 968/968 (100.0%) |
storage | 54/54 (100.0%) | 228/228 (100.0%) | 805/805 (100.0%) |
storage/azure | 25/25 (100.0%) | 116/116 (100.0%) | 532/532 (100.0%) |
storage/cifs | 2/2 (100.0%) | --- | 18/18 (100.0%) |
storage/gcs | 34/34 (100.0%) | 148/148 (100.0%) | 749/749 (100.0%) |
storage/posix | 28/28 (100.0%) | 167/168 (99.40%) | 485/485 (100.0%) |
storage/remote | 35/35 (100.0%) | 120/120 (100.0%) | 801/801 (100.0%) |
storage/s3 | 29/29 (100.0%) | 156/156 (100.0%) | 732/732 (100.0%) |
storage/sftp | 31/31 (100.0%) | 404/404 (100.0%) | 836/836 (100.0%) |
TOTAL | 1661/1661 (100.0%) | 10435/10436 (99.99%) | 31271/31271 (100.0%) |
The C unit test modules in
/test/src/module
also have complete function/line coverage but are not included in the report.