Method times reflect all calls in hierarchy - child only?

I can drill down to methods but they are displaying times for ALL calls not just for the calls within a branch of the tree.

Can the method times in the hierarchy display the time for calls for children only, i.e. top level then method times include all calls, if drilled down then only calls for children below are displayed.



  • Brian DonahueBrian Donahue Posts: 6,590 New member

    I'm not sure I understand the question, but I think you can accomplish getting the amount of time that a function spends in child methods by subtracting the 'time' from the 'time with children'.

    Is that what you're after?
  • If I have a method that is called from multiple branches in the hierarchy, the time shown whereever I see that method in the hierarchy is for ALL the calls made to that method, not just for the branch that I am viewing.

    For example:

    DBInterface.GetDataSet() - is called from CPerson.ReadData() and CAddress.ReadData() yet when I drill down to CPerson.ReadData() it shows the combined time for DBInterface.GetDataSet() from both CPerson.ReadData() and CAddress.ReadData().

    I do not know if it is CPerson or CAddress that is causing the problem because they both report the same time.

    Note: this is not a real example, the method I want to look at is used very many times from many classes.

  • Brian DonahueBrian Donahue Posts: 6,590 New member

    I see. ANTS Profiler only shows you the total time that a method spent running; it doesn't take into consideration that chain of methods before it.

    You can only get the total time accumulated by the method, the total time with children, and optionally the average time for the method.
Sign In or Register to comment.