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

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

Issue 2689833002: DevTools: Server Timing values should be in milliseconds (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/network/RequestTimingView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/RequestTimingView.js b/third_party/WebKit/Source/devtools/front_end/network/RequestTimingView.js
index 9c7a27733854dd4a36ae3e837357bf695995deeb..b51a65013a0672696cdc4376b7366d4bb9159ab2 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/RequestTimingView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/RequestTimingView.js
@@ -273,8 +273,9 @@ Network.RequestTimingView = class extends UI.VBox {
var metric = tr.createChild('td', 'network-timing-metric');
metric.createTextChild(serverTiming.description || serverTiming.metric);
var row = tr.createChild('td').createChild('div', 'network-timing-row');
- var left = scale * (endTime - startTime - serverTiming.value);
- if (serverTiming.value && left >= 0) { // don't chart values too big or too small
+ var serverTimingValue = serverTiming.value / 1000; // Server Timing values are in ms
allada 2017/02/11 06:21:58 serverTiming.value may be null. This should have b
paulirish 2017/02/12 01:16:13 true. are you OK with caseq's suggestion below? I
allada 2017/02/13 16:57:33 Yes. I am mostly worried about the fact that the J
paulirish 2017/02/13 22:18:46 sounds good. The regex can end up returning an und
+ var left = scale * (endTime - startTime - serverTimingValue);
+ if (serverTimingValue && left >= 0) { // don't chart values too big or too small
caseq 2017/02/11 01:05:18 can we rather have everything that depens on serve
paulirish 2017/02/13 22:18:46 yup, done.
var bar = row.createChild('span', 'network-timing-bar server-timing');
bar.style.left = left + '%';
bar.style.right = right + '%';
@@ -283,8 +284,8 @@ Network.RequestTimingView = class extends UI.VBox {
bar.style.backgroundColor = colorGenerator.colorForID(serverTiming.metric);
}
var label = tr.createChild('td').createChild('div', 'network-timing-bar-title');
- if (typeof serverTiming.value === 'number') // a metric timing value is optional
- label.textContent = Number.secondsToString(serverTiming.value, true);
+ if (typeof serverTimingValue === 'number') // a metric timing value is optional
+ label.textContent = Number.secondsToString(serverTimingValue, true);
allada 2017/02/11 06:21:58 I suggest using Number.millisToString and not do t
paulirish 2017/02/12 01:16:13 Was originally going to do that but the rest of th
allada 2017/02/13 16:57:33 In this case, I think it'd be better to use millis
paulirish 2017/02/13 22:18:46 sg, done.
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698