Skip to content

Add historical benchmark storage with orphan branch and relative regression detection #1866

@Mossaka

Description

@Mossaka

Problem

Each benchmark run is isolated — no trending, no relative regression detection. A 50% slowdown that stays under the critical threshold goes unnoticed. Two prior PRs (#1720, #1767) attempted this but were closed without merging. The branch feat/240-benchmark-history-tracking has solid prior art to build on.

Approach

  1. Orphan benchmark-data branch stores benchmarks/history.json (last 50 entries)
  2. Workflow steps: fetch history → run benchmarks → append + trim → commit to orphan branch
  3. Relative regression detection: flag when current p95 exceeds rolling mean of last 10 runs by >25%
  4. Permissions: contents: readcontents: write (push to benchmark-data branch only)

New Files

  • scripts/ci/benchmark-trend.ts — trend report generator (adapt from feature branch)
  • scripts/ci/benchmark-utils.ts — shared stats/parsing utilities
  • scripts/ci/benchmark-utils.test.ts — unit tests

Modified Files

  • scripts/ci/benchmark-performance.ts — load previous run, add delta regression check
  • .github/workflows/performance-monitor.yml — add history fetch/commit/trend steps
  • package.json — add benchmark:trend script

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions