Skip to content

Profiling V8

Nako Sung edited this page Feb 20, 2016 · 7 revisions
const sessionName = 'SessionName'
JavascriptProfile.Start(sessionName)
let profile = JavascriptProfile.Stop(sessionName)

profile.GetTopRootNode().GetFunctionName()

function traverse(node,visit) {
  visit(node)
  _.range(node.GetChildCount()).forEach(index =>
    traverse(node.GetChild(index))
  )
)

traverse(profile.GetTopRootNode(), node => console.log(node.GetFunctionName()))

Clone this wiki locally