Troubleshooting and Optimization

A Java service becomes CPU-bound only under production traffic, and static code inspection has not identified the cause. The developer needs automated recommendations based on which methods consume runtime CPU. Which approach BEST meets this need?

Show the answer

Correct answerA. Collect runtime profiles with Amazon CodeGuru Profiler.

AWhy this is right: CodeGuru Profiler analyzes runtime method activity and can recommend improvements for detected code inefficiencies.

BWhy not this: Request traces reveal service and segment latency rather than sampled CPU consumption by application method.

CWhy not this: Metric anomaly detection identifies unusual CPU levels, not the methods consuming CPU.

DWhy not this: Instance recommendations address resource sizing rather than identifying CPU-intensive application methods.

Amazon CodeGuru Profiler analyzes runtime profiles to identify expensive code paths and provide optimization recommendations. Compute Optimizer can recommend resource configurations, but it does not identify the methods responsible for CPU consumption.