RE: Question for coverage report - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Question for coverage report
Date
Msg-id OSCPR01MB14966F2C1919204C0BA8C72AEF5F3A@OSCPR01MB14966.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Question for coverage report  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Question for coverage report
List 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


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Skip unregistered custom kinds on stats load
Next
From: Shinya Kato
Date:
Subject: Re: remove unnecessary include in src/backend/commands/policy.c