Changeset 117001 in webkit


Ignore:
Timestamp:
May 14, 2012 2:19:51 PM (12 years ago)
Author:
rniwa@webkit.org
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:
Location:
trunk/PerformanceTests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/CSS/CSSPropertySetterGetter.html

    r110862 r117001  
    7272'wordSpacing' : '40px',
    7373};
    74 PerfTestRunner.run(function() {
     74PerfTestRunner.runPerSecond({run:function() {
    7575    for (key in properties) {
    7676        var value = div.style[key];
     
    7878        div.style[key] = properties[key];
    7979    }
    80 }, 5000);
     80}});
    8181</script>
    8282</html>
  • trunk/PerformanceTests/CSS/CSSPropertyUpdateValue.html

    r112253 r117001  
    7373};
    7474// The first run will just add the properties but it's fine as the first run of the benchmark is always ignored.
    75 PerfTestRunner.run(function() {
     75PerfTestRunner.runPerSecond({run:function() {
    7676    for (key in properties)
    7777        div.style[key] = properties[key];
    78 }, 10000);
     78}});
    7979</script>
    8080</html>
  • trunk/PerformanceTests/ChangeLog

    r116989 r117001  
     12012-05-14  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Convert CSS and Parser tests to runs/s tests
     4        https://bugs.webkit.org/show_bug.cgi?id=86399
     5
     6        Reviewed by Ojan Vafai.
     7
     8        Use runPerSecond instead of run to measure results in function calls per second (run/s) instead of time (ms).
     9        This allows us to continue measuring performance reliably even when WebKit's performance improves and results
     10        become too small for Date.now()'s precision (around 15 ms).
     11
     12        It should also reduce perf. bots cycle time for slower tests because we limit the number of function calls by time.
     13
     14        * CSS/CSSPropertySetterGetter.html:
     15        * CSS/CSSPropertyUpdateValue.html:
     16        * Parser/css-parser-yui.html:
     17        * Parser/simple-url.html:
     18        * Parser/tiny-innerHTML.html:
     19        * Parser/url-parser.html:
     20        * Parser/xml-parser.html:
     21
    1222012-05-14  Dan Bernstein  <mitz@apple.com>
    223
  • trunk/PerformanceTests/Parser/css-parser-yui.html

    r107964 r117001  
    26202620var cssText = element.textContent;
    26212621var count = 0;
    2622 PerfTestRunner.run(function() {
     2622PerfTestRunner.runPerSecond({run:function() {
    26232623    element.textContent = "";
    26242624    element.textContent = cssText + "#some" + count + "{color:black};";
    26252625    count++;
    2626 }, 100);
     2626}});
    26272627
    26282628</script>
  • trunk/PerformanceTests/Parser/simple-url.html

    r106386 r117001  
    44<script>
    55var anchor = document.createElement("a");
    6 PerfTestRunner.run(function() {
     6PerfTestRunner.runPerSecond({run:function() {
    77    for (var x = 0; x < 200000; x++) {
    88        anchor.href = "http://www.apple.com/"
    99    }
    10 });
     10}});
    1111</script>
    1212</body>
  • trunk/PerformanceTests/Parser/tiny-innerHTML.html

    r106386 r117001  
    33<script src="../resources/runner.js"></script>
    44<script>
    5 PerfTestRunner.run(function() {
     5PerfTestRunner.runPerSecond({run:function() {
    66    var testDiv = document.createElement("div");
    77    testDiv.style.display = "none";
     
    1111    }
    1212    document.body.removeChild(testDiv);
    13 });
     13}});
    1414</script>
    1515</body>
  • trunk/PerformanceTests/Parser/url-parser.html

    r106386 r117001  
    66var anchor = document.createElement("a");
    77
    8 PerfTestRunner.run(function() {
     8PerfTestRunner.runPerSecond({run:function() {
    99    for (var x = 0; x < urls.length; x++) {
    1010        anchor.href = urls[x];
    1111    }
    12 });
     12}});
    1313</script>
    1414</body>
  • trunk/PerformanceTests/Parser/xml-parser.html

    r106386 r117001  
    1212var xmlData = xmlArray.join('');
    1313
    14 PerfTestRunner.run(function() {
     14PerfTestRunner.runPerSecond({run:function() {
    1515    domParser.parseFromString(xmlData, "text/xml");
    16 });
     16}});
    1717</script>
    1818</body>
Note: See TracChangeset for help on using the changeset viewer.