DOM tests take too long to run
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Mar 2012 22:25:27 +0000 (22:25 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Mar 2012 22:25:27 +0000 (22:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=80082

Reviewed by Eric Seidel.

Reduce benchmark.timeToRun from 500ms to 100ms. Doesn't seem to affect test results much
(except DOM/DOMTable.html) but significantly reduces the runtime of tests.

* DOM/resources/dom-perf.js:
(BenchmarkSuite.prototype.RunSingle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109615 268f45cc-cd09-0410-ab3c-d52691b4dbfc

PerformanceTests/ChangeLog
PerformanceTests/DOM/resources/dom-perf.js

index 1b128fa..56ba375 100644 (file)
@@ -1,3 +1,16 @@
+2012-03-01  Ryosuke Niwa  <rniwa@webkit.org>
+
+        DOM tests take too long to run
+        https://bugs.webkit.org/show_bug.cgi?id=80082
+
+        Reviewed by Eric Seidel.
+
+        Reduce benchmark.timeToRun from 500ms to 100ms. Doesn't seem to affect test results much
+        (except DOM/DOMTable.html) but significantly reduces the runtime of tests.
+
+        * DOM/resources/dom-perf.js:
+        (BenchmarkSuite.prototype.RunSingle):
+
 2012-02-26  Kentaro Hara  <haraken@chromium.org>
 
         [Performance Tests] [Chromium] Bindings/dom-attributes.html is timing out
index a5ee6df..45eb4c6 100644 (file)
@@ -133,7 +133,10 @@ Math.random = (function() {
 
 function Benchmark(name, run, opt_setup, opt_cleanup, opt_shareSetup) {
     this.name = name;
-    this.timeToRun = 500; // ms
+    this.timeToRun = 100; // ms.
+    // Tests like DOM/DOMWalk.html are too fast and need to be ran multiple times.
+    // 100 ms was chosen since it was long enough to make DOMWalk and other fast tests stable
+    // but was short enough not to make other slow tests run multiple times.
     this.run = run;
     this.setup = opt_setup;
     this.cleanup = opt_cleanup;
@@ -237,6 +240,7 @@ BenchmarkSuite.prototype.RunSingle = function(benchmark, times) {
     var nZeros = 0;
     var error = null;
     var profiler = GetProfiler();
+
     for (var n = 0; !error && totalTime < benchmark.timeToRun;  n++) {
         if (this.benchmarkContent)
             this.benchmarkContentHolder.removeChild(this.benchmarkContent);
@@ -267,7 +271,7 @@ BenchmarkSuite.prototype.RunSingle = function(benchmark, times) {
             error = e;
         }
         totalTime = new Date() - start;
-    }
+  }
 
     var result = new BenchmarkResult(benchmark, times, error, null);
     if (this.benchmarkContent) {