| 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="../tracing-test.js"></script> | 4 <script src="../tracing-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 var sessionId = "6.23"; | 8 var sessionId = "6.23"; |
| 9 var rawTraceEvents = [ | 9 var rawTraceEvents = [ |
| 10 { | 10 { |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 WebInspector.TimelineUIUtils.hiddenEventsFilter(), | 437 WebInspector.TimelineUIUtils.hiddenEventsFilter(), |
| 438 new WebInspector.ExcludeTopLevelFilter() | 438 new WebInspector.ExcludeTopLevelFilter() |
| 439 ]; | 439 ]; |
| 440 var treeTopDown = WebInspector.TimelineModel.buildTopDownTree(events, 0, Inf
inity, filters, WebInspector.TimelineTreeView.prototype._eventId); | 440 var treeTopDown = WebInspector.TimelineModel.buildTopDownTree(events, 0, Inf
inity, filters, WebInspector.TimelineTreeView.prototype._eventId); |
| 441 printProfileTree(0, treeTopDown); | 441 printProfileTree(0, treeTopDown); |
| 442 var treeBottomUp = WebInspector.TimelineModel.buildBottomUpTree(treeTopDown)
; | 442 var treeBottomUp = WebInspector.TimelineModel.buildBottomUpTree(treeTopDown)
; |
| 443 printProfileTree(0, treeBottomUp); | 443 printProfileTree(0, treeBottomUp); |
| 444 | 444 |
| 445 function printProfileTree(padding, node) | 445 function printProfileTree(padding, node) |
| 446 { | 446 { |
| 447 InspectorTest.addResult(" ".repeat(padding) + node.name + ": " + [node.
selfTime, node.totalTime].map(function (t) { return t.toFixed(3); }).join(" "))
; | 447 var name = node.name || (node.event.name === WebInspector.TimelineModel.
RecordType.JSFrame |
| 448 ? WebInspector.beautifyFunctionName(node.event.args["data"]["functio
nName"]) |
| 449 : WebInspector.TimelineUIUtils.eventTitle(node.event)); |
| 450 InspectorTest.addResult(" ".repeat(padding) + name + ": " + [node.selfT
ime, node.totalTime].map(function (t) { return t.toFixed(3); }).join(" ")); |
| 448 (node.children || new Map()).forEach(printProfileTree.bind(null, padding
+ 1)); | 451 (node.children || new Map()).forEach(printProfileTree.bind(null, padding
+ 1)); |
| 449 } | 452 } |
| 450 | 453 |
| 451 InspectorTest.completeTest(); | 454 InspectorTest.completeTest(); |
| 452 } | 455 } |
| 453 | 456 |
| 454 </script> | 457 </script> |
| 455 </head> | 458 </head> |
| 456 <body onload="runTest()"> | 459 <body onload="runTest()"> |
| 457 </body> | 460 </body> |
| 458 </html> | 461 </html> |
| OLD | NEW |