runCount in runner.js should be renamed to iterationCount
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2012 19:34:49 +0000 (19:34 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2012 19:34:49 +0000 (19:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=102208

Reviewed by Tony Chang.

Prior to this patch, there were terminology confusions between "runs" and "iterations".
The term "run" should refer to running a performance test once, and "iteration" should
refer to one measurement in the test. i.e. Executing run-perf-should once will result in
a single "run" of performance tests and each test may execute multiple "iterations"
to complete the run.

Unfortunately, we still overload the meaning of "runs" in "runs/s" (is "function calls/s")
but that could be addressed in a separate patch.

* Animation/balls.html:
* DOM/DOMTable.html:
* DOM/resources/dom-perf.js:
* Layout/floats_100_100.html:
* Layout/floats_100_100_nested.html:
* Layout/floats_20_100.html:
* Layout/floats_20_100_nested.html:
* Layout/floats_2_100.html:
* Layout/floats_2_100_nested.html:
* Layout/floats_50_100.html:
* Layout/floats_50_100_nested.html:
* Layout/subtree-detaching.html:
* Parser/html5-full-render.html:
* SVG/SvgHitTesting.html:
* resources/runner.js:

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

16 files changed:
PerformanceTests/Animation/balls.html
PerformanceTests/ChangeLog
PerformanceTests/DOM/DOMTable.html
PerformanceTests/DOM/resources/dom-perf.js
PerformanceTests/Layout/floats_100_100.html
PerformanceTests/Layout/floats_100_100_nested.html
PerformanceTests/Layout/floats_20_100.html
PerformanceTests/Layout/floats_20_100_nested.html
PerformanceTests/Layout/floats_2_100.html
PerformanceTests/Layout/floats_2_100_nested.html
PerformanceTests/Layout/floats_50_100.html
PerformanceTests/Layout/floats_50_100_nested.html
PerformanceTests/Layout/subtree-detaching.html
PerformanceTests/Parser/html5-full-render.html
PerformanceTests/SVG/SvgHitTesting.html
PerformanceTests/resources/runner.js

index ffc93d6..0a7b273 100644 (file)
     var particles = [];
 
     window.onload = function () {
-        PerfTestRunner.prepareToMeasureValuesAsync({runCount: 10, done: onCompletedRun, unit: 'fps'});
+        PerfTestRunner.prepareToMeasureValuesAsync({iterationCount: 10, done: onCompletedRun, unit: 'fps'});
 
         // Create the particles
         for (var i = 0; i < MAX_PARTICLES; i++)
index f90fe98..6eddee6 100644 (file)
@@ -1,3 +1,35 @@
+2012-11-14  Ryosuke Niwa  <rniwa@webkit.org>
+
+        runCount in runner.js should be renamed to iterationCount
+        https://bugs.webkit.org/show_bug.cgi?id=102208
+
+        Reviewed by Tony Chang.
+
+        Prior to this patch, there were terminology confusions between "runs" and "iterations".
+        The term "run" should refer to running a performance test once, and "iteration" should
+        refer to one measurement in the test. i.e. Executing run-perf-should once will result in
+        a single "run" of performance tests and each test may execute multiple "iterations"
+        to complete the run.
+
+        Unfortunately, we still overload the meaning of "runs" in "runs/s" (is "function calls/s")
+        but that could be addressed in a separate patch.
+
+        * Animation/balls.html:
+        * DOM/DOMTable.html:
+        * DOM/resources/dom-perf.js:
+        * Layout/floats_100_100.html:
+        * Layout/floats_100_100_nested.html:
+        * Layout/floats_20_100.html:
+        * Layout/floats_20_100_nested.html:
+        * Layout/floats_2_100.html:
+        * Layout/floats_2_100_nested.html:
+        * Layout/floats_50_100.html:
+        * Layout/floats_50_100_nested.html:
+        * Layout/subtree-detaching.html:
+        * Parser/html5-full-render.html:
+        * SVG/SvgHitTesting.html:
+        * resources/runner.js:
+
 2012-11-13  Dimitri Glazkov  <dglazkov@chromium.org>
 
         Unreviewed, rolling out r134367.
index 1709963..d5d09e4 100644 (file)
@@ -7,7 +7,7 @@
 <script type="text/javascript" src="resources/dom-perf/domtable.js"></script>
 <script>
 runBenchmarkSuite(DOMTableTest, 10);
-// runCount = 10 since this test is very slow (~12m per run on Core i5 2.53Hz MacBookPro)
+// iterationCount: 10 since this test is very slow (~12m per run on Core i5 2.53Hz MacBookPro)
 </script>
 </body>
 </html>
index ffe594d..053bd8e 100644 (file)
@@ -330,7 +330,7 @@ BenchmarkSuite.prototype.generateLargeTree = function() {
     return this.generateDOMTree(26, 26, 4);
 };
 
-function runBenchmarkSuite(suite, runCount) {
+function runBenchmarkSuite(suite, iterationCount) {
     PerfTestRunner.measureTime({run: function () {
         var container = document.getElementById('container');
         var content = document.getElementById('benchmark_content');
@@ -346,7 +346,7 @@ function runBenchmarkSuite(suite, runCount) {
         }
         return totalMeanTime;
     },
-    runCount: runCount,
+    iterationCount: iterationCount,
     done: function () {
         var container = document.getElementById('container');
         if (container.firstChild)
index 29514fa..86b38be 100644 (file)
@@ -10,7 +10,7 @@
         <pre id="log"></pre>
         <script>
             PerfTestRunner.measureTime({run: createFloatsLayoutTestFunction(100, 100, 0, 3),
-                runCount: 2});
+                iterationCount: 2});
         </script>
     </body>
 </html>
index dcb9329..50f7453 100644 (file)
@@ -10,7 +10,7 @@
         <pre id="log"></pre>
         <script>
             PerfTestRunner.measureTime({run: createFloatsLayoutTestFunction(100, 100, 100, 3),
-                runCount: 2});
+                iterationCount: 2});
         </script>
     </body>
 </html>
index 7d987f9..8b51026 100644 (file)
@@ -10,7 +10,7 @@
         <pre id="log"></pre>
         <script>
             PerfTestRunner.measureTime({run: createFloatsLayoutTestFunction(20, 100, 0, 100),
-                runCount: 7});
+                iterationCount: 7});
         </script>
     </body>
 </html>
index 3d5edb9..be0d8dc 100644 (file)
@@ -10,7 +10,7 @@
         <pre id="log"></pre>
         <script>
             PerfTestRunner.measureTime({run: createFloatsLayoutTestFunction(20, 100, 100, 100),
-                runCount: 6});
+                iterationCount: 6});
         </script>
     </body>
 </html>
index f7ddd46..a6e0bee 100644 (file)
@@ -10,7 +10,7 @@
         <pre id="log"></pre>
         <script>
             PerfTestRunner.measureTime({run: createFloatsLayoutTestFunction(2, 100, 0, 500),
-                runCount: 10});
+                iterationCount: 10});
         </script>
     </body>
 </html>
index cf659f3..b26c9e3 100644 (file)
@@ -10,7 +10,7 @@
         <pre id="log"></pre>
         <script>
             PerfTestRunner.measureTime({run: createFloatsLayoutTestFunction(2, 100, 100, 250),
-                runCount: 10});
+                iterationCount: 10});
         </script>
     </body>
 </html>
index 4022ef7..df7decb 100644 (file)
@@ -10,7 +10,7 @@
         <pre id="log"></pre>
         <script>
             PerfTestRunner.measureTime({run: createFloatsLayoutTestFunction(50, 100, 0, 20),
-                runCount: 5});
+                iterationCount: 5});
         </script>
     </body>
 </html>
index 1b34903..49bfa8a 100644 (file)
@@ -10,7 +10,7 @@
         <pre id="log"></pre>
         <script>
             PerfTestRunner.measureTime({run: createFloatsLayoutTestFunction(50, 100, 100, 20),
-                runCount: 5});
+                iterationCount: 5});
         </script>
     </body>
 </html>
index c5def51..12d0648 100644 (file)
@@ -36,7 +36,7 @@ function runTest() {
 
 buildTree();
 
-PerfTestRunner.measureTime({run: runTest, runCount: 20, description: "This benchmark checks the time spend in detaching an tree." });
+PerfTestRunner.measureTime({run: runTest, iterationCount: 20, description: "This benchmark checks the time spend in detaching an tree." });
 </script>
 </body>
 </html>
index 5b7ccad..d5fc24e 100644 (file)
@@ -6,7 +6,7 @@
 window.onload = function() {
     PerfTestRunner.measurePageLoadTime({path: "resources/html5.html",
     chunkSize: 500000, // 6.09mb / 500k = approx 13 chunks (thus 13 forced layouts/style resolves).
-    runCount: 5 }); // Depending on the chosen chunk size, iterations can take over 60s to run on a fast machine, so we only run 5.
+    iterationCount: 5 }); // Depending on the chosen chunk size, iterations can take over 60s to run on a fast machine, so we only run 5.
 }
 
 </script>
index 8f82790..eab639e 100644 (file)
         var wrapper = document.getElementById('wrapper');
         if (wrapper)
           wrapper.parentNode.removeChild(wrapper);
-      }, runCount: 10});
+      }, iterationCount: 10});
     </script>
   </body>
 </html>
index 278c176..2fb8afe 100755 (executable)
@@ -11,13 +11,13 @@ if (window.testRunner) {
 
 (function () {
     var logLines = null;
-    var completedRuns = -1;
+    var completedIterations = -1;
     var callsPerIteration = 1;
     var currentTest = null;
     var results = [];
     var jsHeapResults = [];
     var mallocHeapResults = [];
-    var runCount = undefined;
+    var iterationCount = undefined;
 
     var PerfTestRunner = {};
 
@@ -167,9 +167,9 @@ if (window.testRunner) {
             return;
         }
         currentTest = test;
-        runCount = test.runCount || 20;
+        iterationCount = test.iterationCount || 20;
         logLines = window.testRunner ? [] : null;
-        PerfTestRunner.log("Running " + runCount + " times");
+        PerfTestRunner.log("Running " + iterationCount + " times");
         if (runner)
             scheduleNextRun(runner);
     }
@@ -184,7 +184,7 @@ if (window.testRunner) {
                 return;
             }
 
-            completedRuns++;
+            completedIterations++;
 
             try {
                 ignoreWarmUpAndLog(measuredValue);
@@ -193,7 +193,7 @@ if (window.testRunner) {
                 return;
             }
 
-            if (completedRuns < runCount)
+            if (completedIterations < iterationCount)
                 scheduleNextRun(runner);
             else
                 finish();
@@ -202,7 +202,7 @@ if (window.testRunner) {
 
     function ignoreWarmUpAndLog(measuredValue) {
         var labeledResult = measuredValue + " " + PerfTestRunner.unit;
-        if (completedRuns <= 0)
+        if (completedIterations <= 0)
             PerfTestRunner.log("Ignoring warm-up run (" + labeledResult + ")");
         else {
             results.push(measuredValue);
@@ -241,7 +241,7 @@ if (window.testRunner) {
     }
 
     PerfTestRunner.measureValueAync = function (measuredValue) {
-        completedRuns++;
+        completedIterations++;
 
         try {
             ignoreWarmUpAndLog(measuredValue);
@@ -250,7 +250,7 @@ if (window.testRunner) {
             return;
         }
 
-        if (completedRuns >= runCount)
+        if (completedIterations >= iterationCount)
             finish();
     }
 
@@ -289,7 +289,7 @@ if (window.testRunner) {
         while (totalTime < timeToRun) {
             totalTime += callRunAndMeasureTime(callsPerIteration);
             numberOfRuns += callsPerIteration;
-            if (completedRuns < 0 && totalTime < 100)
+            if (completedIterations < 0 && totalTime < 100)
                 callsPerIteration = Math.max(10, 2 * callsPerIteration);
         }