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?
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.
C. Use Cloud Profiler to determine which functions within the application take the longest amount of time.
Cloud Profiler is a tool provided by Google Cloud that helps you analyze and understand the performance characteristics of your application. It allows you to see where the application spends its time, how much CPU and memory it uses, and which functions or methods are the most time-consuming. This is particularly useful when you need to diagnose performance bottlenecks that are not apparent during local development but become evident in a production environment, such as a Compute Engine instance.
A is incorrect because the argument “it worked on my machine” but doesn’t work on Google Cloud is never valid.
B is incorrect because Debugger snapshots only lets us review the application at a single point in time.
C is correct because it provides latency per function and historical latency information.
D is incorrect because while it works it requires a lot of work and is not the clear, optimal choice.
Option C is the correct answer. Cloud Profiler is a performance analysis tool that allows you to identify performance issues in your application. It provides detailed information about the time spent executing different functions in your application, which can help you identify the cause of the performance issue. Option A is not a good solution because filing a ticket with Cloud Support will not help you diagnose the problem. Option B is not a good solution because Cloud Debugger snapshots provide information about the state of variables at a specific point in time, but they do not provide information about the time spent executing different functions. Option D is not a good solution because adding logging commands to the application and using Cloud Logging can help you identify where the latency problem occurs, but it will not provide information about the time spent executing different functions.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
santoshchauhan
7 months, 3 weeks ago__rajan__
1 year, 1 month agotelp
1 year, 9 months agoomermahgoub
1 year, 9 months agosubesingh
2 years, 1 month agotomato123
2 years, 2 months agomaxdanny
2 years, 3 months agoParagSanyashiv
2 years, 9 months agomister
2 years, 9 months ago