An AI assistant proposes caching and parallelization to reduce an application's p95 latency; responses must remain current, and dependency calls must stay within quota. Which evaluation BEST determines whether to adopt the refactoring?
Show the answer
Correct answerA. Benchmark representative concurrency and data changes, checking p95, freshness, and dependency call rates.
AWhy this is right: Representative workloads test the desired latency improvement alongside freshness and dependency quota constraints.
BWhy not this: Mocks and static analysis alone cannot establish actual dependency behavior under representative load.
CWhy not this: Existing tests and single-request timing may miss stale cache entries and concurrency-driven quota violations.
DWhy not this: Average latency on repeated inputs can hide tail latency, stale responses, and concurrency-related quota pressure.
AI-generated optimizations need representative measurements of the target metric and checks of all behavioral constraints. Mocked dependencies can hide the real call rates, latency, and freshness problems introduced by caching and parallelization.