perf-budget-gate
БесплатноБез исполняемых скриптовНе проверенUse when a deploy should be blocked by performance regressions from several tools. Combines k6, JMeter, Gatling or Locust results with Lighthouse CI Web…
от testland★ 18 звёзд на GitHubОб этом скилле
perf-budget-gate
Overview
Modern teams measure perf at multiple layers:
| Layer | Runner |
|---|---|
| Backend load | k6-load-testing, jmeter-load-testing, and the Gatling / Locust references in load-testing-overview |
| Frontend | lighthouse-perf - Web Vitals via Lighthouse CI |
Each runner has its own pass/fail criterion. This gate unifies them into a
single go / no-go verdict with per-metric deltas vs. main, and emits a markdown
summary suitable for $GITHUB_STEP_SUMMARY or a PR comment.
This is the perf counterpart to data-quality-gate, visual-baseline-gate,
and contract-compatibility-gate - same artifact shape, different domain.
When to use
- The team uses two or more perf runners and wants one CI gate.
- Per-PR perf delta vs. main is the team's regression-detection signal.
- Some metrics should be advisory rather than blocking - e.g. block on p95 latency regression but warn on Lighthouse score drift.
- Per-metric ratchet behavior is needed (existing budget breaches grandfathered, new breaches block).
If the project has only one runner, defer this gate - use the runner's native CI integration directly.
How to use
- Collect each runner's output artifact (k6
summary.json, Lighthouselhr-*.json, and the rest) - the per-runner source map is in references/ci-wiring-and-metric-sources.md. - Flatten every runner's output into the unified metric record (below), one record per measured subject + metric.
- Fetch the last green main-branch baseline and compute each record's delta.
- Apply the gate decision rule to produce a single go / no-go verdict.
- Emit the markdown + JSON artifact; a no-go exits non-zero and halts CI. Full CI wiring and per-metric budgets are in references/ci-wiring-and-metric-sources.md.
The unified metric record
Flatten every runner's output into one shape:
{
"runner": "k6",
"subject": "GET /api/orders",
"metric": "p95_latency_ms",
"value": 320,
"baseline": 280,
"delta": "+14.3%",
"budget": 500,
"status": "pass",
"severity": "blocker"
}
| Field | Source |
|---|---|
runner |
k6 / jmeter / gatling / locust / lighthouse. |
subject |
URL path / sampler name / story ID - what was measured. |
metric |
p95_latency_ms / error_rate / lcp_ms / inp_ms / cls. |
value |
Current run's value. |
baseline |
Last green main-branch run's value (from artifact storage / Grafana / Lighthouse CI server). |
delta |
Percent change vs. baseline. |
budget |
Configured threshold from the runner. |
status |
pass / fail based on value vs budget. |
severity |
blocker / warn. |
The gate decision rule
def gate_decision(records, *,
block_on_regression_pct=10, # block if any blocker regresses >10%
warn_on_regression_pct=3): # warn if anything regresses >3%
blockers = []
warnings = []
for r in records:
if r["status"] == "fail" and r["severity"] == "blocker":
blockers.append((r, "budget breach"))
elif r["delta_pct"] > block_on_regression_pct and r["severity"] == "blocker":
blockers.append((r, f"regression > {block_on_regression_pct}%"))
elif r["delta_pct"] > warn_on_regression_pct:
warnings.append((r, f"regression > {warn_on_regression_pct}%"))
return {
"verdict": "no-go" if blockers else "go",
"blocker_count": len(blockers),
"warning_count": len(warnings),
"blockers": blockers,
"warnings": warnings,
}
Two regression triggers:
- Budget breach -
value > budget(absolute threshold). - Regression -
delta_pct > N%vs. baseline (relative).
Both matter: a metric within budget but trending up still warrants a warning.
Emit the artifact
Markdown summary:
# Perf Budget Gate - verdict: NO-GO
**Blockers: 2**
| Runner | Subject | Metric | Current | Baseline | Δ | Budget | Status |
|------------|----------------------|-------------------|--------:|---------:|-------:|-------:|--------|
| k6 | POST /api/orders | p95 latency | 620ms | 280ms | +121% | 500ms | FAIL |
| lighthouse | /dashboard | LCP | 3200ms | 2100ms | +52% | 2500ms | FAIL |
**Warnings: 3**
| Runner | Subject | Metric | Current | Baseline | Δ |
|------------|----------------------|-------------------|--------:|---------:|------:|
| k6 | GET /api/orders | p95 latency | 240ms | 220ms | +9% |
| lighthouse | / | IN
Установить perf-budget-gate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл perf-budget-gate?
Use when a deploy should be blocked by performance regressions from several tools. Combines k6, JMeter, Gatling or Locust results with Lighthouse CI Web Vitals, applies severity-aware thresholds against the main-branch baseline and returns one go/no-go with per-metric deltas.
Как установить скилл perf-budget-gate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл perf-budget-gate запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub