Skip to content

perf: Replace LCOV setup with native AWK parsing for coverage reports - #52

Merged
taorepoara merged 1 commit into
mainfrom
claude/coverage-report-speedup-zkkv8f
Aug 18, 2026
Merged

perf: Replace LCOV setup with native AWK parsing for coverage reports#52
taorepoara merged 1 commit into
mainfrom
claude/coverage-report-speedup-zkkv8f

Conversation

@taorepoara

Copy link
Copy Markdown
Member

Summary

Refactored the coverage report parsing workflow to eliminate the external LCOV setup dependency and instead parse coverage metrics directly using AWK, improving workflow efficiency and reducing external dependencies.

Key Changes

  • Removed the setup-lcov action step that was previously required to parse coverage reports
  • Replaced bash regex parsing with native AWK script that directly processes LCOV coverage file format
  • AWK script extracts coverage metrics (lines, functions, branches) by parsing LF, LH, FNF, FNH, BRF, and BRH fields
  • Calculates coverage percentages inline with proper handling of division-by-zero cases
  • Maintains identical output format for downstream workflow steps

Implementation Details

  • The new AWK approach reads the coverage file directly without requiring external tools
  • Coverage percentages are calculated with one decimal place precision using printf "%.1f\n"
  • Handles edge cases where total counts are zero to prevent division errors
  • Simplifies the workflow by removing an external action dependency while maintaining the same functionality

https://claude.ai/code/session_019LbNU7m5v2JAzSMfRvEcGA

Replace the lcov/apt-get install step and "lcov --summary" call with a
plain awk sum over the LF/LH/FNF/FNH/BRF/BRH fields of the tracefile.
lcov.info is a simple text format, so no tool install is needed at all,
removing the slowest part of the job.
@taorepoarataorepoara changed the title Replace LCOV setup with native AWK parsing for coverage reportsperf: Replace LCOV setup with native AWK parsing for coverage reportsAug 18, 2026
@taorepoara
taorepoara merged commit 9ccb8b7 into mainAug 18, 2026
1 check passed
@taorepoara
taorepoara deleted the claude/coverage-report-speedup-zkkv8f branch August 18, 2026 16:16
Sign up for freeto 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

@taorepoara@claude