test(benchmarks): add BenchmarkDotNet baseline for the .slnx parser#259
Merged
Conversation
Establishes a performance baseline for the .slnx parser inlined from Microsoft's vs-solutionpersistence (see #248). Now that we own this code, future optimisation work — e.g. replacing the inlined parser with a proper XmlSerializer implementation — has numbers to compare against rather than vibes. Project: tests/Benchmarks/Fallout.Persistence.Solution.Benchmarks/ - BenchmarkDotNet via Directory.Packages.props (0.14.0). - Single benchmark method ParseSlnx with [Params(1, 10, 100, 1000)] × [Params(false, true)] (folder layout) = 8 scenarios. - Fixtures generated programmatically in [GlobalSetup] — deterministic, no committed binary blobs. - [MemoryDiagnoser] enabled — allocations + GC pressure reported alongside wall-time (allocation pressure is often the bigger win in parser rewrites). - README documents how to invoke, what is and isn't measured, and why CI doesn't run benchmarks (noisy + slow). Establishes the precedent for tests/Benchmarks/Fallout.<X>.Benchmarks/ layout for future benchmark projects (tracked in #258). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…r the +Benchmarks project Adding tests/Benchmarks/Fallout.Persistence.Solution.Benchmarks to fallout.slnx changed the StronglyTypedSolutionGenerator output (which emits one Solution.<Name> property per project). Snapshot updated to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
eac2a8b to
550b3fd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First benchmark project in the repo — establishes a baseline for the `.slnx` parser inlined in #248. Once landed, optimisation experiments (e.g. "replace the inlined parser with a proper XmlSerializer impl") can compare against concrete numbers instead of guessing.
Summary
New project at `tests/Benchmarks/Fallout.Persistence.Solution.Benchmarks/`:
Why this shape
How to run locally
```sh
all scenarios:
dotnet run --project tests/Benchmarks/Fallout.Persistence.Solution.Benchmarks/ -c Release --filter '*'
one method, full sweep:
dotnet run --project tests/Benchmarks/Fallout.Persistence.Solution.Benchmarks/ -c Release --filter 'SlnxParseBenchmarks'
```
`Release` is required — BenchmarkDotNet refuses Debug builds anyway. Full sweep takes ~3-5 minutes.
What this is NOT
Test plan