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%) 101/101 (100.0%)
build/config 26/26 (100.0%) 358/358 (100.0%) 733/733 (100.0%)
build/error 6/6 (100.0%) 18/18 (100.0%) 64/64 (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%) 463/463 (100.0%)
command/archive/push 12/12 (100.0%) 130/130 (100.0%) 403/403 (100.0%)
command/backup 32/32 (100.0%) 470/470 (100.0%) 1103/1103 (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%) 395/395 (100.0%)
command/help 5/5 (100.0%) 148/148 (100.0%) 237/237 (100.0%)
command/info 12/12 (100.0%) 298/298 (100.0%) 646/646 (100.0%)
command/local 1/1 (100.0%) --- 8/8 (100.0%)
command/remote 1/1 (100.0%) 6/6 (100.0%) 19/19 (100.0%)
command/repo 8/8 (100.0%) 108/108 (100.0%) 211/211 (100.0%)
command/restore 27/27 (100.0%) 488/488 (100.0%) 1013/1013 (100.0%)
command/stanza 7/7 (100.0%) 108/108 (100.0%) 162/162 (100.0%)
command/verify 20/20 (100.0%) 268/268 (100.0%) 699/699 (100.0%)
common 168/168 (100.0%) 578/578 (100.0%) 1861/1861 (100.0%)
common/compress 11/11 (100.0%) 28/28 (100.0%) 102/102 (100.0%)
common/compress/bz2 13/13 (100.0%) 20/20 (100.0%) 171/171 (100.0%)
common/compress/gz 13/13 (100.0%) 22/22 (100.0%) 163/163 (100.0%)
common/compress/lz4 15/15 (100.0%) 24/24 (100.0%) 175/175 (100.0%)
common/compress/zst 13/13 (100.0%) 12/12 (100.0%) 145/145 (100.0%)
common/crypto 28/28 (100.0%) 82/82 (100.0%) 458/458 (100.0%)
common/io 48/48 (100.0%) 152/152 (100.0%) 607/607 (100.0%)
common/io/filter 30/30 (100.0%) 86/86 (100.0%) 359/359 (100.0%)
common/io/http 45/45 (100.0%) 240/240 (100.0%) 694/694 (100.0%)
common/io/socket 16/16 (100.0%) 32/32 (100.0%) 207/207 (100.0%)
common/io/tls 20/20 (100.0%) 76/76 (100.0%) 316/316 (100.0%)
common/type 268/268 (100.0%) 772/772 (100.0%) 3538/3538 (100.0%)
config 98/98 (100.0%) 774/774 (100.0%) 1573/1573 (100.0%)
db 23/23 (100.0%) 98/98 (100.0%) 374/374 (100.0%)
info 88/88 (100.0%) 766/766 (100.0%) 2239/2239 (100.0%)
postgres 29/29 (100.0%) 96/96 (100.0%) 357/357 (100.0%)
postgres/interface 1/1 (100.0%) --- 2/2 (100.0%)
protocol 52/52 (100.0%) 196/196 (100.0%) 825/825 (100.0%)
storage 47/47 (100.0%) 218/218 (100.0%) 719/719 (100.0%)
storage/azure 23/23 (100.0%) 100/100 (100.0%) 480/480 (100.0%)
storage/cifs 1/1 (100.0%) --- 9/9 (100.0%)
storage/gcs 30/30 (100.0%) 116/116 (100.0%) 621/621 (100.0%)
storage/posix 26/26 (100.0%) 153/154 (99.35%) 473/473 (100.0%)
storage/remote 31/31 (100.0%) 106/106 (100.0%) 731/731 (100.0%)
storage/s3 26/26 (100.0%) 126/126 (100.0%) 581/581 (100.0%)
TOTAL 1376/1376 (100.0%) 7937/7938 (99.99%) 24557/24557 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.