| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>Benchmark - Stress Blink GC</title> |
| </head> |
| <body> |
| <script src="../resources/runner.js"></script> |
| <script src="resources/measure-gc.js"></script> |
| <script> |
| var root = document.createElement('div'); |
| |
| function makeTrees() { |
| var depth = 5000; |
| var numberOfTrees = 50; |
| |
| var div = document.createElement('div'); |
| var current = div; |
| for (var i = 0; i < depth; ++i) { |
| var childDiv = document.createElement('div'); |
| current.appendChild(childDiv); |
| current = childDiv; |
| } |
| |
| for (var i = 0; i < numberOfTrees; ++i) |
| root.appendChild(div.cloneNode(true)); |
| } |
| |
| window.onload = function() { |
| makeTrees(root); |
| PerfTestRunner.measureBlinkGCTime({ description: "Stress Blink GC by GCing a large deep DOM" }); |
| } |
| </script> |
| </body> |
| </html> |