A Go web app on GKE shows increased CPU and memory. How do you identify which function consumes the most CPU and memory?
Choose an answer
Tap an option to check your answer.
Correct answer: Import the Cloud Profiler library, initialize the profiler agent, and use the Cloud Profiler flame graph to identify time-intensive functions..
Why this is the answer
Cloud Profiler is designed to identify performance bottlenecks like high CPU and memory consumption in applications. By importing the Cloud Profiler library and initializing the agent, your Go application will send profiling data to Google Cloud. The Cloud Profiler UI then visualizes this data using flame graphs, which clearly show which functions consume the most CPU time or memory over time, allowing for targeted optimization. Logging statements provide general execution flow but not detailed resource consumption. Querying Cloud Logging for timestamps can indicate duration but doesn't directly show CPU or memory usage per function. OpenTelemetry Tracing focuses on latency and distributed tracing, not granular CPU or memory profiling.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed