Changeset 130317 in webkit
- Timestamp:
- Oct 3, 2012, 1:17:48 PM (13 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r130314 r130317 1 2012-10-03 Ojan Vafai <ojan@chromium.org> 2 3 Fix some style violations in perparation for changing this code. 4 * resources/magnitude-perf.js: 5 (Magnitude.run): 6 (Magnitude._logIterationInfo): 7 (Magnitude._runIteration): 8 1 9 2012-10-03 Dirk Pranke <dpranke@chromium.org> 2 10 -
trunk/LayoutTests/resources/magnitude-perf.js
r120450 r130317 53 53 54 54 Magnitude._magnitudes = []; 55 for (var i = 0; i < Magnitude._numPoints; i++) {55 for (var i = 0; i < Magnitude._numPoints; i++) 56 56 Magnitude._magnitudes.push(Math.pow(2, i)); 57 }58 57 59 58 var milliseconds = 50; … … 163 162 iterationsArray.push(iterations); 164 163 Magnitude._debug("magnitude: " + magnitude + " iterations: " + iterations + " runsPerIteration " + runsPerIteration + 165 164 " loop-time " + milliseconds + " time/iteration(ms): " + milliseconds / iterations); 166 165 } 167 166 … … 222 221 var iterations = 0; 223 222 if (window.chromium) { 224 // FIXME: If using microseconds turns out to be less flaky, expose microseconds 225 // from JSC or testRunner and use them. Otherwise, get rid of this block. 226 var microseconds = milliseconds * 1000; 227 var interval = new chromium.Interval(); 228 interval.start(); 229 while (interval.microseconds() < microseconds) { 230 // Loop runsPerIteration times to reduce errors due to the overhead and granularity of the Date object. 231 for (var i = 0; i < runsPerIteration; i++) { 232 test(magnitude); 233 } 234 iterations++; 235 } 236 interval.stop(); 223 // FIXME: If using microseconds turns out to be less flaky, expose microseconds 224 // from JSC or testRunner and use them. Otherwise, get rid of this block. 225 var microseconds = milliseconds * 1000; 226 var interval = new chromium.Interval(); 227 interval.start(); 228 while (interval.microseconds() < microseconds) { 229 // Loop runsPerIteration times to reduce errors due to the overhead and granularity of the Date object. 230 for (var i = 0; i < runsPerIteration; i++) 231 test(magnitude); 232 iterations++; 233 } 234 interval.stop(); 237 235 } else { 238 var start = Date.now(); 239 while (Date.now() - start < milliseconds) { 240 // Loop runsPerIteration times to reduce errors due to the overhead and granularity of the Date object. 241 for (var i = 0; i < runsPerIteration; i++) { 242 test(magnitude); 243 } 244 iterations++; 245 } 236 var start = Date.now(); 237 while (Date.now() - start < milliseconds) { 238 // Loop runsPerIteration times to reduce errors due to the overhead and granularity of the Date object. 239 for (var i = 0; i < runsPerIteration; i++) 240 test(magnitude); 241 iterations++; 242 } 246 243 } 247 244 return iterations;
Note:
See TracChangeset
for help on using the changeset viewer.