Title: [96634] trunk/PerformanceTests
- Revision
- 96634
- Author
- e...@webkit.org
- Date
- 2011-10-04 13:16:51 -0700 (Tue, 04 Oct 2011)
Log Message
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):
Modified Paths
Diff
Modified: trunk/PerformanceTests/ChangeLog (96633 => 96634)
--- trunk/PerformanceTests/ChangeLog 2011-10-04 20:11:04 UTC (rev 96633)
+++ trunk/PerformanceTests/ChangeLog 2011-10-04 20:16:51 UTC (rev 96634)
@@ -1,3 +1,18 @@
+2011-10-04 Eric Seidel <e...@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 <e...@webkit.org>
Add a microbenchmark for a full-page render of the HTML5 spec
Modified: trunk/PerformanceTests/Parser/resources/runner.js (96633 => 96634)
--- trunk/PerformanceTests/Parser/resources/runner.js 2011-10-04 20:11:04 UTC (rev 96633)
+++ trunk/PerformanceTests/Parser/resources/runner.js 2011-10-04 20:16:51 UTC (rev 96634)
@@ -67,29 +67,35 @@
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();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes