Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineModel.js

Issue 2712833002: DevTools: Show decoded body length for network requests on timeline. (Closed)
Patch Set: rebaseline Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineModel.js b/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineModel.js
index b960a62b41c5dd2190c5a17c6dba49a9a9e882f1..3980e42f08dfc83e362fa3a9fb323b28d03d8f73 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineModel.js
@@ -1289,6 +1289,7 @@ TimelineModel.TimelineModel.NetworkRequest = class {
this.startTime = event.name === TimelineModel.TimelineModel.RecordType.ResourceSendRequest ? event.startTime : 0;
this.endTime = Infinity;
this.encodedDataLength = 0;
+ this.decodedBodyLength = 0;
/** @type {!Array<!SDK.TracingModel.Event>} */
this.children = [];
/** @type {?Object} */
@@ -1321,7 +1322,7 @@ TimelineModel.TimelineModel.NetworkRequest = class {
if (!this.responseTime &&
(event.name === recordType.ResourceReceiveResponse || event.name === recordType.ResourceReceivedData))
this.responseTime = event.startTime;
- const encodedDataLength = eventData['encodedDataLength'] || 0;
+ var encodedDataLength = eventData['encodedDataLength'] || 0;
if (event.name === recordType.ResourceReceiveResponse) {
if (eventData['fromCache'])
this.fromCache = true;
@@ -1333,6 +1334,9 @@ TimelineModel.TimelineModel.NetworkRequest = class {
this.encodedDataLength += encodedDataLength;
if (event.name === recordType.ResourceFinish && encodedDataLength)
this.encodedDataLength = encodedDataLength;
+ var decodedBodyLength = eventData['decodedBodyLength'];
+ if (event.name === recordType.ResourceFinish && decodedBodyLength)
+ this.decodedBodyLength = decodedBodyLength;
if (!this.url)
this.url = eventData['url'];
if (!this.requestMethod)

Powered by Google App Engine
This is Rietveld 408576698