
Answer-first summary for fast verification
Answer: Use Cloud Profiler to determine which functions within the application take the longest amount of time.
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.
Author: LeetQuiz Editorial Team
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?
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.
No comments yet.