Skip to content

Commit

Permalink
Added ability to specify scale.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carter Shanklin committed Nov 3, 2014
1 parent 517ad74 commit 51be6d5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions runSuite.pl
Expand Up @@ -12,8 +12,9 @@
my $SCRIPT_PATH = dirname( __FILE__ );

# MAIN
dieWithUsage("one or more parameters not defined") unless @ARGV == 1;
dieWithUsage("one or more parameters not defined") unless @ARGV >= 1;
my $suite = shift;
my $scale = shift || 2;
dieWithUsage("suite name required") unless $suite eq "tpcds" or $suite eq "tpch";

chdir $SCRIPT_PATH;
Expand All @@ -25,8 +26,8 @@
my @queries = glob '*.sql';

my $db = {
'tpcds' => 'tpcds_bin_partitioned_orc_2',
'tpch' => 'tpch_flat_orc_2'
'tpcds' => "tpcds_bin_partitioned_orc_$scale",
'tpch' => "tpch_flat_orc_$scale"
};

print "filename,status,time,rows\n";
Expand Down Expand Up @@ -65,10 +66,10 @@ (;$)

print STDERR <<USAGE;
${err}Usage:
perl ${SCRIPT_NAME} [tpcds|tpch]
perl ${SCRIPT_NAME} [tpcds|tpch] [scale]
Description:
This script runs the sample queries and outputs a CSV file of the time it took each query to run. Also, all hive output is kept as a log file named 'queryXX.sql.log' for each query file of the form 'queryXX.sql'.
This script runs the sample queries and outputs a CSV file of the time it took each query to run. Also, all hive output is kept as a log file named 'queryXX.sql.log' for each query file of the form 'queryXX.sql'. Defaults to scale of 2.
USAGE
exit 1;
}
Expand Down

0 comments on commit 51be6d5

Please sign in to comment.