pgBackRest - 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

17/17 (100.0%)

38/38 (100.0%)

206/206 (100.0%)

build/config

31/31 (100.0%)

462/462 (100.0%)

980/980 (100.0%)

build/error

6/6 (100.0%)

26/26 (100.0%)

78/78 (100.0%)

build/help

12/12 (100.0%)

128/128 (100.0%)

235/235 (100.0%)

build/postgres

8/8 (100.0%)

60/60 (100.0%)

151/151 (100.0%)

command

9/9 (100.0%)

72/72 (100.0%)

158/158 (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%)

281/281 (100.0%)

command/archive/get

9/9 (100.0%)

196/196 (100.0%)

467/467 (100.0%)

command/archive/push

12/12 (100.0%)

132/132 (100.0%)

410/410 (100.0%)

command/backup

50/50 (100.0%)

764/764 (100.0%)

1849/1849 (100.0%)

command/check

13/13 (100.0%)

104/104 (100.0%)

269/269 (100.0%)

command/control

4/4 (100.0%)

32/32 (100.0%)

60/60 (100.0%)

command/expire

10/10 (100.0%)

240/240 (100.0%)

398/398 (100.0%)

command/help

5/5 (100.0%)

134/134 (100.0%)

244/244 (100.0%)

command/info

13/13 (100.0%)

346/346 (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%)

686/686 (100.0%)

1439/1439 (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%)

135/135 (100.0%)

command/verify

21/21 (100.0%)

314/314 (100.0%)

757/757 (100.0%)

common

158/158 (100.0%)

654/654 (100.0%)

2012/2012 (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%)

58/58 (100.0%)

185/185 (100.0%)

common/io

58/58 (100.0%)

174/174 (100.0%)

724/724 (100.0%)

common/io/filter

31/31 (100.0%)

92/92 (100.0%)

385/385 (100.0%)

common/io/http

47/47 (100.0%)

250/250 (100.0%)

708/708 (100.0%)

common/io/socket

27/27 (100.0%)

44/44 (100.0%)

345/345 (100.0%)

common/io/tls

34/34 (100.0%)

98/98 (100.0%)

509/509 (100.0%)

common/type

320/320 (100.0%)

846/846 (100.0%)

4136/4136 (100.0%)

config

90/90 (100.0%)

966/966 (100.0%)

1859/1859 (100.0%)

db

24/24 (100.0%)

116/116 (100.0%)

442/442 (100.0%)

info

92/92 (100.0%)

940/940 (100.0%)

2482/2482 (100.0%)

postgres

34/34 (100.0%)

124/124 (100.0%)

436/436 (100.0%)

postgres/interface

3/3 (100.0%)

4/4 (100.0%)

12/12 (100.0%)

protocol

55/55 (100.0%)

228/228 (100.0%)

963/963 (100.0%)

storage

54/54 (100.0%)

228/228 (100.0%)

811/811 (100.0%)

storage/azure

25/25 (100.0%)

116/116 (100.0%)

533/533 (100.0%)

storage/cifs

2/2 (100.0%)

---

18/18 (100.0%)

storage/gcs

32/32 (100.0%)

130/130 (100.0%)

678/678 (100.0%)

storage/posix

28/28 (100.0%)

167/168 (99.40%)

485/485 (100.0%)

storage/remote

35/35 (100.0%)

118/118 (100.0%)

802/802 (100.0%)

storage/s3

30/30 (100.0%)

150/150 (100.0%)

726/726 (100.0%)

storage/sftp

30/30 (100.0%)

396/396 (100.0%)

809/809 (100.0%)

TOTAL

1633/1633 (100.0%)

10187/10188 (99.99%)

30607/30607 (100.0%)

The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.

Copyright © 2015-2023, The PostgreSQL Global Development Group, MIT License. Updated September 30, 2023