Summary
PerformanceTests measures wall-clock time on symbol-extraction hot paths but does not assert on memory pressure: heap allocations, Gen2 promotions, or LOH usage. A contributor can shift SymbolExtractor or ReferenceExtractor to a Gen2-heavy pattern (e.g., new intermediate string allocations per match) and slow indexing on real workloads without tripping any test. CI sees green; users see slower indexing and higher RAM.
Where
tests/CodeIndex.Tests/PerformanceTests.cs:57-94 (timing tests, no allocation assertions)
Suggested approach
(1) Add BenchmarkDotNet allocation-tracking benchmarks for the hot paths (symbol extract, reference extract, FTS5 query). (2) For CI, capture per-build allocation counts and fail if a PR regresses by >X% versus baseline. (3) Alternative: use System.GC.GetAllocatedBytesForCurrentThread() in xUnit asserts for a small set of scenarios — lower fidelity but no extra dependency.
Summary
PerformanceTestsmeasures wall-clock time on symbol-extraction hot paths but does not assert on memory pressure: heap allocations, Gen2 promotions, or LOH usage. A contributor can shiftSymbolExtractororReferenceExtractorto a Gen2-heavy pattern (e.g., new intermediate string allocations per match) and slow indexing on real workloads without tripping any test. CI sees green; users see slower indexing and higher RAM.Where
tests/CodeIndex.Tests/PerformanceTests.cs:57-94(timing tests, no allocation assertions)Suggested approach
(1) Add
BenchmarkDotNetallocation-tracking benchmarks for the hot paths (symbol extract, reference extract, FTS5 query). (2) For CI, capture per-build allocation counts and fail if a PR regresses by >X% versus baseline. (3) Alternative: useSystem.GC.GetAllocatedBytesForCurrentThread()in xUnit asserts for a small set of scenarios — lower fidelity but no extra dependency.