Integrating WCET and Timing Analysis into CI/CD for Embedded Software
embeddedCI/CDtiming-analysis

Integrating WCET and Timing Analysis into CI/CD for Embedded Software

ppasty
2026-01-24 12:00:00
12 min read
Advertisement

Integrate WCET and timing analysis into CI to block PR regressions. Hands-on guide with GitHub Actions, GitLab, Jenkins, and practical policies.

Ship real-time guarantees before merging: plug WCET & timing analysis into PR checks

You know the pain: a pull request that compiles and passes unit tests still introduces a regression that blows the ECU deadline in the field. Teams lose time tracing intermittent timing regressions, certification gets harder, and late-cycle surprises cost millions. In 2026, with the Vector–RocqStat move accelerating integrated timing and verification toolchains, it’s now practical to enforce WCET and timing analysis as part of everyday CI/CD and pull-request workflows.

Executive summary — what you’ll get from this guide

This hands-on guide shows how to run RocqStat/VectorCAST-style static timing and worst-case execution time (WCET) analysis in CI pipelines (GitHub Actions, GitLab CI, Jenkins), fail PRs that introduce unacceptable timing regressions, and add actionable annotations and chatops notifications so reviewers can triage fixes fast. You’ll get:

  • Concrete pipeline examples and scripts you can drop into a repo
  • Practical rules for setting thresholds and baselines
  • Techniques to keep CI fast and reliable (incremental analysis, caching, sampling)
  • Advice for reducing false positives and handling nondeterminism
  • 2026 trends and how Vector’s RocqStat acquisition impacts toolchains

2026 context — why timing analysis in CI matters now

In January 2026 Vector Informatik announced the acquisition of StatInf’s RocqStat timing analysis technology, signaling increased demand for integrated timing verification inside developer toolchains. The goal is clear: bring precise static WCET analysis into mainstream verification flows and reduce the gap between functional testing and timing safety analysis.

"Timing safety is becoming a critical requirement across software-defined industries." — Vector announcement, 2026

Two market forces make CI-integrated timing checks a priority in 2026:

  • Software-defined vehicles and avionics increase the amount of logic in safety-critical ECUs, raising the risk that small software changes affect timing.
  • Certifying organizations and standards (ISO 26262, DO-178C) expect traceable evidence of timing analysis; embedding checks in CI provides auditable history for each change.

Key concepts — static WCET vs measurement

Before integrating tools into CI you must decide what you enforce. Two complementary approaches exist:

  • Static timing analysis (WCET): analyzes control-flow graphs, micro-architectural models (caches, pipelines, buses), and produces safe upper bounds without executing on hardware. RocqStat-style tools fall here.
  • Measurement-based timing: runs instrumented code on target or simulated hardware and collects execution times. Good for regressions and performance trends, but not sufficient alone to prove safety.

For CI gating you’ll usually combine both: run fast static analyses to block obvious regressions and complementary measurement tests on sampled commits or nightly builds that exercise hardware-in-the-loop (HIL).

High-level integration strategy

The integration goal: make timing regressions as visible and actionable as compile or unit-test failures. That requires three pieces working together:

  1. Baseline — store a golden WCET map for the main branch (or release branch) that your PRs compare against.
  2. Fast change analysis — run an incremental WCET check on changed units only; fail the PR or post a warning if the delta exceeds policy.
  3. Escalation — for suspicious results trigger deeper analysis or HIL runs, and create traceable tickets if deadlines are endangered.

Practical policy examples for PR checks

Policies should balance safety and developer productivity. Here are practical rules used by teams in 2026:

  • Hard deadline violation: fail the PR if any function’s WCET > configured real-time deadline.
  • Relative regression: fail or warn if delta > X% or delta > Y microseconds for the modified functions (common defaults: 5% or 50 µs depending on domain).
  • Change-only analysis: run detailed WCET only on modified compilation units to keep runtime manageable.
  • Tiered enforcement: block merges on hard violations, create warnings for small regressions, auto-assign to the code owner for review.

Tooling primitives you’ll need in CI

Whether you use RocqStat, VectorCAST, or another WCET tool, ensure the toolchain exposes these primitives for CI integration:

  • CLI entry point that can run a specified set of compilation units and output machine-readable results (JSON/CSV).
  • Deterministic builds — your build output must be reproducible for meaningful comparison (fixed timestamps, same compiler flags).
  • Lightweight incremental mode so the tool can analyze only changed functions.
  • Artifact export (reports, call graphs) that CI can store for audit and escalation.

Example: GitHub Actions workflow (drop-in)

Below is a practical GitHub Actions workflow that runs a hypothetical wcet CLI (wcet-cli) and fails the PR on regression. The workflow assumes:

  • wcet-cli supports --baseline and --output-json
  • you store the baseline artifact in an S3 bucket or GitHub release
  • you have an action to create check run annotations (github-script shown for clarity)
name: PR WCET Check
on: [pull_request]

jobs:
  wcet:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup toolchain
        run: |
          sudo apt-get update && sudo apt-get install -y build-essential
          # install wcet-cli (containerize it in real infra)
      - name: Build project
        run: make all
      - name: Download WCET baseline
        run: |
          curl -sSL "$WCET_BASELINE_URL" -o baseline.json
      - name: Run WCET analysis
        run: |
          ./tools/wcet-cli --input build/output.elf --compare baseline.json --output-json wcet-result.json || true
      - name: Parse results and annotate
        uses: actions/github-script@v6
        with:
          script: |
            const fs = require('fs')
            const res = JSON.parse(fs.readFileSync('wcet-result.json'))
            const regressions = res.regressions || []
            if (regressions.length > 0) {
              // Create annotations and fail job
              regressions.forEach(r => {
                core.warning(`WCET regression: ${r.func} +${r.delta_us}us`)
              })
              core.setFailed('WCET regressions exceed policy')
            } else {
              core.notice('No WCET regressions')
            }
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Notes: keep the heavy WCET engine in a container or runner fleet with the required licenses. In production you’ll replace curl baseline with an authenticated fetch from your artifact store.

GitLab CI & Jenkins patterns

GitLab CI (change-only job)

stages:
  - wcet

wcet_check:
  stage: wcet
  image: myregistry.local/wcet-runner:latest
  script:
    - make all
    - ./tools/wcet-cli --diff $(git merge-base origin/main HEAD) --output-json wcet.json || true
    - python ci/parse_wcet.py wcet.json
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"

Jenkins (Declarative)

pipeline {
  agent { label 'wcet-runner' }
  stages {
    stage('Build') { steps { sh 'make all' } }
    stage('WCET') {
      steps {
        sh './tools/wcet-cli --compare s3://mybucket/baseline.json --output-json wcet.json || true'
        sh 'python3 ci/parse_wcet.py wcet.json'
      }
    }
  }
  post {
    failure { mail to: 'team@example.com', subject: 'WCET check failed' }
  }
}

Keeping CI fast: incremental analysis and caching

Running a full WCET analysis for every PR can be slow. Use these techniques to keep checks fast and practical:

  • Change-based slicing: analyze only the call graph reachable from changed functions. Most WCET regressions are local to modified code paths.
  • Baseline shards: split baseline artifacts per module; fetch only relevant shards for the modules changed by the PR.
  • Warm cache: cache intermediate analysis artifacts (CFG, micro-architecture tokenization) between runs using CI cache or object storage.
  • Tiered analysis: fast static check in the PR; full-blown WCET with complex micro-arch models in nightly pipelines or on-demand escalation.

Reducing false positives and handling nondeterminism

Timing analyses can be sensitive to compiler flags, inlining, and environment. To reduce wasted cycles:

  • Force deterministic builds: pin compiler versions, disable time-based macros, use -ffile-prefix-map and similar flags to remove variance.
  • Lock optimization profiles: enforce a single optimization profile for timing-critical modules and record it in the baseline metadata.
  • Statistical thresholds: for measurement-based tests, use statistical tests (e.g., Mann–Whitney) over multiple runs to detect real regressions vs noise.
  • Ignore benign changes: maintain an allowlist for non-critical test code or simulated-only modules that don’t affect real-time behavior.

Reporting, annotations and ChatOps

For PR workflows to be effective the results must be actionable:

  • Line-level annotations: use the CI system’s check-run API (GitHub Checks API or GitLab code quality report) to annotate the exact function or file that caused the regression.
  • Human-friendly summary: top of PR comment with: New WCET: X µs, Baseline: Y µs, Delta: +Z µs, Affected functions list, Quick remediation hints.
  • ChatOps integration: send summarized failure alerts to Slack/Teams with links to the WCET report and failing tests via webhooks. Use buttons to kick off a deeper analysis or HIL job if needed.
  • Artifacts: store the JSON/HTML reports as CI artifacts and link them in the PR so reviewers can download and inspect call graphs and evidence.

Escalation: when PR checks aren’t enough

If the WCET tool flags a potential safety breach you’ll need a reproducible escalation path:

  1. Trigger a full WCET run with the most accurate micro-architecture model (may require licensed tool execution on dedicated hardware).
  2. Run measurement tests on a representative hardware fixture (HIL) with the exact build used in the PR.
  3. Create a traceable ticket for the safety engineer and link all artifacts; snapshot the baseline and results for certification records.

Example real-world flow: automotive ECU PR check with VectorCAST + RocqStat

Here’s a condensed workflow pattern inspired by the Vector/RocqStat trend that teams are adopting in 2026:

  1. Developer opens PR — CI runs unit tests and a fast static timing check via a RocqStat CLI plugin that analyzes changed C files.
  2. If the tool reports a regression > threshold, CI posts an annotated failure on the PR and creates a non-blocking ticket for the performance owner (soft-fail for low-risk regressions).
  3. If regression is > safety margin (hard-fail), the merge is blocked and an automated escalation kicks off: a VectorCAST full-suite run with RocqStat’s micro-architecture profile and a nightly HIL build.
  4. All runs export JSON reports into the project’s artifact store and link to the PR. The safety case records the baseline and PR results for traceability.

Licensing, secrets, and secure execution

Timing tools and micro-architecture models are often licensed. In CI:

  • Use dedicated runners with licensed binaries and never embed license keys in container images. Inject keys via secrets managers at runtime.
  • Isolate licensed runs in an internal runner pool to safeguard IP and limit concurrent license usage.
  • When sharing reports externally strip micro-architecture model details that may be sensitive.

Scaling tips for large mono-repos and hundreds of PRs

At scale, naive per-PR full analysis won’t work. Use these patterns:

  • Module-level policy: only enforce timing checks on modules marked real-time-critical; non-critical modules get periodic analysis.
  • Priority queueing: schedule detailed WCET runs off the critical path (nightly or on-demand) but keep quick checks in PRs.
  • Delta-based caching: store function-level WCET numbers and only recompute affected functions on PRs that touch their transitive callers.

Advanced strategies and 2026+ predictions

The next two years will see tighter coupling between static timing tools and CI ecosystems. Expect:

  • Unified verification toolchains: the Vector + RocqStat combination will accelerate integrated test/timing platforms where coverage, unit tests, and WCET results live in a single report.
  • ML-assisted triage: anomaly detection models trained on historical WCET deltas to reduce human triage for noisy regressions.
  • Shift-left micro-architecture modeling: faster, conservative models that can run as pre-commit checks and flag risky code patterns before CI runs.
  • Standardized reporting formats: industry adoption of machine-readable timing result formats enabling a richer set of tooling around PR gating (expect federated formats in late 2026).

Checklist: implement timing checks in your CI today

  • Choose the analysis mode: static WCET for guarantees + measurements for trends.
  • Make builds reproducible; pin toolchain and flags.
  • Create a golden baseline artifact and store it securely.
  • Implement change-based WCET checks in PRs with JSON output and check-run annotations.
  • Create escalation workflows (full WCET + HIL) for hard violations.
  • Integrate ChatOps: send short summaries and artifact links to reviewers and safety owners.
  • Monitor and reduce flakiness: add statistical checks and deterministic build flags.

Common pitfalls and how to avoid them

  • Pitfall: blocking all merges on long-running analysis. Fix: tiered enforcement—fast checks block obvious failures, deep analysis runs asynchronously.
  • Pitfall: noisy false positives. Fix: enforce deterministic builds, set sensible thresholds, and maintain a traceable allowlist.
  • Pitfall: ignoring toolchain drift. Fix: record compiler and model versions in baseline metadata and fail CI on mismatches.

Actionable scripts and small helper patterns

Use a small helper script (ci/parse_wcet.py) to compare results and exit with appropriate status codes. Example (Python pseudocode):

#!/usr/bin/env python3
import json, sys

with open('wcet-result.json') as f:
    r = json.load(f)

# r example: {"functions": [{"name":"procA","wcet_us":120},{"name":"procB","wcet_us":240}], "baseline": {...}}
violations = []
for fn in r['functions']:
    base = r['baseline'].get(fn['name'], None)
    if base:
        delta = fn['wcet_us'] - base
        if delta > 50:  # threshold in microseconds
            violations.append((fn['name'], delta))

if violations:
    for v in violations:
        print(f"WCET regression: {v[0]} +{v[1]}us")
    sys.exit(2)
else:
    print('No regressions')
    sys.exit(0)

Wrap-up — enforce real-time safety where code changes happen

In 2026 the tooling landscape is converging: static timing analysis (RocqStat-style) is moving from specialist labs into the developer CI/CD loop. Embedding WCET checks in pull requests shifts timing verification left, produces auditable evidence for certification, and prevents costly field regressions. The pragmatic pattern is tiered enforcement: fast, incremental checks to keep feedback loops tight, and deeper analyses or HIL tests for escalations.

Takeaways & next steps

  • Start small: enable change-only WCET checks on a single real-time critical module.
  • Create and version a baseline artifact for your branch and automate comparison in CI.
  • Integrate annotations and ChatOps to make results actionable for reviewers.
  • Plan for escalation: reserve licensed runners for full WCET runs and HIL testing.

Call to action

Ready to prevent the next timing regression? Clone our sample repo (link in your internal docs) with prebuilt CI snippets and a demo wcet-cli wrapper you can adapt for VectorCAST/RocqStat. Or, if you run an enterprise toolchain, schedule a pilot to run integrated WCET checks on your most critical modules and see how much risk you can remove early in the cycle.

Advertisement

Related Topics

#embedded#CI/CD#timing-analysis
p

pasty

Contributor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.

Advertisement
2026-01-24T04:26:32.642Z