ruhleder ruhleder - 17 days ago 6
Javascript Question

Calculate total time based on a .cpuprofile file

I created a JavaScript CPU profile with Chrome and saved it as a

.cpuprofile
file. Using only this file, I want to calculate the "Total Time" for each node in this profile (as can be seen in the Chrome Profiler when you load the file.)

I found out how to calculate the "Self Time" here. Does anyone know how to extend it to the "Total Time"?

Answer

I have found a solution to this problem:

I was looking for the Bottom Up Profile times. For anyone interested, I have created a npm package called cpuprofile that calculates all necessary times.