Chromium Code Reviews| 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 393 printProfileTree(0, treeBottomUp); | 393 printProfileTree(0, treeBottomUp); |
| 394 | 394 |
| 395 function eventId(event) | 395 function eventId(event) |
| 396 { | 396 { |
| 397 var data = event.args.data; | 397 var data = event.args.data; |
| 398 return data && (data.callUID || data.functionNode); | 398 return data && (data.callUID || data.functionNode); |
| 399 } | 399 } |
| 400 | 400 |
| 401 function printProfileTree(padding, node) | 401 function printProfileTree(padding, node) |
| 402 { | 402 { |
| 403 InspectorTest.addResult(" ".repeat(padding) + node.name + ": " + node.t otalTime.toFixed(3)); | 403 InspectorTest.addResult(" ".repeat(padding) + node.name + ": " + [node. selfTime, node.totalTime].map(t => t.toFixed(3)).join(" ")); |
|
yurys
2015/08/14 22:59:27
Let's hold off using arrow functions as we agreed,
alph
2015/08/15 08:09:12
Done.
| |
| 404 (node.children || new Map()).forEach(printProfileTree.bind(null, padding + 1)); | 404 (node.children || new Map()).forEach(printProfileTree.bind(null, padding + 1)); |
| 405 } | 405 } |
| 406 | 406 |
| 407 InspectorTest.completeTest(); | 407 InspectorTest.completeTest(); |
| 408 } | 408 } |
| 409 | 409 |
| 410 </script> | 410 </script> |
| 411 </head> | 411 </head> |
| 412 <body onload="runTest()"> | 412 <body onload="runTest()"> |
| 413 </body> | 413 </body> |
| 414 </html> | 414 </html> |
| OLD | NEW |