Title: [244411] trunk/Source/WebInspectorUI
- Revision
- 244411
- Author
- [email protected]
- Date
- 2019-04-17 16:37:17 -0700 (Wed, 17 Apr 2019)
Log Message
Web Inspector: CPU Usage Timeline - Include # of Network Requests in the Statistics section
https://bugs.webkit.org/show_bug.cgi?id=197039
<rdar://problem/49996299>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView.prototype.initialLayout):
(WI.CPUTimelineView.prototype._computeStatisticsData):
(WI.CPUTimelineView.prototype._clearStatistics):
Add the number of network requests started in the selected range.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (244410 => 244411)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-04-17 23:33:20 UTC (rev 244410)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-04-17 23:37:17 UTC (rev 244411)
@@ -1,3 +1,18 @@
+2019-04-17 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: CPU Usage Timeline - Include # of Network Requests in the Statistics section
+ https://bugs.webkit.org/show_bug.cgi?id=197039
+ <rdar://problem/49996299>
+
+ Reviewed by Timothy Hatcher.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ * UserInterface/Views/CPUTimelineView.js:
+ (WI.CPUTimelineView.prototype.initialLayout):
+ (WI.CPUTimelineView.prototype._computeStatisticsData):
+ (WI.CPUTimelineView.prototype._clearStatistics):
+ Add the number of network requests started in the selected range.
+
2019-04-17 Timothy Hatcher <[email protected]>
Rename `supported-color-schemes` to `color-scheme`.
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (244410 => 244411)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2019-04-17 23:33:20 UTC (rev 244410)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2019-04-17 23:37:17 UTC (rev 244411)
@@ -664,6 +664,7 @@
localizedStrings["Network"] = "Network";
localizedStrings["Network Issue"] = "Network Issue";
localizedStrings["Network Requests"] = "Network Requests";
+localizedStrings["Network Requests:"] = "Network Requests:";
localizedStrings["New Tab"] = "New Tab";
localizedStrings["Next Sibling"] = "Next Sibling";
localizedStrings["No"] = "No";
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js (244410 => 244411)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js 2019-04-17 23:33:20 UTC (rev 244410)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js 2019-04-17 23:37:17 UTC (rev 244411)
@@ -353,6 +353,11 @@
{
let {headerCell, numberCell} = this._createTableRow(this._statisticsTable);
+ headerCell.textContent = WI.UIString("Network Requests:");
+ this._networkRequestsNumberElement = numberCell;
+ }
+ {
+ let {headerCell, numberCell} = this._createTableRow(this._statisticsTable);
headerCell.textContent = WI.UIString("Script Entries:");
this._scriptEntriesNumberElement = numberCell;
}
@@ -786,6 +791,7 @@
this._clearStatistics();
+ this._networkRequestsNumberElement.textContent = statistics.networkRequests;
this._scriptEntriesNumberElement.textContent = statistics.scriptEntries;
let createFilterElement = (type, name) => {
@@ -1265,6 +1271,10 @@
}
});
+ let networkTimeline = this._recording.timelineForRecordType(WI.TimelineRecord.Type.Network);
+ let networkRecords = networkTimeline ? networkTimeline.recordsInTimeRange(startTime, endTime) : [];
+ let networkRequests = networkRecords.length;
+
let millisecondStartTime = Math.round(startTime * 1000);
let millisecondEndTime = Math.round(endTime * 1000);
let millisecondDuration = millisecondEndTime - millisecondStartTime;
@@ -1340,6 +1350,7 @@
samplesPaint,
samplesStyle,
scriptEntries,
+ networkRequests,
timerTypes,
eventTypes,
observerTypes,
@@ -1464,6 +1475,7 @@
_clearStatistics()
{
+ this._networkRequestsNumberElement.textContent = emDash;
this._scriptEntriesNumberElement.textContent = emDash;
for (let row of this._statisticsRows)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes