Part of #455.
The benchmark project currently covers only SuppressMessageDiagnosticsAnalyzer (FunFair.CodeAnalysis.Benchmark.Tests/Bench/SuppressMessageAnalyzerBenchmark.cs, with allocation-ceiling assertions in SuppressMessageAnalyzerBenchmarkTests.cs). Before optimizing anything, add benchmarks in the same pattern for the analyzers targeted by later phases, so each phase has a measurable before/after.
Verification: new benchmark classes run cleanly via the existing dotnet test-driven benchmark harness (see SuppressMessageAnalyzerBenchmarkTests.cs for the pattern of running the benchmark and asserting allocation ceilings).
Part of #455.
The benchmark project currently covers only
SuppressMessageDiagnosticsAnalyzer(FunFair.CodeAnalysis.Benchmark.Tests/Bench/SuppressMessageAnalyzerBenchmark.cs, with allocation-ceiling assertions inSuppressMessageAnalyzerBenchmarkTests.cs). Before optimizing anything, add benchmarks in the same pattern for the analyzers targeted by later phases, so each phase has a measurable before/after.ProhibitedMethodsDiagnosticsAnalyzer(fires on everySimpleMemberAccessExpression— the hottest path in the package)ProhibitedMethodInvocations,ForceMethodParametersInvocations,ProhibitedMethodWithStrictParametersInvocation)TestClass*trio /TestDetection.IsDerivedFromTestBasepathsVerification: new benchmark classes run cleanly via the existing
dotnet test-driven benchmark harness (seeSuppressMessageAnalyzerBenchmarkTests.csfor the pattern of running the benchmark and asserting allocation ceilings).