Skip to content
Permalink
Browse files
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'.

Canonical link: https://commits.webkit.org/88857@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
wingo authored and webkit-commit-queue committed Nov 15, 2011
1 parent 6809f0a commit 701d7d2415775a8633876b1986b8a9336cd00e75
Showing 2 changed files with 32 additions and 5 deletions.
@@ -1,3 +1,14 @@
2011-11-15 Andy Wingo <wingo@igalia.com>

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

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'.

2011-08-11 Mark Rowe <mrowe@apple.com>

Fix sunspider-compare-results to default to the same suite version as the sunspider script.
@@ -32,12 +32,28 @@ var times = [];
times.length = tests.length;

for (var j = 0; j < tests.length; j++) {
var testName = suitePath + "/" + tests[j] + ".js";
var startTime = new Date;
if (testName.indexOf('parse-only') >= 0)
var testBase = suitePath + "/" + tests[j];
var testName = testBase + ".js";
var testData = testBase + "-data.js";

if (testName.indexOf('parse-only') >= 0) {
times[j] = checkSyntax(testName);
else
times[j] = run(testName);
} else {
// Tests may or may not have associated -data files whose loading
// should not be timed.
try {
load(testData);
// If a file does have test data, then we can't use the
// higher-precision `run' timer, because `run' uses a fresh
// global environment, so we fall back to `load'.
var startTime = new Date;
load(testName);
times[j] = new Date() - startTime;
} catch (e) {
// No test data, just use `run'.
times[j] = run(testName);
}
}
gc();
}

0 comments on commit 701d7d2

Please sign in to comment.