|
240 | 240 | function renderPerf() {
|
241 | 241 | // Browser timing remains hidden unless we can successfully access the performance object
|
242 | 242 | var perf = window.performance || window.msPerformance ||
|
243 |
| - window.webkitPerformance || window.mozPerformance; |
| 243 | + window.webkitPerformance || window.mozPerformance; |
244 | 244 | if (perf) {
|
245 | 245 | var rowCount = 0,
|
246 | 246 | timingOffset = perf.timing.navigationStart,
|
247 |
| - timingEnd = perf.timing.loadEventEnd; |
248 |
| - var totalTime = timingEnd - timingOffset; |
| 247 | + timingEnd = perf.timing.loadEventEnd, |
| 248 | + totalTime = timingEnd - timingOffset; |
249 | 249 | function getLeft(stat) {
|
250 | 250 | return ((perf.timing[stat] - timingOffset) / (totalTime)) * 100.0;
|
251 | 251 | }
|
|
265 | 265 | '<td>' + (perf.timing[stat] - timingOffset) + ' (+' + (perf.timing[endStat] - perf.timing[stat]) + ')</td>');
|
266 | 266 | } else {
|
267 | 267 | // Render a point in time
|
268 |
| - $row.html('<td>' + stat + '</td>' + |
269 |
| - '<td class="timeline"><div class="djDebugTimeline"><div class="djDebugLineChart" style="left:' + getLeft(stat) + '%;"><strong style="width:2px;"> </strong></div></div></td>' + |
270 |
| - '<td>' + (perf.timing[stat] - timingOffset) + '</td>'); |
| 268 | + $row.html('<td>' + stat + '</td>' + |
| 269 | + '<td class="timeline"><div class="djDebugTimeline"><div class="djDebugLineChart" style="left:' + getLeft(stat) + '%;"><strong style="width:2px;"> </strong></div></div></td>' + |
| 270 | + '<td>' + (perf.timing[stat] - timingOffset) + '</td>'); |
271 | 271 | }
|
272 | 272 | $('#djDebugBrowserTimingTableBody').append($row);
|
273 | 273 | }
|
274 | 274 |
|
275 | 275 | // This is a reasonably complete and ordered set of timing periods (2 params) and events (1 param)
|
276 | 276 | addRow('domainLookupStart', 'domainLookupEnd');
|
277 | 277 | addRow('connectStart', 'connectEnd');
|
278 |
| - addRow('requestStart', 'responseEnd') // There is no requestEnd |
| 278 | + addRow('requestStart', 'responseEnd'); // There is no requestEnd |
279 | 279 | addRow('responseStart', 'responseEnd');
|
280 | 280 | addRow('domLoading', 'domComplete'); // Spans the events below
|
281 | 281 | addRow('domInteractive');
|
|
0 commit comments