Changeset 96634 in webkit
- Timestamp:
- Oct 4, 2011 1:16:51 PM (13 years ago)
- Location:
- trunk/PerformanceTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PerformanceTests/ChangeLog
r96559 r96634 1 2011-10-04 Eric Seidel <eric@webkit.org> 2 3 Add loopsPerRun option to Parser performance test runner 4 https://bugs.webkit.org/show_bug.cgi?id=69363 5 6 Reviewed by Antti Koivisto. 7 8 Add loopsPerRun option and abstract out runLoop function (to make the UI more responsive). 9 No change in behavior in any of the tests. 10 11 * Parser/resources/runner.js: 12 (runLoop): 13 (run): 14 (start): 15 1 16 2011-10-03 Eric Seidel <eric@webkit.org> 2 17 -
trunk/PerformanceTests/Parser/resources/runner.js
r77436 r96634 68 68 } 69 69 70 function run() { 71 var start = new Date(); 72 for (var i = 0; i < 10; ++i) 73 window.runFunction(); 74 var time = new Date() - start; 75 completedRuns++; 76 if (completedRuns <= 0) { 77 log("Ignoring warm-up run (" + time + ")"); 78 } else { 79 times.push(time); 80 log(time); 81 } 82 if (completedRuns < window.runCount) { 70 function runLoop() 71 { 72 if (window.completedRuns < window.runCount) { 83 73 window.setTimeout(run, 0); 84 74 } else { … … 87 77 } 88 78 89 function start(runCount, runFunction) { 79 function run() { 80 var start = new Date(); 81 for (var i = 0; i < window.loopsPerRun; ++i) 82 window.runFunction(); 83 var time = new Date() - start; 84 window.completedRuns++; 85 if (window.completedRuns <= 0) { 86 log("Ignoring warm-up run (" + time + ")"); 87 } else { 88 times.push(time); 89 log(time); 90 } 91 runLoop() 92 } 93 94 function start(runCount, runFunction, loopsPerRun) { 90 95 window.runCount = runCount; 91 96 window.runFunction = runFunction; 97 window.loopsPerRun = loopsPerRun || 10; 92 98 93 99 log("Running " + runCount + " times"); 94 run ();100 runLoop(); 95 101 }
Note: See TracChangeset
for help on using the changeset viewer.