Changeset 100313 in webkit


Ignore:
Timestamp:
Nov 15, 2011 1:03:52 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Extend sunspider driver to be able to run kraken
https://bugs.webkit.org/show_bug.cgi?id=71799

Patch by Andy Wingo <wingo@igalia.com> on 2011-11-15
Reviewed by Filip Pizlo.

  • resources/sunspider-standalone-driver.js: Try to load a -data

file. If that succeeds, we have a kraken-like test, so we time
the test using load'. Otherwise fall back to using run'.

Location:
trunk/PerformanceTests/SunSpider
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/SunSpider/ChangeLog

    r92902 r100313  
     12011-11-15  Andy Wingo  <wingo@igalia.com>
     2
     3        Extend sunspider driver to be able to run kraken
     4        https://bugs.webkit.org/show_bug.cgi?id=71799
     5
     6        Reviewed by Filip Pizlo.
     7
     8        * resources/sunspider-standalone-driver.js: Try to load a -data
     9        file.  If that succeeds, we have a kraken-like test, so we time
     10        the test using `load'.  Otherwise fall back to using `run'.
     11
    1122011-08-11  Mark Rowe  <mrowe@apple.com>
    213
  • trunk/PerformanceTests/SunSpider/resources/sunspider-standalone-driver.js

    r72842 r100313  
    3333
    3434for (var j = 0; j < tests.length; j++) {
    35     var testName = suitePath + "/" + tests[j] + ".js";
    36     var startTime = new Date;
    37     if (testName.indexOf('parse-only') >= 0)
     35    var testBase = suitePath + "/" + tests[j];
     36    var testName = testBase + ".js";
     37    var testData = testBase + "-data.js";
     38
     39    if (testName.indexOf('parse-only') >= 0) {
    3840        times[j] = checkSyntax(testName);
    39     else
    40         times[j] = run(testName);
     41    } else {
     42        // Tests may or may not have associated -data files whose loading
     43        // should not be timed.
     44        try {
     45            load(testData);
     46            // If a file does have test data, then we can't use the
     47            // higher-precision `run' timer, because `run' uses a fresh
     48            // global environment, so we fall back to `load'.
     49            var startTime = new Date;
     50            load(testName);
     51            times[j] = new Date() - startTime;
     52        } catch (e) {
     53            // No test data, just use `run'.
     54            times[j] = run(testName);
     55        }
     56    }
    4157    gc();
    4258}
Note: See TracChangeset for help on using the changeset viewer.