I am trying to understand how to interpret the results of the instrument profiler on a mac with xcode. Primarily I am trying to understand the difference b/w Weight and Self Weight.
This is my result without the modification
Result A:
Weight Self Weight Symbol
1.98 s 16.8% 45.00ms bool doSomething(xxx)
This is my result with modification (This is suppose to be faster)
Result B:
Weight Self Weight Symbol
1.38 s 19.0% 47.00ms bool doSomething(xxx)
My question is whats the difference b/w Weight and Self Weight ? This link here states
Weight The amount of time the symbol and its children spent running, and the percentage of time spent running in relation to other symbols running at the same time.
Self Weight The amount of time the symbol spent running.
What I would like to know is how long does it take for this method to execute from start to end ? In my example I have run this method 3 times before I stopped the profiler. Can someone please explain whats the difference b/w self weight and weight is ? Which one is faster from the above two results. Can someone explain why ?
Weight
. "Children" are the functions called by it. The time those functions run goes into the measurement. – Liable