Options

How do I profile a specific method?

rgelbrgelb Posts: 45 Bronze 4
It does not even show up in the tree/list, but it is really important to me. Using 5.2.x

Comments

  • Options
    Hi,

    The first thing to make sure of is that you have the right profiling mode selected.

    Secondly, if ANTS can't find the pdb files then the method(s) will be counted as methods without source code and therefore not show up with the default filter of 'only showing methods with source'. Make sure that all the files are in the correct place.

    There is a checkbox with 'Hide Insignificant methods' which you can uncheck to show any methods that took less than 1% of time with children.

    Finally, there are options in Tools > Options that allow you to adjust for inlining of functions, simplifying stack traces and ignoring trivial functions. You can adjust these but they may have a significant impact on the overhead of the profiler.

    Stephen
  • Options
    rgelbrgelb Posts: 45 Bronze 4
    Stephen,

    Basically, I am profiling a WinForms app. The solution has a 5 projects in it (one EXE, the rest class libraries). I start the profiler from the ANTS 5 Toolbar in VS2008.

    The method I am trying to profile is an CellChanged event on a 3rd party control. The event is in my code, I can step through it and I can plainly see that it's where the most damage is being done.

    However, in the ANTS 5 profiler, I don't see this event method at all. The only thing I do see is a method that is kicked off by the function (on a separate thread though).

    I did try playing around with the options you mentioned, all to no avail.
  • Options
    Hi Frank,

    which version of the Profiler do you have?

    Is it the Standard edition or the Pro edition?

    Stephen
  • Options
    rgelbrgelb Posts: 45 Bronze 4
    Professional. Version 5.2.0.26
  • Options
    Switching to CPU time instead of Wall Clock time resolved this issue.

    This is a reasonably common issue with people switching to one timing and not switching back to the other when it's more suitable for examining the results.

    Timing: controls the way in which method timings are calculated. You can choose from Wall-clock time which includes blocking such as waiting for I/O, or CPU time which excludes any time blocking.

    You can read more about the results the profiler shows you depending on what you select here:

    http://www.red-gate.com/supportcenter/Content.aspx?p=ANTS%20Performance%20Profiler&c=ANTS_Performance_Profiler/help/5.2/app_Working_with_the_call_tree.htm&toc=ANTS_Performance_Profiler/help/5.2/toc925914.htm

    Regards,

    Stephen
Sign In or Register to comment.