benchmark-design
Skill0 starsChanged 6 months agoMITView on GitHub
Designs benchmarks that measure what matters and resist gaming, avoiding the traps that make microbenchmarks lie. Use when comparing implementations, evaluating a library or model, establishing a performance baseline, or when a benchmark result will drive a technical decision.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- JunMA98/Computer-science-claude-skillstheir own version, first seen Mar 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- JunMA98/Computer-science-claude-skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- adversarial-code-reviewSkill
- api-contract-designSkill
- attack-surface-mappingSkill
- authn-authz-design-reviewSkill
- capacity-scalability-planningSkill
- concurrency-race-analysisSkill
- data-consistency-modelingSkill
- data-exfiltration-analysisSkill
- distributed-consensus-designSkill
- error-handling-architectureSkill
- event-driven-architectureSkill
- experiment-designSkill
- hypothesis-falsificationSkill
- incident-rca-postmortemSkill
- legacy-refactoring-strategySkill
- literature-synthesisSkill
- metrics-designSkill
- multi-layer-caching-strategySkill
- mvp-scope-cuttingSkill
- performance-profilingSkill
- rate-limiting-designSkill
- requirements-disambiguationSkill
- secrets-management-auditSkill
- statistical-validity-analysisSkill
- supply-chain-risk-analysisSkill
- system-decomposition-synthesisSkill
- threat-modelingSkill
- tradeoff-decision-frameworkSkill
- user-failure-mode-mappingSkill
The file
Files
Benchmark Design
A benchmark is a model of reality, and all models are wrong; the question is whether yours is wrong in a way that flips your decision. Most benchmarks measure the benchmark, not the system.
Anchor to the real workload
- Representative input: real data distribution, size, and skew. Uniform random keys hide the hot-key and cache behavior that dominate production.
- Representative concurrency: single-threaded microbenchmarks miss contention, false sharing, and scheduler effects that invert rankings under load.
- The metric that decides: tail latency (p99/p999) for user-facing systems, throughput for batch, cost-per-unit for economics. A mean hides the tail that users actually feel.
Control the measurement environment
- Warmup: discard cold-start iterations (JIT compilation, cache population, connection setup) — or measure them separately if cold start is the real question.
- Isolation: pin CPUs, disable turbo/frequency scaling, quiet the machine. Noisy neighbors add variance that swamps the signal.
- Steady state vs transient: measure long enough to reach steady state; GC and background compaction create periodic stalls invisible in short runs.
- Statistics over a single number: report distribution (median + tail + variance), not one number. Run enough iterations to bound the confidence interval.
Adversarial validation
- Dead-code elimination: did the compiler optimize away the work you meant to measure because the result is unused? (The classic empty-loop benchmark.)
- Coordinated omission: a load generator that waits for each response before sending the next undercounts tail latency catastrophically during stalls — it stops sending exactly when the system is slow. Use open-loop, constant-rate load.
- Cache cheating: tiny working sets sit in L1/L2 and report fantasy throughput; production working sets miss to RAM/disk.
- Goodhart's law: once the benchmark is a target, implementations optimize for it specifically (special-casing the benchmark input). Vary inputs to detect overfitting.
- Apples-to-oranges: are both systems doing the same work (same durability, same consistency, same correctness)? A faster system that skips fsync isn't faster, it's different.
Non-obvious risks
- Benchmark results don't compose: A faster than B on op1 and op2 doesn't mean faster on a workload mixing them (contention, cache interference).
- The benchmark machine ≠ production (different CPU, NUMA, storage); ratios sometimes hold, absolutes rarely do.
- Reporting only the winning configuration is selection bias; report the conditions under which the ranking flips.
Output structure
Deliver: the decision the benchmark informs, the workload model (input distribution, concurrency, metric), the environment controls (warmup, isolation, open-loop load), the full result distribution with confidence intervals, the conditions under which the ranking reverses, and an explicit statement of what the benchmark does not capture.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

