Changeset 65940 in webkit
- Timestamp:
- Aug 24, 2010 3:22:14 PM (14 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r65939 r65940 1 2010-08-24 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Tony Chang. 4 5 perf tests are flaky 6 https://bugs.webkit.org/show_bug.cgi?id=44199 7 8 Speculative fix for perf test flakiness. Use chromium.Interval 9 to get a microsecond granularity timer. If this does end up 10 reducing flakiness, then we can expose something similar for 11 JSC and/or layoutTestController. 12 13 * resources/magnitude-perf.js: 14 (Magnitude._runIteration): 15 (Magnitude): 16 1 17 2010-08-24 Pavel Podivilov <podivilov@chromium.org> 2 18 -
trunk/LayoutTests/resources/magnitude-perf.js
r65614 r65940 204 204 setup(magnitude); 205 205 206 var start = Date.now();207 206 var iterations = 0; 208 while (Date.now() - start < milliseconds) { 209 // Loop runsPerIteration times to reduce errors due to the overhead and granularity of the Date object. 210 for (var i = 0; i < runsPerIteration; i++) { 211 test(magnitude); 212 } 213 iterations++; 207 if (window.chromium) { 208 // FIXME: If using microseconds turns out to be less flaky, expose microseconds 209 // from JSC or layoutTestController and use them. Otherwise, get rid of this block. 210 var microseconds = milliseconds * 1000; 211 var interval = new chromium.Interval(); 212 interval.start(); 213 while (interval.microseconds() < microseconds) { 214 // Loop runsPerIteration times to reduce errors due to the overhead and granularity of the Date object. 215 for (var i = 0; i < runsPerIteration; i++) { 216 test(magnitude); 217 } 218 iterations++; 219 } 220 interval.stop(); 221 } else { 222 var start = Date.now(); 223 while (Date.now() - start < milliseconds) { 224 // Loop runsPerIteration times to reduce errors due to the overhead and granularity of the Date object. 225 for (var i = 0; i < runsPerIteration; i++) { 226 test(magnitude); 227 } 228 iterations++; 229 } 214 230 } 215 231 return iterations;
Note: See TracChangeset
for help on using the changeset viewer.