Overview
.NET Benchmark exists to stop the habit of benchmarking every public member just because it exists. Instead of exhausting the API surface with microbenchmarks, the skill inspects source and usage evidence, ranks high-value performance questions, selects representative workloads, and rejects misleading comparisons.
The skill follows Codebelt engineering conventions with tuning/ benchmark projects and a tooling/ runner. It validates correctness at multiple layers - semantic preflight, build, discovery listing, and dry execution - and never interprets performance numbers until the complete BenchmarkDotNet summary passes every check. Full measurement runs always require explicit human authority.
Concepts
- Evidence-driven candidate selection: source implementation, call sites, tests, profiles, and existing benchmarks drive the choice of what to measure, not member visibility.
- Workload-correctness first: every benchmark case has an independently derived expected result validated through a semantic preflight covering the full method, job, and parameter matrix.
- Comparison coherence: baselines only appear when two methods perform equivalent observable work over identical input; single-operation characterization and unrelated members carry no misleading ratio.
- Layered validation: semantic preflight, build, discovery, and dry execution precede any full run, and the complete summary must be clean before performance interpretation begins.
Installation
npx skills add https://github.com/codebeltnet/agentic --skill dotnet-benchmark
Usage guidance
Invoke this skill whenever you need to answer a performance question about a .NET type or method. Provide a type name and the skill discovers high-value candidates, ranks them by evidence, and presents a compact experiment plan. It reuses existing tuning/ and tooling/ harness infrastructure when present.
The skill validates through build and dry execution by default. It starts a full performance run only after explicit human instruction. Use yolo mode for routine auto-acceptance of defaults while preserving all safety and quality gates.