Summary: | Web Inspector: CPU Usage Timeline - Better Thread chart layout values | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | hi, inspector-bugzilla-changes, joepeck, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 194455 | ||||||
Attachments: |
|
Description
Joseph Pecoraro
2019-03-11 01:06:36 PDT
Created attachment 364240 [details]
[PATCH] Proposed Fix
Won't apply but still reviewable.
Comment on attachment 364240 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=364240&action=review rs=me > Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js:463 > + let workerMax = 0; Any reason to not use `-Infinity` like the rest? > Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js:601 > + if (value > 75) > + return 100; > + if (value > 50) > + return 75; > + if (value > 25) > + return 50; > + return 25; NIT: this could be rewritten/simplified as `(Math.floor(value / 25) + 1) * 25`. Comment on attachment 364240 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=364240&action=review >> Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js:601 >> + return 25; > > NIT: this could be rewritten/simplified as `(Math.floor(value / 25) + 1) * 25`. Yeah, I considered doing this when I first wrote it but I left it as is. This cascade is short and simple and makes it easy to play with new values and tweak. But I'll switch to this. The arithmetic approach is nice if we want to switch to multiples of 10 (something I've considered as well). |