diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-04-09 08:46:39 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2024-04-09 12:16:53 +0000 |
| commit | 171ec3714ee4886a3f5ecbfe71f63c8f81c7fd7c (patch) | |
| tree | 93f2d371ed75752275467bbce73d6387460b3eda /executor/executor.cc | |
| parent | b3198cd94cc221153d34443bc657c799ec47a2ed (diff) | |
pkg/cover: fix jsonl hit count calculation
prepareFileMap does more work than we need and leads to incorrect hit counts.
prepareFileMap produces hit counts per source line (for source reports),
but jsonl exports data based on coverage callbacks, not source lines.
So if we have 2 callbacks on the same line, we will double count them
(both will have hit count 2). If we calculate total percent later
based on that data, it will be wrong.
Use simpler calculation based on PCs.
Diffstat (limited to 'executor/executor.cc')
0 files changed, 0 insertions, 0 deletions
