title: How to profile CPU used by method/function in Swift
body: <p>The app I'm developing does some intensive processing and I'd like to understand where the time is being used. The Time Profiler in Instruments shows the tree of calls but I can't see how to get the information I need.</p>
  
  <p>My app has a structure like this:</p>
  
  <pre><code>A
   B
    B1
     E1
    B2
    B3
     E1
   C
    C1
    C2
     E1
    C3
   D
    D1
    D2
     E1
  </code></pre>
  
  <p>Now, method E1 is called from a number of places and I'd like to see how much CPU it is using. However, from the profiler output I can only see the time taken in E1 down each branch of the tree. Is there any way of getting a report by method/function regardless of where it is called from? e.g. Sum the total time spent in E1?</p>
  
  <p>Thanks,</p>
  
  <p>Julian</p>