Bug 195789 - Web Inspector: CPU Usage Timeline - the right edge of each column should align with a CPU measurement
Summary: Web Inspector: CPU Usage Timeline - the right edge of each column should alig...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-14 20:06 PDT by Devin Rousso
Modified: 2019-03-19 13:13 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.96 KB, patch)
2019-03-14 22:04 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (6.19 KB, patch)
2019-03-15 20:49 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-03-14 20:06:22 PDT
Right now, we are rendering each column such that the middle of the column is aligned with the CPU measurement.  This could potentially be misleading, as due to the width of the bar, it implies that there was a period of time after the actual CPU measurement that is attributed to that same CPU measurement.

   1      2      3   
       _______       
       [  *  ]       
       [  *  ]_______
       [  *  ][  *  ]
_______[  *  ][  *  ]
[  *  ][  *  ][  *  ]
[__*__][__*__][__*__]
 A   B  C   D  E   F

In this example, a developer might "attribute" any work done at time B to record 1, when in reality it should be "attributed" to record 2, since the CPU measurement had already been taken by the time B was captured, meaning that the work for B hadn't yet been don and could therefore not have affected the CPU measurement

We should be rendering the columns such that the CPU measurement aligns with the trailing edge of the column.

  1      2      3    
    _______       ___
    [    *]       [  
    [    *]_______[  
    [    *][    *][  
____[    *][    *][  
  *][    *][    *][  
__*][____*][____*][__
 A   B  C   D  E   F

NOT: the drawing isn't exactly accurate, as the * would overlap the ].


Legend:
[     ] = a column for a CPU measurement (500ms wide to account for the fact that CPU measurements are 500ms apart)
* = the time when the measurement actually takes place
Comment 1 Radar WebKit Bug Importer 2019-03-14 22:00:34 PDT
<rdar://problem/48915271>
Comment 2 Devin Rousso 2019-03-14 22:04:04 PDT
Created attachment 364769 [details]
Patch
Comment 3 Devin Rousso 2019-03-15 20:49:33 PDT
Created attachment 364907 [details]
Patch
Comment 4 Joseph Pecoraro 2019-03-19 12:03:01 PDT
Comment on attachment 364907 [details]
Patch

r=me
Comment 5 WebKit Commit Bot 2019-03-19 13:13:08 PDT
Comment on attachment 364907 [details]
Patch

Clearing flags on attachment: 364907

Committed r243166: <https://trac.webkit.org/changeset/243166>
Comment 6 WebKit Commit Bot 2019-03-19 13:13:10 PDT
All reviewed patches have been landed.  Closing bug.