Title: [117001] trunk/PerformanceTests
Revision
117001
Author
[email protected]
Date
2012-05-14 14:19:51 -0700 (Mon, 14 May 2012)

Log Message

Convert CSS and Parser tests to runs/s tests
https://bugs.webkit.org/show_bug.cgi?id=86399

Reviewed by Ojan Vafai.

Use runPerSecond instead of run to measure results in function calls per second (run/s) instead of time (ms).
This allows us to continue measuring performance reliably even when WebKit's performance improves and results
become too small for Date.now()'s precision (around 15 ms).

It should also reduce perf. bots cycle time for slower tests because we limit the number of function calls by time.

* CSS/CSSPropertySetterGetter.html:
* CSS/CSSPropertyUpdateValue.html:
* Parser/css-parser-yui.html:
* Parser/simple-url.html:
* Parser/tiny-innerHTML.html:
* Parser/url-parser.html:
* Parser/xml-parser.html:

Modified Paths

Diff

Modified: trunk/PerformanceTests/CSS/CSSPropertySetterGetter.html (117000 => 117001)


--- trunk/PerformanceTests/CSS/CSSPropertySetterGetter.html	2012-05-14 21:17:42 UTC (rev 117000)
+++ trunk/PerformanceTests/CSS/CSSPropertySetterGetter.html	2012-05-14 21:19:51 UTC (rev 117001)
@@ -71,12 +71,12 @@
 'webkitTransform' : 'scale3d(0.5, 0.5, 0.5)',
 'wordSpacing' : '40px',
 };
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
     for (key in properties) {
         var value = div.style[key];
         div.style[key] = "";
         div.style[key] = properties[key];
     }
-}, 5000);
+}});
 </script>
 </html>

Modified: trunk/PerformanceTests/CSS/CSSPropertyUpdateValue.html (117000 => 117001)


--- trunk/PerformanceTests/CSS/CSSPropertyUpdateValue.html	2012-05-14 21:17:42 UTC (rev 117000)
+++ trunk/PerformanceTests/CSS/CSSPropertyUpdateValue.html	2012-05-14 21:19:51 UTC (rev 117001)
@@ -72,9 +72,9 @@
 'wordSpacing' : '40px',
 };
 // The first run will just add the properties but it's fine as the first run of the benchmark is always ignored.
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
     for (key in properties)
         div.style[key] = properties[key];
-}, 10000);
+}});
 </script>
 </html>

Modified: trunk/PerformanceTests/ChangeLog (117000 => 117001)


--- trunk/PerformanceTests/ChangeLog	2012-05-14 21:17:42 UTC (rev 117000)
+++ trunk/PerformanceTests/ChangeLog	2012-05-14 21:19:51 UTC (rev 117001)
@@ -1,3 +1,24 @@
+2012-05-14  Ryosuke Niwa  <[email protected]>
+
+        Convert CSS and Parser tests to runs/s tests
+        https://bugs.webkit.org/show_bug.cgi?id=86399
+
+        Reviewed by Ojan Vafai.
+
+        Use runPerSecond instead of run to measure results in function calls per second (run/s) instead of time (ms).
+        This allows us to continue measuring performance reliably even when WebKit's performance improves and results
+        become too small for Date.now()'s precision (around 15 ms).
+
+        It should also reduce perf. bots cycle time for slower tests because we limit the number of function calls by time.
+
+        * CSS/CSSPropertySetterGetter.html:
+        * CSS/CSSPropertyUpdateValue.html:
+        * Parser/css-parser-yui.html:
+        * Parser/simple-url.html:
+        * Parser/tiny-innerHTML.html:
+        * Parser/url-parser.html:
+        * Parser/xml-parser.html:
+
 2012-05-14  Dan Bernstein  <[email protected]>
 
         Add a line layout performance test

Modified: trunk/PerformanceTests/Parser/css-parser-yui.html (117000 => 117001)


--- trunk/PerformanceTests/Parser/css-parser-yui.html	2012-05-14 21:17:42 UTC (rev 117000)
+++ trunk/PerformanceTests/Parser/css-parser-yui.html	2012-05-14 21:19:51 UTC (rev 117001)
@@ -2619,11 +2619,11 @@
 var element = document.getElementById("styleElement");
 var cssText = element.textContent;
 var count = 0;
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
     element.textContent = "";
     element.textContent = cssText + "#some" + count + "{color:black};";
     count++;
-}, 100);
+}});
 
 </script>
 </body>

Modified: trunk/PerformanceTests/Parser/simple-url.html (117000 => 117001)


--- trunk/PerformanceTests/Parser/simple-url.html	2012-05-14 21:17:42 UTC (rev 117000)
+++ trunk/PerformanceTests/Parser/simple-url.html	2012-05-14 21:19:51 UTC (rev 117001)
@@ -3,10 +3,10 @@
 <script src=""
 <script>
 var anchor = document.createElement("a");
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
     for (var x = 0; x < 200000; x++) {
         anchor.href = ""
     }
-});
+}});
 </script>
 </body>

Modified: trunk/PerformanceTests/Parser/tiny-innerHTML.html (117000 => 117001)


--- trunk/PerformanceTests/Parser/tiny-innerHTML.html	2012-05-14 21:17:42 UTC (rev 117000)
+++ trunk/PerformanceTests/Parser/tiny-innerHTML.html	2012-05-14 21:19:51 UTC (rev 117001)
@@ -2,7 +2,7 @@
 <body>
 <script src=""
 <script>
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
     var testDiv = document.createElement("div");
     testDiv.style.display = "none";
     document.body.appendChild(testDiv);
@@ -10,6 +10,6 @@
         testDiv.innerHTML = "This is a tiny HTML document";
     }
     document.body.removeChild(testDiv);
-});
+}});
 </script>
 </body>

Modified: trunk/PerformanceTests/Parser/url-parser.html (117000 => 117001)


--- trunk/PerformanceTests/Parser/url-parser.html	2012-05-14 21:17:42 UTC (rev 117000)
+++ trunk/PerformanceTests/Parser/url-parser.html	2012-05-14 21:19:51 UTC (rev 117001)
@@ -5,10 +5,10 @@
 var urls = PerfTestRunner.loadFile("resources/final-url-en").split("\n");
 var anchor = document.createElement("a");
 
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
     for (var x = 0; x < urls.length; x++) {
         anchor.href = ""
     }
-});
+}});
 </script>
 </body>

Modified: trunk/PerformanceTests/Parser/xml-parser.html (117000 => 117001)


--- trunk/PerformanceTests/Parser/xml-parser.html	2012-05-14 21:17:42 UTC (rev 117000)
+++ trunk/PerformanceTests/Parser/xml-parser.html	2012-05-14 21:19:51 UTC (rev 117001)
@@ -11,8 +11,8 @@
 xmlArray.push('</root>')
 var xmlData = xmlArray.join('');
 
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
     domParser.parseFromString(xmlData, "text/xml");
-});
+}});
 </script>
 </body>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to