summaryrefslogtreecommitdiffstats
path: root/SunSpider/sunspider
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-08-11 17:01:47 +0100
committerBen Murdoch <benm@google.com>2009-08-11 18:21:02 +0100
commit0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch)
tree2943df35f62d885c89d01063cc528dd73b480fea /SunSpider/sunspider
parent7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff)
downloadexternal_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2
Merge in WebKit r47029.
Diffstat (limited to 'SunSpider/sunspider')
-rwxr-xr-xSunSpider/sunspider19
1 files changed, 14 insertions, 5 deletions
diff --git a/SunSpider/sunspider b/SunSpider/sunspider
index 84375f3..635d093 100755
--- a/SunSpider/sunspider
+++ b/SunSpider/sunspider
@@ -38,6 +38,7 @@ my $runShark20 = 0;
my $runSharkCache = 0;
my $ubench = 0;
my $v8suite = 0;
+my $parseonly = 0;
my $jsShellPath;
my $jsShellArgs = "";
my $setBaseline = 0;
@@ -58,6 +59,7 @@ Usage: $programName --shell=[path] [options]
--shark-cache Like --shark, but performs a L2 cache-miss sample instead of time sample
--ubench Use microbenchmark suite instead of regular tests (to check for core execution regressions)
--v8-suite Use the V8 benchmark suite
+ --parse-only Use the parse-only benchmark suite
EOF
GetOptions('runs=i' => \$testRuns,
@@ -69,9 +71,15 @@ GetOptions('runs=i' => \$testRuns,
'shark-cache' => \$runSharkCache,
'ubench' => \$ubench,
'v8-suite' => \$v8suite,
+ 'parse-only' => \$parseonly,
'tests=s' => \$testsPattern,
'help' => \$showHelp);
+my $resultDirectory = "sunspider-results";
+$resultDirectory = "ubench-results" if ($ubench);
+$resultDirectory = "v8-results" if ($v8suite);
+$resultDirectory = "parse-only-results" if ($parseonly);
+
$runShark = 1 if $runSharkCache;
$runShark = 20 if $runShark20;
$testRuns = 1 if $runShark;
@@ -118,6 +126,7 @@ sub loadTestsList()
my $testlist = "LIST";
$testlist = "LIST-UBENCH" if ($ubench);
$testlist = "LIST-V8" if ($v8suite);
+ $testlist = "LIST-PARSE-ONLY" if ($parseonly);
open TESTLIST, "<", "tests/${testlist}" or die "Can't find ./tests/${testlist}";
while (<TESTLIST>) {
@@ -136,15 +145,15 @@ sub loadTestsList()
}
my $timeString = strftime "%Y-%m-%d-%H.%M.%S", localtime $^T;
-my $prefixFile = "tmp/sunspider-test-prefix.js";
-my $resultsFile = "tmp/sunspider-results-$timeString.js";
+my $prefixFile = "$resultDirectory/sunspider-test-prefix.js";
+my $resultsFile = "$resultDirectory/sunspider-results-$timeString.js";
sub writePrefixFile()
{
my $prefix = "var tests = [ " . join(", ", map { '"' . $_ . '"' } @tests) . " ];\n";
$prefix .= "var categories = [ " . join(", ", map { '"' . $_ . '"' } @categories) . " ];\n";
- mkdir "tmp";
+ mkdir "$resultDirectory";
dumpToFile($prefix, $prefixFile);
}
@@ -214,14 +223,14 @@ print "]\n";
my $output = "var output = [\n" . join(",\n", @results) . "\n];\n";
dumpToFile($output, $resultsFile);
-dumpToFile(File::Spec->rel2abs($resultsFile), "tmp/baseline-filename.txt") if $setBaseline;
+dumpToFile(File::Spec->rel2abs($resultsFile), "$resultDirectory/baseline-filename.txt") if $setBaseline;
system("$jsShellPath", "-f", $prefixFile, "-f", $resultsFile, "-f", "resources/sunspider-analyze-results.js");
if ($runShark) {
my $newestMShark = newestFile(".", qr/\.mshark$/);
if ($newestMShark) {
- my $profileFile = "tmp/sunspider-profile-$timeString.mshark";
+ my $profileFile = "$resultDirectory/sunspider-profile-$timeString.mshark";
rename $newestMShark, $profileFile or die;
exec "/usr/bin/open", $profileFile;
}