WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
100951
Web Inspector: Timeline: show popup for CPU bars.
https://bugs.webkit.org/show_bug.cgi?id=100951
Summary
Web Inspector: Timeline: show popup for CPU bars.
eustas.bug
Reported
2012-11-01 06:37:13 PDT
Created
attachment 171830
[details]
Screenshot Each CPU bar can represent a combination of several shorter messages. We should show information about combined messages - start time, total duration, CPU time, message count.
Attachments
Screenshot
(58.79 KB, image/png)
2012-11-01 06:37 PDT
,
eustas.bug
no flags
Details
Patch
(6.94 KB, patch)
2012-11-01 06:41 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(6.68 KB, patch)
2012-11-01 08:50 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(6.20 KB, patch)
2012-11-02 02:38 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
eustas.bug
Comment 1
2012-11-01 06:41:13 PDT
Created
attachment 171833
[details]
Patch
Andrey Kosyakov
Comment 2
2012-11-01 06:55:24 PDT
Comment on
attachment 171833
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=171833&action=review
> Source/WebCore/inspector/front-end/TimelinePanel.js:907 > + lastElement.generatePopupContent = WebInspector.TimelinePresentationModel.generateMainThreadBarPopupContent.bind(null, barStartTime - timeOffset, barEndTime - barStartTime, cpuTime, messageCount);
I don't quite like the way we associate state with element by re-binding function arguments. Also, we normally use underscore to prefix our fields when associating them with DOM elements. How about lastElement._firstTask and lastElement._lastTask (and compute the rest lazily).
> Source/WebCore/inspector/front-end/TimelinePanel.js:928 > + lastElement.generatePopupContent = WebInspector.TimelinePresentationModel.generateMainThreadBarPopupContent.bind(null, barStartTime - timeOffset, barEndTime - barStartTime, cpuTime, messageCount);
indent
> Source/WebCore/inspector/front-end/TimelinePresentationModel.js:390 > + getMinimumRecordTime: function()
drop get, just minimumRecordTime -- it's cleaner.
> Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1087 > +WebInspector.TimelinePresentationModel.generateMainThreadBarPopupContent = function(startTime, duration, cpuTime, messageCount, callback) {
{ => next line
WebKit Review Bot
Comment 3
2012-11-01 07:33:34 PDT
Comment on
attachment 171833
[details]
Patch
Attachment 171833
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/14670506
New failing tests: inspector-protocol/debugger-pause-dedicated-worker.html
eustas.bug
Comment 4
2012-11-01 08:39:43 PDT
Comment on
attachment 171833
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=171833&action=review
>> Source/WebCore/inspector/front-end/TimelinePanel.js:907 >> + lastElement.generatePopupContent = WebInspector.TimelinePresentationModel.generateMainThreadBarPopupContent.bind(null, barStartTime - timeOffset, barEndTime - barStartTime, cpuTime, messageCount); > > I don't quite like the way we associate state with element by re-binding function arguments. Also, we normally use underscore to prefix our fields when associating them with DOM elements. How about lastElement._firstTask and lastElement._lastTask (and compute the rest lazily).
done
>> Source/WebCore/inspector/front-end/TimelinePanel.js:928 >> + lastElement.generatePopupContent = WebInspector.TimelinePresentationModel.generateMainThreadBarPopupContent.bind(null, barStartTime - timeOffset, barEndTime - barStartTime, cpuTime, messageCount); > > indent
removed
>> Source/WebCore/inspector/front-end/TimelinePresentationModel.js:390 >> + getMinimumRecordTime: function() > > drop get, just minimumRecordTime -- it's cleaner.
removed
>> Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1087 >> +WebInspector.TimelinePresentationModel.generateMainThreadBarPopupContent = function(startTime, duration, cpuTime, messageCount, callback) { > > { => next line
fixed
eustas.bug
Comment 5
2012-11-01 08:50:13 PDT
Created
attachment 171863
[details]
Patch
Andrey Kosyakov
Comment 6
2012-11-01 10:34:04 PDT
Comment on
attachment 171863
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=171863&action=review
> Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1076 > +WebInspector.TimelinePresentationModel.generateMainThreadBarPopupContent = function(info)
So why is this not an instance method? Instead of passing presentationModel via info, we could as well pass it on the call site, as _this_. Another option is to have this method on TimelinePanel, this way you won't have to pass tasks.
eustas.bug
Comment 7
2012-11-01 11:13:38 PDT
Comment on
attachment 171863
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=171863&action=review
>> Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1076 >> +WebInspector.TimelinePresentationModel.generateMainThreadBarPopupContent = function(info) > > So why is this not an instance method? Instead of passing presentationModel via info, we could as well pass it on the call site, as _this_. Another option is to have this method on TimelinePanel, this way you won't have to pass tasks.
Passing tasks prevents out-of index in case tasks are cleared, but refresh is deferred. Instance method will make little to nothing difference: 1) we will need to take pointer to presentation model in place we use it; 2) closure couldn't check types; when we use static method - we at least declare types Moving to TimelinePanel will require making public several things declared if presentation model (but extensively referenced -> more than 25 changes)
Andrey Kosyakov
Comment 8
2012-11-01 11:54:08 PDT
Comment on
attachment 171863
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=171863&action=review
>>> Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1076 >>> +WebInspector.TimelinePresentationModel.generateMainThreadBarPopupContent = function(info) >> >> So why is this not an instance method? Instead of passing presentationModel via info, we could as well pass it on the call site, as _this_. Another option is to have this method on TimelinePanel, this way you won't have to pass tasks. > > Passing tasks prevents out-of index in case tasks are cleared, but refresh is deferred. > Instance method will make little to nothing difference: > 1) we will need to take pointer to presentation model in place we use it; > 2) closure couldn't check types; when we use static method - we at least declare types > > Moving to TimelinePanel will require making public several things declared if presentation model (but extensively referenced -> more than 25 changes)
1) -- I don't quite follow. You only refer to this method in TimelinePanel, you could bind it to this._presentationModel there. Re moving to TimelinePanel - you just use _minimumRecordTime from PresentationModel, you could as well take it from TimelineModel.
eustas.bug
Comment 9
2012-11-01 12:08:36 PDT
Comment on
attachment 171863
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=171863&action=review
>>>> Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1076 >>>> +WebInspector.TimelinePresentationModel.generateMainThreadBarPopupContent = function(info) >>> >>> So why is this not an instance method? Instead of passing presentationModel via info, we could as well pass it on the call site, as _this_. Another option is to have this method on TimelinePanel, this way you won't have to pass tasks. >> >> Passing tasks prevents out-of index in case tasks are cleared, but refresh is deferred. >> Instance method will make little to nothing difference: >> 1) we will need to take pointer to presentation model in place we use it; >> 2) closure couldn't check types; when we use static method - we at least declare types >> >> Moving to TimelinePanel will require making public several things declared if presentation model (but extensively referenced -> more than 25 changes) > > 1) -- I don't quite follow. You only refer to this method in TimelinePanel, you could bind it to this._presentationModel there. > > Re moving to TimelinePanel - you just use _minimumRecordTime from PresentationModel, you could as well take it from TimelineModel.
We also need to disclose PopupContent helper fields - that is what i was talking about
eustas.bug
Comment 10
2012-11-02 02:38:57 PDT
Created
attachment 172015
[details]
Patch
Andrey Kosyakov
Comment 11
2012-11-02 06:45:49 PDT
Comment on
attachment 172015
[details]
Patch LGTM
WebKit Review Bot
Comment 12
2012-11-02 10:07:43 PDT
Comment on
attachment 172015
[details]
Patch Clearing flags on attachment: 172015 Committed
r133310
: <
http://trac.webkit.org/changeset/133310
>
WebKit Review Bot
Comment 13
2012-11-02 10:07:47 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug