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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/RequestTimingView.js

Issue 1794783006: Add Server-Timing support to devtools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix with file name change Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/networkPanel.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 cell.colSpan = 3; 271 cell.colSpan = 3;
272 cell.createTextChild(WebInspector.UIString("CAUTION: request is not fini shed yet!")); 272 cell.createTextChild(WebInspector.UIString("CAUTION: request is not fini shed yet!"));
273 } 273 }
274 274
275 var footer = tableElement.createChild("tr", "network-timing-footer"); 275 var footer = tableElement.createChild("tr", "network-timing-footer");
276 var note = footer.createChild("td"); 276 var note = footer.createChild("td");
277 note.colSpan = 2; 277 note.colSpan = 2;
278 note.appendChild(WebInspector.linkifyDocumentationURLAsNode("profile/network -performance/resource-loading#view-network-timing-details-for-a-specific-resourc e", WebInspector.UIString("Explanation"))); 278 note.appendChild(WebInspector.linkifyDocumentationURLAsNode("profile/network -performance/resource-loading#view-network-timing-details-for-a-specific-resourc e", WebInspector.UIString("Explanation")));
279 footer.createChild("td").createTextChild(Number.secondsToString(totalDuratio n, true)); 279 footer.createChild("td").createTextChild(Number.secondsToString(totalDuratio n, true));
280 280
281 var serverTimings = request.serverTimings;
282 if (!serverTimings)
283 return tableElement;
284
285 var breakEl = tableElement.createChild("tr", "network-timing-table-header"). createChild("td");
286 breakEl.colSpan = 3;
287 breakEl.createChild("hr", "break");
288 var serverHeader = tableElement.createChild("tr", "network-timing-table-head er");
289 serverHeader.createChild("td").createTextChild(WebInspector.UIString("Server -Timing"));
paulirish 2016/03/20 20:16:27 "Server Timing"
290 serverHeader.createChild("td").createTextChild("");
291 serverHeader.createChild("td").createTextChild(WebInspector.UIString("TIME") );
292
293 /**
294 * @param {!WebInspector.ServerTiming} serverTiming
295 */
296 function addTiming(serverTiming)
297 {
298 var tr = tableElement.createChild("tr", serverTiming.metric == "total" ? "network-timing-footer" : "");
299 var metric = tr.createChild("td", "network-timing-metric");
300 metric.colSpan = 2;
301 metric.createTextChild(serverTiming.description || serverTiming.metric);
paulirish 2016/03/20 20:16:27 Would you want to see both metric name and optiona
sroussey 2016/04/22 00:55:08 I don't think so. A lot of people will have a metr
302
303 var label = tr.createChild("td").createChild("div", "network-timing-bar- title");
304 label.textContent = Number.secondsToString(serverTiming.value, true);
305 }
306
307 serverTimings.filter(item => item.metric.toLowerCase() != "total").forEach(a ddTiming);
308 serverTimings.filter(item => item.metric.toLowerCase() == "total").forEach(a ddTiming);
paulirish 2016/03/20 20:16:27 This does rely on convention that a metric with th
309
281 return tableElement; 310 return tableElement;
282 } 311 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/networkPanel.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698