TL;DR: Before writing a benchmark, build a small profiling harness that makes the code path visible. Run it in Release mode, keep unrelated work out, add clear profiler snapshot points, and collect both memory and CPU evidence. Production code is a terrible place to start a performance investigation. There is too much happening at once. Not because production code is bad. Because it is alive. It has real configuration, real input/output, logging, retries, dependency injection, serialization...





