paulirish / devtools-timeline-model

Unsupported

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Have CPU usage per domain name

jpvincent opened this issue · comments

Currently we can have the CPU usage per filename (new TraceToTimelineModel(events).bottomUpGroupBy('URL').children.values()) and the documentation suggested that we can have it per domain

// bottom up tree, grouped by URL
model.bottomUpGroupBy('URL') // accepts: None Category Subdomain Domain URL EventName

But Domain and Subdomain were raising exceptions

            var parsedURL = url.asParsedURL();
                                ^
TypeError: url.asParsedURL is not a function
    at groupByDomain (chrome-devtools-frontend/front_end/timeline/TimelineProfileTree.js:324:33)
    at Object.WebInspector.TimelineAggregator._nodeToGroupIdFunction._nodeToGroupNode (chrome-devtools-frontend/front_end/timeline/TimelineProfileTree.js:372:18)
    at processNode (chrome-devtools-frontend/front_end/timeline/TimelineProfileTree.js:127:44)
    at Map.forEach (native)
    at Object.WebInspector.TimelineProfileTree.buildBottomUp (chrome-devtools-frontend/front_end/timeline/TimelineProfileTree.js:119:30)

I made a script to display just that, on my own, in the meantime : https://github.com/jpvincent/3rd-party-cpu-abuser, but it would be interesting to have that directly in your project

Thanks for reporting this! I didn't know about the exceptions

I fixed the problem here, so your module should get simplied a bit. :)

cheers

1.1.6 has the fix