|
|
@@ -12,8 +12,9 @@ my $SCRIPT_NAME = basename( __FILE__ );
|
|
|
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;
|
|
|
@@ -25,8 +26,8 @@ if( $suite eq 'tpcds' ) {
|
|
|
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";
|
|
|
@@ -65,10 +66,10 @@ sub dieWithUsage(;$) {
|
|
|
|
|
|
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;
|
|
|
}
|