mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-09 01:16:15 -08:00
Third step of the performance-journeys ratchet, stacked on #1693 (which is stacked on #1692; merge in order, GitHub retargets each to `master`). - New `Initial bytes ratchet` job in `.github/workflows/ci.yml` (ubuntu-latest): install, `pnpm nx build web --skip-nx-cache` (production configuration, the one users download), then `pnpm run perf:initial-bytes:check`. The job fails when `renderer.initialBytes` exceeds `tools/performance/journey-baselines.json`. - `dist/performance/` is uploaded as the `performance-journey-summary` artifact on every run, so a failing or tightenable run carries its evidence. - After review: the job first runs the new `tools/performance/check-baseline-direction.mjs`, which compares `journey-baselines.json` with the revision the change is measured against (the target branch of a pull request, `github.event.before` for a `master` push, `master` for a manual dispatch) and fails on any raised enforced limit (`value × toleranceRatio`), any widened or newly added tolerance, or any removed entry, so a PR cannot grow the payload and raise the baseline to match (lowered limits and new entries pass; a target branch without the file has nothing to weaken). Node tests cover it. - Docs: the performance-journeys contract and the validation map name the job, and the contract now states that this runner is the canonical measurer (take baseline values from its output, not from a local build). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
32 lines
1.1 KiB
JSON
32 lines
1.1 KiB
JSON
{
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"name": "performance-tools",
|
|
"projectType": "library",
|
|
"sourceRoot": "tools/performance",
|
|
"tags": ["scope:tools", "domain:performance", "type:tool"],
|
|
"targets": {
|
|
"test": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": [
|
|
"{projectRoot}/*.mjs",
|
|
"{projectRoot}/*.json",
|
|
{ "externalDependencies": ["parse5"] }
|
|
],
|
|
"options": {
|
|
"command": "node --test tools/performance/measure-initial-bytes.test.mjs tools/performance/check-journey-ratchet.test.mjs tools/performance/check-baseline-direction.test.mjs",
|
|
"cwd": "{workspaceRoot}"
|
|
}
|
|
},
|
|
"lint": {
|
|
"inputs": [
|
|
"default",
|
|
"{workspaceRoot}/eslint.config.mjs",
|
|
"{workspaceRoot}/tools/eslint-rules/**/*",
|
|
"{workspaceRoot}/tools/eslint/**/*"
|
|
],
|
|
"command": "eslint \"tools/performance/*.mjs\""
|
|
}
|
|
}
|
|
}
|