Title: [130317] trunk/LayoutTests
Revision
130317
Author
o...@chromium.org
Date
2012-10-03 13:17:48 -0700 (Wed, 03 Oct 2012)

Log Message

Fix some style violations in perparation for changing this code.
* resources/magnitude-perf.js:
(Magnitude.run):
(Magnitude._logIterationInfo):
(Magnitude._runIteration):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (130316 => 130317)


--- trunk/LayoutTests/ChangeLog	2012-10-03 20:09:18 UTC (rev 130316)
+++ trunk/LayoutTests/ChangeLog	2012-10-03 20:17:48 UTC (rev 130317)
@@ -1,3 +1,11 @@
+2012-10-03  Ojan Vafai  <o...@chromium.org>
+
+        Fix some style violations in perparation for changing this code.
+        * resources/magnitude-perf.js:
+        (Magnitude.run):
+        (Magnitude._logIterationInfo):
+        (Magnitude._runIteration):
+
 2012-10-03  Dirk Pranke  <dpra...@chromium.org>
 
         Mark platform/chromium/virtual/gpu/fast/canvas/getPutImageDataPairTest.html as slow on Mac Lion Release

Modified: trunk/LayoutTests/resources/magnitude-perf.js (130316 => 130317)


--- trunk/LayoutTests/resources/magnitude-perf.js	2012-10-03 20:09:18 UTC (rev 130316)
+++ trunk/LayoutTests/resources/magnitude-perf.js	2012-10-03 20:17:48 UTC (rev 130317)
@@ -52,9 +52,8 @@
     Magnitude._debugLog = "\nDEBUG LOG:\n";
 
     Magnitude._magnitudes = [];
-    for (var i = 0; i < Magnitude._numPoints; i++) {
+    for (var i = 0; i < Magnitude._numPoints; i++)
         Magnitude._magnitudes.push(Math.pow(2, i));
-    }
 
     var milliseconds = 50;
     var runsPerIteration = 1;
@@ -162,7 +161,7 @@
         var iterations = Magnitude._iterations[magnitude];
         iterationsArray.push(iterations);
         Magnitude._debug("magnitude: " + magnitude + " iterations: " + iterations + " runsPerIteration " + runsPerIteration +
-                " loop-time " + milliseconds + " time/iteration(ms): " + milliseconds / iterations);
+            " loop-time " + milliseconds + " time/iteration(ms): " + milliseconds / iterations);
     }
 
     // Print out the magnitudes/arrays in CSV to afford easy copy-paste to a charting application.
@@ -221,28 +220,26 @@
 
     var iterations = 0;
     if (window.chromium) {
-      // FIXME: If using microseconds turns out to be less flaky, expose microseconds
-      // from JSC or testRunner and use them. Otherwise, get rid of this block.
-      var microseconds = milliseconds * 1000;
-      var interval = new chromium.Interval();
-      interval.start();
-      while (interval.microseconds() < microseconds) {
-          // Loop runsPerIteration times to reduce errors due to the overhead and granularity of the Date object.
-          for (var i = 0; i < runsPerIteration; i++) {
-              test(magnitude);
-          }
-          iterations++;
-      }
-      interval.stop();
+        // FIXME: If using microseconds turns out to be less flaky, expose microseconds
+        // from JSC or testRunner and use them. Otherwise, get rid of this block.
+        var microseconds = milliseconds * 1000;
+        var interval = new chromium.Interval();
+        interval.start();
+        while (interval.microseconds() < microseconds) {
+            // Loop runsPerIteration times to reduce errors due to the overhead and granularity of the Date object.
+            for (var i = 0; i < runsPerIteration; i++)
+                test(magnitude);
+            iterations++;
+        }
+        interval.stop();
     } else {
-      var start = Date.now();
-      while (Date.now() - start < milliseconds) {
-          // Loop runsPerIteration times to reduce errors due to the overhead and granularity of the Date object.
-          for (var i = 0; i < runsPerIteration; i++) {
-              test(magnitude);
-          }
-          iterations++;
-      }
+        var start = Date.now();
+        while (Date.now() - start < milliseconds) {
+            // Loop runsPerIteration times to reduce errors due to the overhead and granularity of the Date object.
+            for (var i = 0; i < runsPerIteration; i++)
+                test(magnitude);
+            iterations++;
+        }
     }
     return iterations;
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to