Skip to content

.NET Perf Lab v0.1

Latest

Choose a tag to compare

@dexcompiler dexcompiler released this 06 Nov 10:20

.NET Perf Lab helps coding agents investigate .NET performance and decide whether a change meets its correctness and performance targets. It includes a BenchmarkDotNet scaffold and a repeatable GC experiment.

Quickstart

Use Python 3.8+ to summarize the saved results. To run the experiment on your machine, install .NET SDK 10.0.401 and allow about a minute plus build time.

git clone --branch v0.1 https://github.com/dexcompiler/dotnet-perf-lab.git
cd dotnet-perf-lab
python examples/gc-replay/replay.py --summarize examples/gc-replay/reference/decision.json
python examples/gc-replay/replay.py

Each replay saves twelve fresh process measurements under artifacts/gc-replay/. To use the skill in Codex, copy skills/high-performance-csharp-benchmarking into your target repository’s .agents/skills/ directory and start a new session. Installation and example prompt

GC experiment

Keep workstation GC for this single-worker JSON ingestion workload. Server GC reduced peak working set in both runs, but missed the predeclared throughput target and exceeded the batch p99 latency limit. The decision required more than 5% throughput improvement in all six pairs and at most 5% higher median paired batch p99.

Server GC relative to workstation GC Original Windows x64 run Clean-checkout rerun
Median paired throughput change −2.15% −0.63%
Median paired batch p99 change +7.11% +16.77%
Median paired peak working set change −26.57% −26.04%
Pairs clearing the throughput target 0/6 0/6
Completed batches / checksum failures 107,944 / 0 117,919 / 0

Each pair compared fresh processes with the same input and reversed the launch order in successive pairs. Latency measures batches of 256 documents. Workload and decision rule · Original launch records

Clean-checkout verification

Before tagging, we cloned the final commit from GitHub, validated the installed skill, reproduced the summary from the saved measurements, and ran the full twelve-process replay. The checkout stayed clean after verification.

We also exercised the scaffold in two temporary projects. Inside Git it added the benchmark project to the owning solution. Outside Git it left an unrelated parent solution untouched. The generated BenchmarkDotNet project built in Release with zero warnings or errors and discovered both example benchmarks. Verified commit