+2011-10-04 Eric Seidel <eric@webkit.org>
+
+ Add loopsPerRun option to Parser performance test runner
+ https://bugs.webkit.org/show_bug.cgi?id=69363
+
+ Reviewed by Antti Koivisto.
+
+ Add loopsPerRun option and abstract out runLoop function (to make the UI more responsive).
+ No change in behavior in any of the tests.
+
+ * Parser/resources/runner.js:
+ (runLoop):
+ (run):
+ (start):
+
2011-10-03 Eric Seidel <eric@webkit.org>
Add a microbenchmark for a full-page render of the HTML5 spec
log("max " + computeMax(times));
}
+function runLoop()
+{
+ if (window.completedRuns < window.runCount) {
+ window.setTimeout(run, 0);
+ } else {
+ logStatistics(times);
+ }
+}
+
function run() {
var start = new Date();
- for (var i = 0; i < 10; ++i)
+ for (var i = 0; i < window.loopsPerRun; ++i)
window.runFunction();
var time = new Date() - start;
- completedRuns++;
- if (completedRuns <= 0) {
+ window.completedRuns++;
+ if (window.completedRuns <= 0) {
log("Ignoring warm-up run (" + time + ")");
} else {
times.push(time);
log(time);
}
- if (completedRuns < window.runCount) {
- window.setTimeout(run, 0);
- } else {
- logStatistics(times);
- }
+ runLoop()
}
-function start(runCount, runFunction) {
+function start(runCount, runFunction, loopsPerRun) {
window.runCount = runCount;
window.runFunction = runFunction;
+ window.loopsPerRun = loopsPerRun || 10;
log("Running " + runCount + " times");
- run();
+ runLoop();
}