Google Professional Cloud Developer

Google Professional Cloud Developer

Get started today

Ultimate access to all questions.


How can you diagnose performance issues in your application that runs well locally but becomes significantly slower after deployment to a Compute Engine instance?




Explanation:

The correct approach is to use Cloud Profiler (Option C) because it is specifically designed to analyze the performance of applications by profiling CPU and memory usage. It identifies which functions or methods consume the most time or resources, providing actionable insights into performance bottlenecks. While adding logging (Option D) could help, it requires manual instrumentation and may not capture detailed execution metrics as efficiently as a profiler. Cloud Debugger snapshots (Option B) are better suited for debugging state issues rather than performance, and filing a support ticket (Option A) is premature without initial diagnostics.