benchmark-controls
БесплатноБез исполняемых скриптовНе проверенBenchmark control hazards: mutated controls, disagreeing harnesses, VM lock scaling, hyperfine 2.0 exports. Use when benchmarking, comparing timings, A/B…
от laurigates★ 61 звезда на GitHubОб этом скилле
Benchmark Controls
A benchmark comparison discriminates only while its control stays the condition it was chosen to represent. Four routes take that away without any error: the fixture step edits the control, the timing harness is itself a variable, the machine magnifies the effect being measured, or the parser reads the wrong column.
When to Use This Skill
| Use this skill when... | Use something else when... |
|---|---|
Timing a code change against a baseline (A/B, before/after, branch vs main) |
Baselining a Mac's hardware health → macos-plugin:macos-performance-benchmark |
| Building benchmark fixtures from an existing data set | Load-testing an HTTP service → networking-plugin:http-load-testing |
Two timing tools (hyperfine, a shell loop, /usr/bin/time) report different numbers for one command |
The comparison is a correctness harness pinned to a moving baseline → the sibling rule cited under Related |
Deriving Test Data Can Mutate the Control
A step that builds a fixture from the control data set can change the
control's own state: reflinks, hard links, chmod, atime, warmed caches. The
control then measures the condition it was meant to exclude, and nothing in the
result says so.
- Time the control before deriving anything from it, or derive from a copy.
- Record in the results how each data set was produced, including every step that read or copied it.
Observed 2026-10 (dust
--shared-blocks, XFS). The "shared" set was built withcp -a --reflink=always ~/.rustup/toolchainsbefore timing, which turned the "unshared" control~/.rustup(198,319 files) into reflinked inodes. It was reported as "nothing shared":--shared-blocks769.4 ms vs master 96.6 ms (8.0x). A never-reflinked tree,/usr/share(128,365 files), measured 126.3 vs 66.0 ms (1.9x), and the PR's numbers were corrected. Unverified: whether XFS keeps an inode's reflink flag after the copies are deleted.
Two Timing Harnesses That Disagree Are Both Suspect
Before trusting either number:
- Alternate the two harnesses back to back on the same command, then repeat on a non-blocking control.
- Use the same harness and flags on every machine being compared.
- Name the harness next to every number it produced.
Observed 2026-10 (dust, Linux desktop, kernel 6.17, cpufreq governor
powersave).hyperfine -Nmeasured the lock-bound case at ~740 ms; a plain bash loop timing the same command measured ~520 ms, consistently when the two alternated. Single/usr/bin/timeruns agreed with the loop (0.49–0.60 s). On the non-blocking baseline the methods were within ~6%, and on macOS within ~2% for every case. Cause not established; scheduling sensitivity of a lock convoy is an unproven hypothesis.
A Desktop-Hypervisor VM Can Turn a Lock Ceiling Into a Slowdown
Lock contention and thread-scaling results from a desktop-hypervisor VM (OrbStack on the Apple Virtualization framework) are provisional. There a contended spinlock can make throughput fall as threads are added, where bare metal shows only a plateau, so the gain from removing the lock is overstated.
- Confirm a lock or scaling result on bare metal, or on a cloud KVM guest, before reporting its size.
- Report the gain per machine, naming the hypervisor; never quote the VM figure alone.
Observed 2026-11 (dust,
open+closeacross threads). On an OrbStack VM with 13 vCPUs, throughput fell past 4 threads. The process-wide fd-table spinlock (files->file_lock) took the paravirtual qspinlock slow path on 99.9% of acquisitions at 13 threads, with 4–8 µs handoff peaks. On bare metal (Ryzen 9 3900X, 24 threads) and on a GCPn2-standard-8KVM guest, which also enables PV spinlocks, the same lock only capped throughput. Removing it measured 2.1–2.5× on OrbStack, 10–11% on bare metal and about 3.5% on GCP. The lock cost 45 of 75 ms on OrbStack, 10 of 73 ms on bare metal and 4 of 99 ms on GCP. PV spinlocks alone do not explain the difference, since the GCP guest has them too.
hyperfine 2.0 Renamed Its Export Fields
A parser written against hyperfine 1.x reads 2.x output without an error and gets wrong numbers. Both export formats changed in 2.0.0:
| Export | 1.x | 2.0 |
|---|---|---|
--export-csv header |
command,mean,stddev,median,user,system,min,max |
command,time_wall_clock_unit,time_wall_clock_mean,…_stddev,…_median,…_min,…_max, then the same six columns for each further metric (memory_peak_resident_* by default) |
| User/system time in CSV | user, system columns |
Absent unless selected: --metrics time adds time_cpu_*, time_user_*, time_system_* |
--export-json mean |
results[i].mean |
results[i].summary.time_wall_clock.mean (schema_version: 2) |
| Per-run times in JSON | results[i].times |
results[i].measurements[j].time_wall_clock.value |
- Read CSV by header name, never by column position: in 2.0 column 2 is the
unit (
s), so a positional p
Установить benchmark-controls в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobBash(hyperfine *)FAQ
Что делает скилл benchmark-controls?
Benchmark control hazards: mutated controls, disagreeing harnesses, VM lock scaling, hyperfine 2.0 exports. Use when benchmarking, comparing timings, A/B runs, hyperfine.
Как установить скилл benchmark-controls?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл benchmark-controls запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic