Changeset 129817 in webkit
- Timestamp:
- Sep 27, 2012 4:39:09 PM (12 years ago)
- Location:
- trunk/PerformanceTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PerformanceTests/CSS/StyleSheetInsert.html
r129644 r129817 8 8 </body> 9 9 <script> 10 var frame = document.getElementsByTagName("iframe")[0]; 11 var testDoc = frame.contentDocument; 12 var docText = ""; 13 docText += "<body><style>.foo {color:red}</style>"; 14 docText += "<div class='bar'>Foo</div>"; 15 for (var i = 0; i < 10000; ++i) 16 docText += "<div class='foo'>Foo</div>"; 17 testDoc.body.innerHTML = docText; 10 11 function setup() { 12 var frame = document.getElementsByTagName("iframe")[0]; 13 var testDoc = frame.contentDocument; 14 var docText = ""; 15 docText += "<body><style>.foo {color:red}</style>"; 16 docText += "<div class='bar'>Foo</div>"; 17 for (var i = 0; i < 10000; ++i) 18 docText += "<div class='foo'>Foo</div>"; 19 testDoc.body.innerHTML = docText; 20 return testDoc; 21 } 18 22 19 23 PerfTestRunner.run(function() { 20 var styleElem = testDoc.createElement("style"); 21 styleElem.innerText = ".bar {color:green}"; 22 testDoc.body.insertBefore(styleElem, testDoc.body.firstChild); 23 }, 50, 10); 24 var testDoc = setup(); 25 var start = PerfTestRunner.now(); 26 for (var i = 0; i < 50; i++) { 27 var styleElem = testDoc.createElement("style"); 28 styleElem.innerText = ".bar {color:green}"; 29 testDoc.body.insertBefore(styleElem, testDoc.body.firstChild); 30 } 31 return PerfTestRunner.now() - start; 32 }, 1); 24 33 </script> 25 34 </html> -
trunk/PerformanceTests/ChangeLog
r129816 r129817 1 2012-09-27 Ryosuke Niwa <rniwa@webkit.org> 2 3 PerformanceTests/CSS/StyleSheetInsert.html has a time-dependent non-Gaussian distribution 4 https://bugs.webkit.org/show_bug.cgi?id=97741 5 6 Reviewed by Antti Koivisto. 7 8 Reset the content in the iframe in each run so that the runtime from each run follows a normal distribution. 9 We can cleanup this code once my patch to replace the argument list of run by an object is landed. 10 11 * CSS/StyleSheetInsert.html: 12 1 13 2012-09-27 Ryosuke Niwa <rniwa@webkit.org> 2 14
Note: See TracChangeset
for help on using the changeset viewer.