Web Inspector: speed up _calculateRetainedSizes function
[WebKit-https.git] / PerformanceTests / inspector / heap-snapshot.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 var counter = 0;
10
11 function makeObjectsTree(deep)
12 {
13     var node = {};
14     node.text = "some text " + counter;
15     if (deep === 0)
16         return node;
17     for (var i = 0; i < 2; ++i)
18         node[counter++] = makeObjectsTree(deep - 1);
19     return node;
20 }
21
22 function makeObjectsTree2(name, deep)
23 {
24     window[name] = makeObjectsTree(deep);
25 }
26
27 makeObjectsTree2("t", 16);
28
29 </script>
30 </head>
31 <body onload="runTest()">
32 </body>
33 </html>