Diagnose high latency with CPU Insights

CPU insights is a sub-feature of the CPU Usage tool that shows common potential latency issues like concatenating strings inefficiently.

View Auto Insights

The Top Insights section in the CPU Usage tool shows quick CPU details, insights, and suggestions in the description so that you can continue diagnosing the issue. The Learn more link shows you in-depth documentation that explains your issue. If you need more information, View source code shows more details. Once selected, you can see the call tree view, showing the process, functions, and which callers use the most CPU.

Screenshot showing Autio Insights selected.

View top functions

On the summary page under Top Functions, you can find the top functions called with the time spent in descending order. Total CPU time is the amount of time spent inside a function, including any functions it calls, whereas Self CPU is time spent exclusively in the function.

Screenshot showing Top Functions selected.

View the hot path

Hot Path shows where most of the CPU time was being spent in your application and helps focus investigation on the area that would have the most impact. Analyzing this code path by using other tools in the Performance Profiler can help identify ways to improve the code as well. For example, it may help identify how to minimize allocations on the hot path to reduce GC frequency and time spent in GC.

Screenshot showing Hot Path selected.

Get AI assistance

If you have Copilot, you can get AI assistance while you're looking at CPU Auto Insights. Copilot provides information and insights related to a set of specific performance insights. With Copilot, you can also ask questions about functions on the identified hot paths in your code, which can help you produce more efficient or cost-effective code.

The Ask Copilot button Screenshot of Ask Copilot button. appears even if no specific performance insights are identified. Select Ask Copilot to learn from Copilot and start asking questions.

Animation of using Copilot with CPU Usage.