adding-benchmarks
БесплатноБез исполняемых скриптовНе проверенAdd new benchmarks to the CI pipeline. Guides through creating benchmark JSON files, integrating with bootstrap.sh, and ensuring they are uploaded to the CI…
от AztecProtocol★ 458 звёзд на GitHubОб этом скилле
Adding Benchmarks
When to Use
Use this skill when:
- Adding new performance benchmarks to a package
- Creating benchmark tests that should be tracked over time
- Integrating existing benchmarks into the CI pipeline
Benchmark System Overview
Benchmarks flow through the system as follows:
- Generation: Each package produces
bench-out/*.bench.jsonfiles - Aggregation:
bench_mergein rootbootstrap.shcombines all files, prefixing names with the package path - Upload: on uploadable runs, the bench box appends the merged JSON to its run's series in S3 with
ci3/bench_upload - Display: Results appear on the CI dashboard with historical tracking (the last 100 runs)
Live dashboard: https://ci.aztec-labs.com/bench/AztecProtocol/aztec-packages/next (PR runs: .../prs)
How Benchmark Names Work
Name Construction
The final benchmark name combines two parts:
- Package prefix (added automatically by
bench_merge): Based on where the file lives - Local name (what you write in JSON): Your metric identifier
Dashboard Grouping
The dashboard splits names by / to create a collapsible tree. The last segment becomes the chart name, everything before it becomes the group hierarchy.
| Full Name | Group Path | Chart Name |
|---|---|---|
yarn-project/stdlib/Tx/private/getTxHash/avg |
yarn-project/stdlib/Tx/private/getTxHash |
avg |
yarn-project/kv-store/Map/Individual insertion |
yarn-project/kv-store/Map |
Individual insertion |
barretenberg/sol/Add2HonkVerifier |
barretenberg/sol |
Add2HonkVerifier |
Naming Best Practices
Use / to create logical groupings:
[
{"name": "Tx/private/getTxHash/avg", "value": 1.2, "unit": "ms"},
{"name": "Tx/private/getTxHash/p50", "value": 1.1, "unit": "ms"},
{"name": "Tx/public/getTxHash/avg", "value": 2.3, "unit": "ms"}
]
Avoid flat names - they create no hierarchy and are hard to navigate:
[
{"name": "tx_private_gettxhash_avg", "value": 1.2, "unit": "ms"}
]
Common suffixes:
- Timing:
avg,p50,p95,p99,min,max,total - Size:
_opcodes,_gates,memory - Rate:
gasPerSecond,jobs_per_sec
Required JSON Format
All benchmark files must be arrays using the customSmallerIsBetter format:
[
{"name": "category/metric_name", "value": 12345, "unit": "gas"},
{"name": "category/another_metric", "value": 100.5, "unit": "ms"}
]
Rules:
- Must be a JSON array
[...], not an object - Each entry needs
name,value,unit valuemust be numeric (lower is better)- File must end with
.bench.json
Optional fields (preserved by benchmark-action):
range(string): Variance info (e.g.,"± 5%")extra(string): Metadata — used for stacked chart grouping (see below)
Stacked Charts
To render multiple metrics as a single stacked area chart (e.g., component breakdowns), add an extra field with a stacked:GROUP_NAME value. Entries sharing the same GROUP_NAME are overlaid on one chart.
[
{"name": "proving/cpus-8/total_ms", "value": 31663, "unit": "ms"},
{"name": "proving/cpus-8/oink_prove_ms", "value": 4992, "unit": "ms", "extra": "stacked:proving/cpus-8/components"},
{"name": "proving/cpus-8/sumcheck_ms", "value": 3318, "unit": "ms", "extra": "stacked:proving/cpus-8/components"},
{"name": "proving/cpus-8/circuit_ms", "value": 4642, "unit": "ms", "extra": "stacked:proving/cpus-8/components"}
]
How it works:
extra: "stacked:GROUP_NAME"→ entries with the same GROUP_NAME are rendered as one stacked chart- No
extrafield → individual line chart (default behavior) - Stacked entries still appear as individual charts on the main benchmark-action dashboard; the stacked view is rendered by a custom dashboard page
- The GROUP_NAME becomes the chart title (after
bench_mergeprefixing, same asname) - The
extrafield is one of the 5 fields preserved by the benchmark-action Zod schema (name,value,unit,range,extra); any other custom fields will be stripped
When to use stacked charts:
- Component-level timing breakdowns (e.g., sumcheck, PCS, circuit construction)
- Resource allocation views (e.g., memory by subsystem)
- Any case where you want to see how a total decomposes into parts over time
Adding a New Benchmark
Step 1: Create the Benchmark
TypeScript (most common):
// my_bench.test.ts
import { Timer } from '@aztec/foundation/timer';
import { writeFile, mkdir } from 'fs/promises';
describe('MyComponent benchmarks', () => {
const results: { name: string; value: number; unit: string }[] = [];
afterAll(async () => {
if (process.env.BENCH_OUTPUT) {
await mkdir(path.dirname(process.env.BENCH_OUTPUT), { recursive: true });
await writeFile(process.env.BENCH_OUTPUT, JSON.stringify(results));
}
});
it('benchmark operation', async () => {
const timer = new Timer()
Установить adding-benchmarks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл adding-benchmarks?
Add new benchmarks to the CI pipeline. Guides through creating benchmark JSON files, integrating with bootstrap.sh, and ensuring they are uploaded to the CI dashboard.
Как установить скилл adding-benchmarks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл adding-benchmarks запускает скрипты?
Нет, скилл состоит только из инструкций (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