Changeset 243704 in webkit
- Timestamp:
- Apr 1, 2019 11:54:36 AM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r243666 r243704 1 2019-04-01 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: CPU Usage Timeline - Adjust Energy Impact Threshholds 4 https://bugs.webkit.org/show_bug.cgi?id=196421 5 <rdar://problem/49125703> 6 7 Reviewed by Devin Rousso. 8 9 - Low - Keep Below 3% to continue to encourage idle pages stay below 3% 10 Might want to reduce to 2.5 or 2 after fixing bug 196419. 11 12 - High - Make Above 30% instead of 50% to encourage long running interactivity to stay below 30% 13 Depends on interaction, but sustained (1-2min) at 30%+ will certainly impact battery. 14 15 - Very High - Make above 100% instead of 150% 16 CPU Usage spikes around page load and is quite often still under 100% despite many threads. 17 Drop this a bit as we dropped High down. 18 19 Reduce the size of the Medium section, and increase the High section 20 Having 70% of the chart be "Medium" is just too much Medium, and 21 we've now made it more possible to be in the High range. 22 23 * UserInterface/Views/CPUTimelineView.js: 24 (WI.CPUTimelineView.prototype.get mediumEnergyThreshold): 25 (WI.CPUTimelineView.prototype.get highEnergyThreshold): 26 (WI.CPUTimelineView.prototype.get lowEnergyGraphBoundary): 27 (WI.CPUTimelineView.prototype.get mediumEnergyGraphBoundary): 28 (WI.CPUTimelineView.prototype.get highEnergyGraphBoundary): 29 (WI.CPUTimelineView.prototype.initialLayout): 30 (WI.CPUTimelineView.prototype.layout.bestThreadLayoutMax): 31 (WI.CPUTimelineView.prototype._layoutEnergyChart): 32 1 33 2019-03-29 Myles C. Maxfield <mmaxfield@apple.com> 2 34 -
trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js
r242740 r243704 72 72 73 73 static get lowEnergyThreshold() { return 3; } 74 static get mediumEnergyThreshold() { return 50; } 75 static get highEnergyThreshold() { return 150; } 74 static get mediumEnergyThreshold() { return 30; } 75 static get highEnergyThreshold() { return 100; } 76 77 static get lowEnergyGraphBoundary() { return 10; } 78 static get mediumEnergyGraphBoundary() { return 70; } 79 static get highEnergyGraphBoundary() { return 100; } 76 80 77 81 static get defaultSectionLimit() { return 5; } … … 262 266 strokeWidth: 20, 263 267 segments: [ 264 {className: "low", limit: 10},265 {className: "medium", limit: 80},266 {className: "high", limit: 100},268 {className: "low", limit: CPUTimelineView.lowEnergyGraphBoundary}, 269 {className: "medium", limit: CPUTimelineView.mediumEnergyGraphBoundary}, 270 {className: "high", limit: CPUTimelineView.highEnergyGraphBoundary}, 267 271 ] 268 272 }); … … 592 596 function bestThreadLayoutMax(value) { 593 597 if (value > 100) 594 return Math.ceil(value); 598 return Math.ceil(value); 595 599 return (Math.floor(value / 25) + 1) * 25; 596 600 } … … 1103 1107 this._energyImpactLabelElement.textContent = WI.UIString("Low"); 1104 1108 this._energyImpactLabelElement.classList.add("low"); 1105 this._energyChart.value = mapWithBias(average, 0, CPUTimelineView.lowEnergyThreshold, 0, 10, 0.85);1109 this._energyChart.value = mapWithBias(average, 0, CPUTimelineView.lowEnergyThreshold, 0, CPUTimelineView.lowEnergyGraphBoundary, 0.85); 1106 1110 } else if (average <= CPUTimelineView. mediumEnergyThreshold) { 1107 // Medium (3%- 90% CPU, mapped to 10-80)1111 // Medium (3%-30% CPU, mapped to 10-70) 1108 1112 this._energyImpactLabelElement.textContent = WI.UIString("Medium"); 1109 1113 this._energyImpactLabelElement.classList.add("medium"); 1110 this._energyChart.value = mapWithBias(average, CPUTimelineView.lowEnergyThreshold, CPUTimelineView.mediumEnergyThreshold, 10, 80, 0.6);1114 this._energyChart.value = mapWithBias(average, CPUTimelineView.lowEnergyThreshold, CPUTimelineView.mediumEnergyThreshold, CPUTimelineView.lowEnergyGraphBoundary, CPUTimelineView.mediumEnergyGraphBoundary, 0.6); 1111 1115 } else if (average < CPUTimelineView. highEnergyThreshold) { 1112 // High. ( 50-150% CPU, mapped to 80-100)1116 // High. (30%-100% CPU, mapped to 70-100) 1113 1117 this._energyImpactLabelElement.textContent = WI.UIString("High"); 1114 1118 this._energyImpactLabelElement.classList.add("high"); 1115 this._energyChart.value = mapWithBias(average, CPUTimelineView.mediumEnergyThreshold, CPUTimelineView.highEnergyThreshold, 80, 100, 0.9);1119 this._energyChart.value = mapWithBias(average, CPUTimelineView.mediumEnergyThreshold, CPUTimelineView.highEnergyThreshold, CPUTimelineView.mediumEnergyGraphBoundary, CPUTimelineView.highEnergyGraphBoundary, 0.9); 1116 1120 } else { 1117 // Very High. (>1 50% CPU, mapped to 100)1121 // Very High. (>100% CPU, mapped to 100) 1118 1122 this._energyImpactLabelElement.textContent = WI.UIString("Very High"); 1119 1123 this._energyImpactLabelElement.classList.add("high");
Note: See TracChangeset
for help on using the changeset viewer.