Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ jobs:
- name: Tests
run: npm run test

- name: Repro replay fixtures (headless, explicit gate)
if: runner.os == 'Linux'
run: node --test --test-concurrency=1 packages/core/dist/repro/__tests__/replay.harness.test.js

- name: Setup Rust (stable)
uses: dtolnay/rust-toolchain@stable

Expand Down Expand Up @@ -152,6 +156,57 @@ jobs:
- name: Terminal e2e (reduced)
run: bun run test:e2e:reduced

perf-regression:
name: perf regression gate
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout (with submodules)
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm

- name: Install
run: npm ci

- name: Build packages
run: npm run build

- name: Build benchmark package
run: npx tsc -p packages/bench/tsconfig.json

- name: Run reduced benchmark suite
run: npm run bench:ci -- --output-dir .artifacts/bench/ci

- name: Compare reduced benchmark results against baseline
run: |
npm run bench:ci:compare -- \
--baseline benchmarks/ci-baseline/results.json \
--current .artifacts/bench/ci/results.json \
--config benchmarks/ci-baseline/config.json \
--report-json .artifacts/bench/ci/compare.json \
--report-md .artifacts/bench/ci/compare.md

- name: Upload perf regression artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: perf-regression-artifacts
if-no-files-found: warn
path: |
.artifacts/bench/ci/results.json
.artifacts/bench/ci/results.md
.artifacts/bench/ci/compare.json
.artifacts/bench/ci/compare.md
.artifacts/bench/ci/manifest.json
.artifacts/bench/ci/profile.json

docs:
name: docs
runs-on: ubuntu-latest
Expand Down
110 changes: 110 additions & 0 deletions benchmarks/ci-baseline/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"meta": {
"profilePath": "packages/bench/profiles/ci.json",
"baselinePolicy": "Update only on intentional perf shifts or deliberate threshold tuning. Prefer refreshing from CI perf-regression artifacts to stay host-class consistent.",
"baselineGenerationCommand": "Use perf-regression GitHub Actions artifacts (results.json/results.md) and copy into benchmarks/ci-baseline/",
"baselineSource": "GitHub Actions run 22054843644 / perf regression gate artifact",
"comparisonCommandTemplate": "npm run bench:ci:compare -- --current <run>/results.json --report-json <run>/compare.json --report-md <run>/compare.md",
"createdAt": "2026-02-16T08:10:03Z"
},
"requiredScenarios": [
{
"scenario": "terminal-rerender",
"framework": "rezi-native",
"params": {}
},
{
"scenario": "terminal-frame-fill",
"framework": "rezi-native",
"params": {
"rows": 40,
"cols": 120,
"dirtyLines": 1
}
},
{
"scenario": "terminal-frame-fill",
"framework": "rezi-native",
"params": {
"rows": 40,
"cols": 120,
"dirtyLines": 40
}
},
{
"scenario": "terminal-virtual-list",
"framework": "rezi-native",
"params": {
"items": 100000,
"viewport": 40
}
},
{
"scenario": "terminal-table",
"framework": "rezi-native",
"params": {
"rows": 40,
"cols": 8
}
}
],
"metrics": {
"defaults": {
"timing.mean": {
"relativeRegression": 0.2,
"absoluteRegression": 0.03,
"severity": "hard",
"direction": "higher_is_worse"
},
"timing.p95": {
"relativeRegression": 0.35,
"absoluteRegression": 0.1,
"severity": "advisory",
"direction": "higher_is_worse"
}
},
"overrides": [
{
"match": {
"scenario": "terminal-frame-fill",
"framework": "rezi-native",
"params": {
"rows": 40,
"cols": 120,
"dirtyLines": 40
},
"metric": "timing.mean"
},
"rule": {
"relativeRegression": 0.22,
"absoluteRegression": 0.04
},
"reason": "Higher dirty-line density has slightly wider spread in CI."
},
{
"match": {
"scenario": "terminal-virtual-list",
"framework": "rezi-native",
"metric": "timing.mean"
},
"rule": {
"relativeRegression": 0.22,
"absoluteRegression": 0.06
},
"reason": "Large-list workload has greater host scheduler sensitivity."
},
{
"match": {
"scenario": "terminal-virtual-list",
"framework": "rezi-native",
"metric": "timing.p95"
},
"rule": {
"relativeRegression": 0.4,
"absoluteRegression": 0.12
},
"reason": "Tail latency is noisier for this scenario on shared CI hosts."
}
]
}
}
Loading
Loading