Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: PerformanceTests/resources/runner.js

Issue 1359563002: Performance tests should use GCController.collectAll instead of GCController.collect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698