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 4/4 (100.0%) 52/52 (100.0%) 97/97 (100.0%)
command/archive 13/13 (100.0%) 74/74 (100.0%) 222/222 (100.0%)
command/archive/get 9/9 (100.0%) 184/184 (100.0%) 460/460 (100.0%)
command/archive/push 12/12 (100.0%) 130/130 (100.0%) 391/391 (100.0%)
command/backup 34/34 (100.0%) 474/474 (100.0%) 1116/1116 (100.0%)
command/check 8/8 (100.0%) 62/62 (100.0%) 136/136 (100.0%)
command/control 4/4 (100.0%) 34/34 (100.0%) 64/64 (100.0%)
command/expire 9/9 (100.0%) 222/222 (100.0%) 354/354 (100.0%)
command/help 4/4 (100.0%) 130/130 (100.0%) 202/202 (100.0%)
command/info 12/12 (100.0%) 298/298 (100.0%) 649/649 (100.0%)
command/local 1/1 (100.0%) --- 14/14 (100.0%)
command/remote 1/1 (100.0%) 6/6 (100.0%) 25/25 (100.0%)
command/repo 8/8 (100.0%) 112/112 (100.0%) 208/208 (100.0%)
command/restore 27/27 (100.0%) 478/478 (100.0%) 984/984 (100.0%)
command/stanza 7/7 (100.0%) 108/108 (100.0%) 155/155 (100.0%)
command/verify 20/20 (100.0%) 268/268 (100.0%) 700/700 (100.0%)
common 178/178 (100.0%) 584/584 (100.0%) 1883/1883 (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%) 159/159 (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%) 163/163 (100.0%)
common/compress/zst 13/13 (100.0%) 12/12 (100.0%) 133/133 (100.0%)
common/crypto 30/30 (100.0%) 92/92 (100.0%) 467/467 (100.0%)
common/io 67/67 (100.0%) 152/152 (100.0%) 691/691 (100.0%)
common/io/filter 41/41 (100.0%) 86/86 (100.0%) 411/411 (100.0%)
common/io/http 66/66 (100.0%) 240/240 (100.0%) 724/724 (100.0%)
common/io/socket 16/16 (100.0%) 32/32 (100.0%) 203/203 (100.0%)
common/io/tls 20/20 (100.0%) 76/76 (100.0%) 304/304 (100.0%)
common/type 298/298 (100.0%) 734/734 (100.0%) 3548/3548 (100.0%)
config 91/91 (100.0%) 740/740 (100.0%) 1475/1475 (100.0%)
db 29/29 (100.0%) 94/94 (100.0%) 389/389 (100.0%)
info 122/122 (100.0%) 752/752 (100.0%) 2400/2400 (100.0%)
postgres 34/34 (100.0%) 104/104 (100.0%) 382/382 (100.0%)
postgres/interface 1/1 (100.0%) --- 2/2 (100.0%)
protocol 69/69 (100.0%) 204/204 (100.0%) 838/838 (100.0%)
storage 70/70 (100.0%) 222/222 (100.0%) 825/825 (100.0%)
storage/azure 23/23 (100.0%) 100/100 (100.0%) 481/481 (100.0%)
storage/cifs 1/1 (100.0%) --- 9/9 (100.0%)
storage/gcs 28/28 (100.0%) 112/112 (100.0%) 594/594 (100.0%)
storage/posix 26/26 (100.0%) 153/154 (99.35%) 461/461 (100.0%)
storage/remote 32/32 (100.0%) 88/88 (100.0%) 623/623 (100.0%)
storage/s3 26/26 (100.0%) 124/124 (100.0%) 579/579 (100.0%)
TOTAL 1506/1506 (100.0%) 7427/7428 (99.99%) 23774/23774 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.