Changeset 227850 in webkit


Ignore:
Timestamp:
Jan 30, 2018 2:08:11 PM (6 years ago)
Author:
Antti Koivisto
Message:

StyleBench: Generate more mutation steps
https://bugs.webkit.org/show_bug.cgi?id=182291

Reviewed by Ryosuke Niwa.

The test should be doing multiple rounds of mutations in a single document to test what is supposed to test (like it did before r227756).
This also makes test results more stable and less dependent on possible first-time costs.

  • StyleBench/resources/benchmark-runner.js:

Adjust correctionFactor to match the new steps count. With 1.5 Firefox is ~72rpm.

  • StyleBench/resources/tests.js:

(makeSteps):

Generate 10 rounds of class/element mutation steps.
Give each generated step unique name so reporting works.
Make individual steps do fewer mutations.

Location:
trunk/PerformanceTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r227769 r227850  
     12018-01-30  Antti Koivisto  <antti@apple.com>
     2
     3        StyleBench: Generate more mutation steps
     4        https://bugs.webkit.org/show_bug.cgi?id=182291
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        The test should be doing multiple rounds of mutations in a single document to test what is supposed to test (like it did before r227756).
     9        This also makes test results more stable and less dependent on possible first-time costs.
     10
     11        * StyleBench/resources/benchmark-runner.js:
     12
     13        Adjust correctionFactor to match the new steps count. With 1.5 Firefox is ~72rpm.
     14
     15        * StyleBench/resources/tests.js:
     16        (makeSteps):
     17
     18        Generate 10 rounds of class/element mutation steps.
     19        Give each generated step unique name so reporting works.
     20        Make individual steps do fewer mutations.
     21
    1222018-01-29  Antti Koivisto  <antti@apple.com>
    223
  • trunk/PerformanceTests/StyleBench/resources/benchmark-runner.js

    r227756 r227850  
    287287        var geomean = Math.pow(product, 1 / values.length);
    288288
    289         var correctionFactor = 8; // This factor makes the test score look reasonably fit within 0 to 140.
     289        var correctionFactor = 1.5; // This factor makes the test score look reasonably fit within 0 to 140.
    290290        this._measuredValues.total = total;
    291291        this._measuredValues.mean = total / values.length;
  • trunk/PerformanceTests/StyleBench/resources/tests.js

    r227756 r227850  
    22{
    33    const steps = [];
    4     steps.push(new BenchmarkTestStep('Adding classes', (bench, contentWindow, contentDocument) => {
    5         bench.addClasses(100);
    6     }));
    7     steps.push(new BenchmarkTestStep('Removing classes', (bench, contentWindow, contentDocument) => {
    8         bench.removeClasses(100);
    9     }));
    10     steps.push(new BenchmarkTestStep('Adding leaf elements', (bench, contentWindow, contentDocument) => {
    11         bench.addLeafElements(100);
    12     }));
    13     steps.push(new BenchmarkTestStep('Removing leaf elements', (bench, contentWindow, contentDocument) => {
    14         bench.removeLeafElements(100);
    15     }));
     4    for (i = 1; i <= count; ++i) {
     5        steps.push(new BenchmarkTestStep(`Adding classes - ${i}`, (bench, contentWindow, contentDocument) => {
     6            bench.addClasses(25);
     7        }));
     8        steps.push(new BenchmarkTestStep(`Removing classes - ${i}`, (bench, contentWindow, contentDocument) => {
     9            bench.removeClasses(25);
     10        }));
     11        steps.push(new BenchmarkTestStep(`Adding leaf elements - ${i}`, (bench, contentWindow, contentDocument) => {
     12            bench.addLeafElements(25);
     13        }));
     14        steps.push(new BenchmarkTestStep(`Removing leaf elements - ${i}`, (bench, contentWindow, contentDocument) => {
     15            bench.removeLeafElements(25);
     16        }));
     17    }
    1618    return steps;
    1719}
     
    2729            });
    2830        },
    29         tests: makeSteps(),
     31        tests: makeSteps(10),
    3032    };
    3133}
Note: See TracChangeset for help on using the changeset viewer.