OLD | NEW |
1 // There are tests for computeStatistics() located in LayoutTests/fast/harness/p
erftests | 1 // There are tests for computeStatistics() located in LayoutTests/fast/harness/p
erftests |
2 | 2 |
3 if (window.testRunner) { | 3 if (window.testRunner) { |
4 testRunner.waitUntilDone(); | 4 testRunner.waitUntilDone(); |
5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); |
6 } | 6 } |
7 | 7 |
8 (function () { | 8 (function () { |
9 var logLines = null; | 9 var logLines = null; |
10 var completedIterations = -1; | 10 var completedIterations = -1; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 this.log("min " + statistics.min + " " + statistics.unit); | 94 this.log("min " + statistics.min + " " + statistics.unit); |
95 this.log("max " + statistics.max + " " + statistics.unit); | 95 this.log("max " + statistics.max + " " + statistics.unit); |
96 } | 96 } |
97 | 97 |
98 function getUsedJSHeap() { | 98 function getUsedJSHeap() { |
99 return console.memory.usedJSHeapSize; | 99 return console.memory.usedJSHeapSize; |
100 } | 100 } |
101 | 101 |
102 PerfTestRunner.gc = function () { | 102 PerfTestRunner.gc = function () { |
103 if (window.GCController) | 103 if (window.GCController) |
104 window.GCController.collect(); | 104 window.GCController.collectAll(); |
105 else { | 105 else { |
106 function gcRec(n) { | 106 function gcRec(n) { |
107 if (n < 1) | 107 if (n < 1) |
108 return {}; | 108 return {}; |
109 var temp = {i: "ab" + i + (i / 100000)}; | 109 var temp = {i: "ab" + i + (i / 100000)}; |
110 temp += "foo"; | 110 temp += "foo"; |
111 gcRec(n-1); | 111 gcRec(n-1); |
112 } | 112 } |
113 for (var i = 0; i < 1000; i++) | 113 for (var i = 0; i < 1000; i++) |
114 gcRec(10); | 114 gcRec(10); |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 339 |
340 iframe.contentDocument.close(); | 340 iframe.contentDocument.close(); |
341 document.body.removeChild(iframe); | 341 document.body.removeChild(iframe); |
342 }; | 342 }; |
343 | 343 |
344 PerfTestRunner.measureTime(test); | 344 PerfTestRunner.measureTime(test); |
345 } | 345 } |
346 | 346 |
347 window.PerfTestRunner = PerfTestRunner; | 347 window.PerfTestRunner = PerfTestRunner; |
348 })(); | 348 })(); |
OLD | NEW |