PerfTips are definitely one of my favorite features of Visual Studio 2015. Explaining what they do doesn't do them justice. You have to see them in action.
Do not confuse PerfTips with CodeLens. PerfTips is a separate option from CodeLens in Visual Studio.
Recipes.cs
file, add the following code:public static void RunFastTask() { RunLongerTask(); } private static void RunLongerTask() { Thread.Sleep(3000); BottleNeck(); } private static void BottleNeck() { Thread.Sleep(8000); }
RunFastTask()
and place a breakpoint on this line of code:RunFastTask(); Thread.Sleep(1000);
RunFastTask()
method. Hit F10 to step over this method:Thread.Sleep
, shows that the RunFastTask()
method took 11 seconds to complete. The task is clearly not very fast:RunFastTask()
method, you can place further breakpoints and step over them one by one to find the method that is causing the longest delay. As you can see, PerfTips allow developers to quickly and easily identify bottlenecks in code:There are many tools on the market that do this and much more, allowing developers to view all sorts of code metrics. PerfTips, however, allow you to see issues on the fly while you are stepping through your code as per your normal debugging tasks. It is, in my opinion, an indispensable debugging tool.
3.14.246.148