Changeset 221044 in webkit


Ignore:
Timestamp:
Aug 22, 2017 2:00:49 PM (7 years ago)
Author:
rniwa@webkit.org
Message:

Speedometer 2.0: Make it possible to change the iteration count via query string
https://bugs.webkit.org/show_bug.cgi?id=175811

Reviewed by Saam Barati.

Added the support for specifying the iteration count by "iterationCount" query parameter, and replaced "ms"
query parameter by "unit=ms".

Finally, reduced the number of iterations from 20 to 10 to reduce the time needed to run the benchmark
since Speedometer 2.0 contains more than twice the number of libraries and frameworks than Speedometer 1.0.

  • Speedometer/resources/main.js:

(window.benchmarkClient.didFinishLastIteration):
(startBenchmark):

Location:
trunk/PerformanceTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r221042 r221044  
     12017-08-22  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Speedometer 2.0: Make it possible to change the iteration count via query string
     4        https://bugs.webkit.org/show_bug.cgi?id=175811
     5
     6        Reviewed by Saam Barati.
     7
     8        Added the support for specifying the iteration count by "iterationCount" query parameter, and replaced "ms"
     9        query parameter by "unit=ms".
     10
     11        Finally, reduced the number of iterations from 20 to 10 to reduce the time needed to run the benchmark
     12        since Speedometer 2.0 contains more than twice the number of libraries and frameworks than Speedometer 1.0.
     13
     14        * Speedometer/resources/main.js:
     15        (window.benchmarkClient.didFinishLastIteration):
     16        (startBenchmark):
     17
    1182017-08-22  Mathias Bynens  <mathias@qiwi.be>
    219
  • trunk/PerformanceTests/Speedometer/resources/main.js

    r183695 r221044  
    11window.benchmarkClient = {
    2     iterationCount: 20,
     2    displayUnit: 'runs/min',
     3    iterationCount: 10,
    34    testsCount: null,
    45    suitesCount: null,
     
    3132        document.getElementById('logo-link').onclick = null;
    3233
    33         var displayUnit = location.search == '?ms' || location.hash == '#ms' ? 'ms' : 'runs/min';
    34         var results = this._computeResults(this._timeValues, displayUnit);
     34        var results = this._computeResults(this._timeValues, this.displayUnit);
    3535
    3636        this._updateGaugeNeedle(results.mean);
     
    4242        document.getElementById('results-with-statistics').textContent = results.formattedMeanAndDelta;
    4343
    44         if (displayUnit == 'ms') {
     44        if (this.displayUnit == 'ms') {
    4545            document.getElementById('show-summary').style.display = 'none';
    4646            showResultDetails();
     
    151151
    152152function startBenchmark() {
     153    if (location.search.length > 1) {
     154        var parts = location.search.substring(1).split('&');
     155        for (var i = 0; i < parts.length; i++) {
     156            var keyValue = parts[i].split('=');
     157            var key = keyValue[0];
     158            var value = keyValue[1];
     159            switch (key) {
     160            case 'unit':
     161                if (value == 'ms')
     162                    benchmarkClient.displayUnit = 'ms';
     163                else
     164                    console.error('Invalid unit: ' + value);
     165                break;
     166            case 'iterationCount':
     167                var parsedValue = parseInt(value);
     168                if (!isNaN(value))
     169                    benchmarkClient.iterationCount = parsedValue;
     170                else
     171                    console.error('Invalid iteration count: ' + value);
     172                break;
     173            }
     174        }
     175    }
     176
    153177    var enabledSuites = Suites.filter(function (suite) { return !suite.disabled });
    154178    var totalSubtestCount = enabledSuites.reduce(function (testsCount, suite) { return testsCount + suite.tests.length; }, 0);
Note: See TracChangeset for help on using the changeset viewer.