OLD | NEW |
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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 serverTimings.filter(item => item.metric.toLowerCase() === 'total') | 261 serverTimings.filter(item => item.metric.toLowerCase() === 'total') |
262 .forEach(item => addTiming(item, lastTimingRightEdge)); | 262 .forEach(item => addTiming(item, lastTimingRightEdge)); |
263 | 263 |
264 return tableElement; | 264 return tableElement; |
265 | 265 |
266 /** | 266 /** |
267 * @param {!SDK.ServerTiming} serverTiming | 267 * @param {!SDK.ServerTiming} serverTiming |
268 * @param {number} right | 268 * @param {number} right |
269 */ | 269 */ |
270 function addTiming(serverTiming, right) { | 270 function addTiming(serverTiming, right) { |
271 var colorGenerator = new UI.FlameChart.ColorGenerator({min: 0, max: 360, c
ount: 36}, {min: 50, max: 80}, 80); | 271 var colorGenerator = new PerfUI.FlameChart.ColorGenerator({min: 0, max: 36
0, count: 36}, {min: 50, max: 80}, 80); |
272 var isTotal = serverTiming.metric.toLowerCase() === 'total'; | 272 var isTotal = serverTiming.metric.toLowerCase() === 'total'; |
273 var tr = tableElement.createChild('tr', isTotal ? 'network-timing-footer'
: ''); | 273 var tr = tableElement.createChild('tr', isTotal ? 'network-timing-footer'
: ''); |
274 var metric = tr.createChild('td', 'network-timing-metric'); | 274 var metric = tr.createChild('td', 'network-timing-metric'); |
275 metric.createTextChild(serverTiming.description || serverTiming.metric); | 275 metric.createTextChild(serverTiming.description || serverTiming.metric); |
276 var row = tr.createChild('td').createChild('div', 'network-timing-row'); | 276 var row = tr.createChild('td').createChild('div', 'network-timing-row'); |
277 var left = scale * (endTime - startTime - serverTiming.value); | 277 var left = scale * (endTime - startTime - serverTiming.value); |
278 if (serverTiming.value && left >= 0) { // don't chart values too big or t
oo small | 278 if (serverTiming.value && left >= 0) { // don't chart values too big or t
oo small |
279 var bar = row.createChild('span', 'network-timing-bar server-timing'); | 279 var bar = row.createChild('span', 'network-timing-bar server-timing'); |
280 bar.style.left = left + '%'; | 280 bar.style.left = left + '%'; |
281 bar.style.right = right + '%'; | 281 bar.style.right = right + '%'; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 }; | 347 }; |
348 | 348 |
349 Network.RequestTimingView.ConnectionSetupRangeNames = new Set([ | 349 Network.RequestTimingView.ConnectionSetupRangeNames = new Set([ |
350 Network.RequestTimeRangeNames.Queueing, Network.RequestTimeRangeNames.Blocking
, | 350 Network.RequestTimeRangeNames.Queueing, Network.RequestTimeRangeNames.Blocking
, |
351 Network.RequestTimeRangeNames.Connecting, Network.RequestTimeRangeNames.DNS, N
etwork.RequestTimeRangeNames.Proxy, | 351 Network.RequestTimeRangeNames.Connecting, Network.RequestTimeRangeNames.DNS, N
etwork.RequestTimeRangeNames.Proxy, |
352 Network.RequestTimeRangeNames.SSL | 352 Network.RequestTimeRangeNames.SSL |
353 ]); | 353 ]); |
354 | 354 |
355 /** @typedef {{name: !Network.RequestTimeRangeNames, start: number, end: number}
} */ | 355 /** @typedef {{name: !Network.RequestTimeRangeNames, start: number, end: number}
} */ |
356 Network.RequestTimeRange; | 356 Network.RequestTimeRange; |
OLD | NEW |