| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 serverTimings.filter(item => item.metric.toLowerCase() === 'total') | 275 serverTimings.filter(item => item.metric.toLowerCase() === 'total') |
| 276 .forEach(item => addTiming(item, lastTimingRightEdge)); | 276 .forEach(item => addTiming(item, lastTimingRightEdge)); |
| 277 | 277 |
| 278 return tableElement; | 278 return tableElement; |
| 279 | 279 |
| 280 /** | 280 /** |
| 281 * @param {!SDK.ServerTiming} serverTiming | 281 * @param {!SDK.ServerTiming} serverTiming |
| 282 * @param {number} right | 282 * @param {number} right |
| 283 */ | 283 */ |
| 284 function addTiming(serverTiming, right) { | 284 function addTiming(serverTiming, right) { |
| 285 var colorGenerator = new Common.Color.Generator({min: 0, max: 360, count:
36}, {min: 50, max: 80}, 80); | 285 var colorGenerator = new PerfUI.FlameChart.ColorGenerator({min: 0, max: 36
0, count: 36}, {min: 50, max: 80}, 80); |
| 286 var isTotal = serverTiming.metric.toLowerCase() === 'total'; | 286 var isTotal = serverTiming.metric.toLowerCase() === 'total'; |
| 287 var tr = tableElement.createChild('tr', isTotal ? 'network-timing-footer'
: ''); | 287 var tr = tableElement.createChild('tr', isTotal ? 'network-timing-footer'
: ''); |
| 288 var metric = tr.createChild('td', 'network-timing-metric'); | 288 var metric = tr.createChild('td', 'network-timing-metric'); |
| 289 metric.createTextChild(serverTiming.description || serverTiming.metric); | 289 metric.createTextChild(serverTiming.description || serverTiming.metric); |
| 290 var row = tr.createChild('td').createChild('div', 'network-timing-row'); | 290 var row = tr.createChild('td').createChild('div', 'network-timing-row'); |
| 291 | 291 |
| 292 if (serverTiming.value === null) | 292 if (serverTiming.value === null) |
| 293 return; | 293 return; |
| 294 var left = scale * (endTime - startTime - (serverTiming.value / 1000)); | 294 var left = scale * (endTime - startTime - (serverTiming.value / 1000)); |
| 295 if (left >= 0) { // don't chart values too big or too small | 295 if (left >= 0) { // don't chart values too big or too small |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 }; | 364 }; |
| 365 | 365 |
| 366 Network.RequestTimingView.ConnectionSetupRangeNames = new Set([ | 366 Network.RequestTimingView.ConnectionSetupRangeNames = new Set([ |
| 367 Network.RequestTimeRangeNames.Queueing, Network.RequestTimeRangeNames.Blocking
, | 367 Network.RequestTimeRangeNames.Queueing, Network.RequestTimeRangeNames.Blocking
, |
| 368 Network.RequestTimeRangeNames.Connecting, Network.RequestTimeRangeNames.DNS, N
etwork.RequestTimeRangeNames.Proxy, | 368 Network.RequestTimeRangeNames.Connecting, Network.RequestTimeRangeNames.DNS, N
etwork.RequestTimeRangeNames.Proxy, |
| 369 Network.RequestTimeRangeNames.SSL | 369 Network.RequestTimeRangeNames.SSL |
| 370 ]); | 370 ]); |
| 371 | 371 |
| 372 /** @typedef {{name: !Network.RequestTimeRangeNames, start: number, end: number}
} */ | 372 /** @typedef {{name: !Network.RequestTimeRangeNames, start: number, end: number}
} */ |
| 373 Network.RequestTimeRange; | 373 Network.RequestTimeRange; |
| OLD | NEW |