Google Cloud Professional Cloud Developer — Question 82
Your application performs well when tested locally, but it runs significantly slower after you deploy it to a Compute Engine instance. You need to diagnose the problem. What should you do?
What should you do?
Answer options
- A. File a ticket with Cloud Support indicating that the application performs faster locally.
- B. Use Cloud Debugger snapshots to look at a point-in-time execution of the application.
- C. Use Cloud Profiler to determine which functions within the application take the longest amount of time.
- D. Add logging commands to the application and use Cloud Logging to check where the latency problem occurs.
Correct answer: C
Explanation
The correct choice is C because Cloud Profiler provides insights into the resource consumption of your application, allowing you to identify performance bottlenecks. Option A does not contribute to diagnosing the issue, while B focuses on a specific execution point rather than overall performance. Option D, while useful, does not provide the same level of detailed analysis as Cloud Profiler.