Skip to content

merge coverage across llvm-cov data[] entries#2

Merged
mcharytoniuk merged 4 commits into
mainfrom
merge-across-data-entries
May 22, 2026
Merged

merge coverage across llvm-cov data[] entries#2
mcharytoniuk merged 4 commits into
mainfrom
merge-across-data-entries

Conversation

@mcharytoniuk
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates llvm-cov JSON parsing so coverage is aggregated across multiple data[] entries (one per profiled binary), avoiding double-counting denominators when the same source file/function appears in multiple binaries.

Changes:

  • Aggregate per-file segments across all data[] entries before computing line/region coverage.
  • Aggregate functions across all data[] entries before merging instantiations and computing function coverage.
  • Add fixtures and tests covering multi-binary merging and segment-merging behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/parse-llvm-cov-json.test.mjs Adds a regression test ensuring coverage is merged across multiple data[] entries.
tests/merge-segments-across-entries.test.mjs Adds unit tests for the new cross-entry segment merge helper.
tests/fixtures/multi-binary-llvm-cov.json Adds an llvm-cov JSON fixture representing two binaries reporting the same file.
src/parse-llvm-cov-json.mjs Refactors parsing to collect/merge segments and functions across all data[] entries.
src/merge-segments-across-entries.mjs Introduces helper to merge segments by position across multiple entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/merge-segments-across-entries.mjs Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread src/merge-segments-across-entries.mjs
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread tests/merge-segments-across-entries.test.mjs Outdated
@mcharytoniuk mcharytoniuk merged commit 5e1e723 into main May 22, 2026
3 checks passed
@mcharytoniuk mcharytoniuk deleted the merge-across-data-entries branch May 22, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants