Opinions about yourkit.NET profiler?

Does anyone use a .NET profiler made by your kick? I am looking for a good .NET profiler and stumbled upon yourkit. Since I will buy a license for one person, for me it will cost 79 euros, which is pretty good imho. I also like: more or less simple and convenient graphical interface.

But I'm not very proficient at profiling .NET applications, so I wonder if your profiler will execute mykit.NET. However, it seems that in the Java world, Yourkit is pretty well known.

Any opinions?

+4
source share
2 answers

Opinion? Yes. While you decide which profiler to buy or not, try it .

ADDED: @Max: Step-by-step instructions. The IDE has a pause button. Run the application in the IDE, and while it is subjectively slow, that is, while you are waiting for it, click the "pause" button. Then get a snapshot of the call stack.

To take a snapshot of the call stack, I show it (this is one of the debug windows). In the IDE parameters, you can find the parameters to display in the stack view. I will disable the option to display function arguments, because this makes the strings too long. I'm interested in the line number where the call is made, and the name of the function being called. Then, in the call stack view, you can do “Select All,” then “Copy,” and then paste it into Notepad. It's a little clumsy, I know, but I recorded them manually.

I take several samples this way. Then I look at them for lines that appear on more than one pattern, because it's time. Some of them are simply necessary, as "call the main thing", but some of them are not. These are gold nuggets. If I don’t find them, I continue to take samples until about 20. If I still don’t find (very unusual), the program will be quite optimized. (The key point is that every time you do this, the program becomes faster, and in the process, the remaining performance problems become relatively large and easier to find. That is, the program not only accelerates by a certain R ratio, but the rest more problems, in percent, for the same ratio.) *

Another thing I do in this process is to ask myself what the program does and why in this example. “Why” is very important because that is how you say whether the line is really necessary or if it can be replaced with something less expensive. If I'm not sure why he is there, I’ll take a little step-by-step, maybe look at the data or maybe return to several levels (shift-F11) until I understand what he is doing. It is all about him.

Existing profilers can help in this process if they actually sample the stack, save the samples, rank the rows according to what percentage of the samples they contain, and then let you study individual samples in detail. Maybe they will one day appear, but now they are gone. They hang on issues such as efficiency and measurement.

* Suppose your code spends 90% of its time executing X, and 9% of its time does Y, both are unnecessary. Take a small number of samples and you will see X, but probably not Y. If you fix X, you get 10x acceleration. Repeat the selection (you may need to wrap the outer loop around the program so you can take samples). Now you see Y with confidence, because now it takes 9% x 10x = 90%. Fixing gives you another 10x, for full 100x acceleration.

+1
source

Disclaimer: My suggestion is based on the assumption that you are serious about performance profiling and would like to know the exact improvement in your tuning efforts.

Based on my experience with performance profilers such as ANTS and DotTrace, I think they are useful until everyone works at some point.

The problem with general-purpose performance profilers is that they add too much overhead and make the result inaccurate. But, nevertheless, they cope well with the search for heavy operations. When you use the profiler and find an operation that takes up 40% of the total process time, does it really take 40%? Probably no. But probably it will take a long time.

So, to answer your question, it doesn’t matter if your kit is “excellent” or “satisfactory,” unless it sucks so much that you hear horrible stories about it. Because it will give you a big picture of the performance bottlenecks in your application. Providing you with ideas on where to insert your own time recording instructions to find out the actual performance profile of your application.

PS. I would also like to invite you to read about performance profiling , which will give you a general idea of ​​the concept and help you understand other people's suggestions.

0
source

All Articles