Web Inspector: speed up _calculateRetainedSizes function
[WebKit-https.git] / PerformanceTests / inspector / heap-snapshot-advanced.html
1 <html>
2 <head>
3   <script src="../../LayoutTests/http/tests/inspector/inspector-test.js"></script>
4   <script src="../../LayoutTests/inspector/profiler/heap-snapshot-test.js"></script>
5   <script src="performance-test.js"></script>
6   <script src="heap-snapshot-performance-test.js"></script>
7 <script>
8
9 function makeLinkedList(n)
10 {
11     var node = {};
12     while (--n)
13         node = { next: node };
14     return node;
15 }
16
17 function makeDoubleLinkedList(n)
18 {
19   var tail = {};
20   var head = tail;
21   while (--n) {
22     head = { next: head };
23     head.next.prev = head;
24   }
25   return { head: head, tail: tail };
26 }
27
28 var list = makeLinkedList(20000);
29 var double_list = makeDoubleLinkedList(5000);
30
31 </script>
32 </head>
33 <body onload="runTest()">
34 </body>
35 </html>