Javascript – Difference between ‘self’ and ‘total’ in Chrome CPU Profile of JS

google-chromejavascriptprofiling

What is the difference between the 'self' and 'total' columns in the Chrome CPU profiling of JS code?

enter image description here

Best Answer

self is how much time was spent doing work directly in that function.

total is how much time was spent in that function, and in the functions it called.