Performance profiling

Code and memory profiling for .NET developers.

Moderators: Brian Donahue, richardjm, StephenC

Performance profiling

Postby wsadiq » Tue Jun 16, 2009 11:28 pm

I had been using ANTS profiler version 2.7.1.20 and have just upgraded to 4.3.0.198. Running the two versions on the same .NET executables, I am gettign results that are quite different from each other. First, the number of methods profiled in the older version is much higher - 77 versus 17 in the newer version. I did not find a screen in the new version that asked me whther I wanted to profile all methods or only the ones that I had the source for.

The thing that I am most concerned about - I am sure it is not knowing how to use it correctly - is why were so few methods profiled (77 vs 17) in the new version. Some of the suspect methods, that I have the source for and were in the VS 2005 project beign profiled - did not even show up in the method grid.

Can someone please tell me what I may be doing wrong.

Thanks.
wsadiq
 
Posts: 4
Joined: Tue Jun 16, 2009 11:20 pm

Postby StephenC » Wed Jun 17, 2009 12:13 am

Hi,

There would be no reason why the new version wouldn't be profiling the same number if not more methods than V2.

To take the point about choosing what to profile it's just the 2nd option in the opening dialog.

By default we profile everything (methods with and without source but initially we hide the results for methods without source code as the default preference). The scope of what results are displayed in the UI can be easily changed from the combo box option on the bar above the code view.

Are you sure the PDB files for source files are placed in the same directory as the .exe for the methods you can't see? If we can't find the source then those methods will automatically be hidden because of the initial settings to only show results for the methods with source (i.e. hide methods without source - see combo box options on main UI). Switching to seeing all methods will help answer this question.

Hope that helps,

Stephen
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby wsadiq » Wed Jun 17, 2009 1:36 pm

I did not go through all the methods but one of the methods that is missing is also one of the slowest methods indicated by the older version. That method spends a lot of time waiting for a response to come back from a remote server so it makes sense.

That method is in the same source files as some of the other methods that are shown. The pdb files are in the same directory as the exe. I tried profiling through visual studio and by launching it manually and locating the directory myself with the same result.

I am sure there is a simple explanation but I cannot figure it out.

Thanks.
wsadiq
 
Posts: 4
Joined: Tue Jun 16, 2009 11:20 pm

Postby wsadiq » Wed Jun 17, 2009 1:43 pm

Also version 2.x summarized the results on the sumamry page and grouped the summary in general section, slowest lines of code section and slowest methods section. Is there any way to get that kind of at a glance summary?

Thanks.
wsadiq
 
Posts: 4
Joined: Tue Jun 16, 2009 11:20 pm

Postby StephenC » Wed Jun 17, 2009 1:50 pm

Hi,

there are a few possible reasons from what I can gather:

1. We show CPU time by default in ANTS 4 (time only spent executing). ANTS 2 only recorded Wall Clock time so methods which appeared 'slow' due to time spent waiting would be shown. You can easily switch to Wall Clock time in V4 as we record both and you can switch between the two. You might find this article of interest:
http://www.simple-talk.com/dotnet/.net- ... -to-block/

2. We hide insignificant methods by default. If the waiting time isn't included then a 'slow' method might not actually appear much at all. You can uncheck this option from the UI as well.

3. If you are selecting regions on the timeline, if you don't have the right region selected (we can't be 100% accurate here due to Windows not returning perf counters in a timely fashion) so i would try not having anything selected initially to rule out every other possibility.

We removed the Summary. Sorting by the time columns in the All Methods grid will provide you with the worst performing methods with relative ease. We don't have a line level equivalent I'm afraid.

Hope that helps,

Stephen
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby wsadiq » Wed Jun 17, 2009 2:07 pm

So the mistery is solved. I did not see the "Hide insignificant methods" check box. Once I unchecked it, all 77 methods showed up. The difference on the slowest methods between the two version is because of the CPU time vs Wall-clock time.

Thanks for your help.
wsadiq
 
Posts: 4
Joined: Tue Jun 16, 2009 11:20 pm

Postby StephenC » Wed Jun 17, 2009 2:37 pm

Glad you got the answer you were looking for.

Hope you like what we have done with the rest of the tool.

Stephen
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge


Return to ANTS Profiler Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests