| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/timeline-test.js"></script> | 4 <script src="../../http/tests/inspector/timeline-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function initialize_TimelineCoalescing() | 7 function initialize_TimelineCoalescing() |
| 8 { | 8 { |
| 9 | 9 |
| 10 InspectorTest.dumpStats = function(presentationRecord) | 10 InspectorTest.dumpStats = function(presentationRecord) |
| 11 { | 11 { |
| 12 if (!presentationRecord.presentationParent()) | 12 if (!presentationRecord.presentationParent()) |
| 13 return ""; | 13 return ""; |
| 14 | 14 |
| 15 var aggregatedStats = {}; | 15 var aggregatedStats = {}; |
| 16 var uiUtils = WebInspector.panels.timeline._uiUtils; | |
| 17 if (presentationRecord.coalesced()) { | 16 if (presentationRecord.coalesced()) { |
| 18 var presentationChildren = presentationRecord.presentationChildren(); | 17 var presentationChildren = presentationRecord.presentationChildren(); |
| 19 for (var i = 0; i < presentationChildren.length; ++i) | 18 for (var i = 0; i < presentationChildren.length; ++i) |
| 20 uiUtils.aggregateTimeForRecord(aggregatedStats, presentationChildren
[i].record()); | 19 WebInspector.TimelineUIUtils.aggregateTimeForRecord(aggregatedStats,
presentationChildren[i].record()); |
| 21 } else { | 20 } else { |
| 22 uiUtils.aggregateTimeForRecord(aggregatedStats, presentationRecord.recor
d()); | 21 WebInspector.TimelineUIUtils.aggregateTimeForRecord(aggregatedStats, pre
sentationRecord.record()); |
| 23 } | 22 } |
| 24 | 23 |
| 25 var timeByCategory = ""; | 24 var timeByCategory = ""; |
| 26 | 25 |
| 27 for (category in aggregatedStats) { | 26 for (category in aggregatedStats) { |
| 28 if (timeByCategory) | 27 if (timeByCategory) |
| 29 timeByCategory += ", "; | 28 timeByCategory += ", "; |
| 30 timeByCategory += category + ": " + aggregatedStats[category].toFixed(5)
; | 29 timeByCategory += category + ": " + aggregatedStats[category].toFixed(5)
; |
| 31 } | 30 } |
| 32 var duration = (presentationRecord.endTime() - presentationRecord.startTime(
)).toFixed(5); | 31 var duration = (presentationRecord.endTime() - presentationRecord.startTime(
)).toFixed(5); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 </script> | 130 </script> |
| 132 </head> | 131 </head> |
| 133 | 132 |
| 134 <body onload="runTest()"> | 133 <body onload="runTest()"> |
| 135 <p> | 134 <p> |
| 136 Test timeline records coalescing | 135 Test timeline records coalescing |
| 137 </p> | 136 </p> |
| 138 | 137 |
| 139 </body> | 138 </body> |
| 140 </html> | 139 </html> |
| OLD | NEW |