What is the time that's shown in a column next to Javascript in the Chrome developer tools?

杀马特。学长 韩版系。学妹 提交于 2019-12-11 01:13:41

问题


It clearly has something to do with how long the function takes, what specifically does it represent? Ex. if the function was called multiple times during execution, what value is used?


回答1:


It is indeed supposed to be a breakdown of the total time spent on each line.

If a line is called multiple times, the value you see is the combined time spent in total for that line.

I agree that the line-by-line breakdown does yield some strange results sometimes. I'll look into that more.

Update: DevTools team says that the profiling comes from V8. So their response was just "this is how V8 attributes the time spent." I'll see if I can get a V8 guy or girl in here to discuss further.



来源:https://stackoverflow.com/questions/45470393/what-is-the-time-thats-shown-in-a-column-next-to-javascript-in-the-chrome-devel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!