RE: Question for coverage report
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>, Álvaro Herrera <alvherre@kurilemu.de>
Cc: Jacob Champion <jacob.champion@enterprisedb.com>, Steven Niu <niushiji@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2025-10-22T06:11:32Z
Lists: pgsql-hackers
Dear Álvaro, Tom,
Thanks for giving some low-layer information. I understood like:
gcov does not actually count each line, counts a chunk of codes. Boundaries are
not same as code paths, before-and-after the if {} can be in the same chunk.
Per above, I could consider in pguotput.c., line 1495 was actually executed but
1503 was counted when it reached line 1494. Another question is why one of the
branch was reported as 100% and another one was 0%. Is it just because counts
was less than 1/100?
I googled some articles but could not find.
```
183433: 1494: if (!is_publishable_relation(relation))
call 0 returned 100%
branch 1 taken 100% (fallthrough)
branch 2 taken 0%
1171: 1495: return;
```
Best regards,
Hayato Kuroda
FUJITSU LIMITED