Metrics
This section will grow to include longitudinal charts for project health and quality signals.
Badge data flow
Every metrics producer publishes its summary as a workflow artifact; nothing
is committed to git. At documentation build time the latest completed run of
each producer on main is downloaded into the gitignored
doc/metrics/*.json, and the docs redeploy automatically whenever a
producer or a push to main completes. Local builds via
scripts/ci/docs.sh fetch the same artifacts (see docs.sh --help;
the token defaults to ~/.ghtoken). Missing or stale summaries degrade
to absent badges; doc builds never require fresh CI data.
Test coverage
Interactive coverage reports (line and diff coverage, PR comments, and history) are published on Codecov.
The Coverage
workflow uploads the merged gcovr JSON as the coverage-json-snapshot
artifact:
coverage-full.json— gcovr merge of per-shardcoverage-full.jsonartifacts (zephyr +modules/lib/posix)coverage-posix.json— gcovr merge of per-shardcoverage-posix.jsonartifacts (modules/lib/posix/includeandmodules/lib/posix/lib/posix; same file uploaded to Codecov per shard)coverage-provenance.json—maincommit (full and short SHA), run URL, and summary percentages
Scheduled nightly runs are skipped when main is unchanged since the last
Codecov upload.
Use Codecov for browsing source coverage; use the artifact JSON for offline diffs or tooling.
Twister results
The Twister
workflow’s scheduled runs upload an abridged results summary as the
twister-summary artifact:
twister-summary.json— per Option Group, per twister scenario variant (base,minimal,linux_compat,userspace, …): aggregate status, instance counts, and platforms, plus provenance (commit, run URL, timestamp). Produced byscripts/ci/twister-summarize.pyfrom the per-shardtwister.jsonreports.asan-summary.json/ubsan-summary.json— the same summary shape for the nightly AddressSanitizer / UndefinedBehaviorSanitizer runs (native_simonly,--enable-asan/--enable-ubsanwithCONFIG_NO_OPTIMIZATIONS=y), collapsed into a singleasan/ubsanvariant per group, uploaded as theasan-summary/ubsan-summaryartifacts by the dedicated ASAN and UBSAN workflows. Each scenario also recordsfailed_functions: the implementation functions implicated by sanitizer reports (extracted from twister logs byscripts/ci/sanitizer-findings.py). Sanitizers only report what fails, so a function absent from every report renders as passing.static-analysis.json— clang static analyzer (scan-build /analyze-build) findings from a--build-onlytwister run, produced byscripts/ci/static-analysis.pyin the dedicated Scan-Build workflow (artifactstatic-analysis-summary): analyzed files plus per-finding file, line, enclosing function, checker, and description. Coverage spans the module implementation and public headers as well as the Zephyr-tree sources introduced by the module’s patch series, with every distinct Kconfig variant of each file analyzed (deduplicated by preprocessed content), cross-translation-unit analysis, and Z3 refutation of findings. A group whose files were analyzed shows a passing badge unless a finding lands in them.
At documentation build time, scripts/doc/posix_metrics.py combines this
summary with coverage-posix.json, the Option Group tables, and the curated
doc/*.yaml metadata to render the badges on the
Option Group pages (via the posix_badges
Sphinx extension).