-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy path500-BenchmarkAzure.sh
More file actions
executable file
·47 lines (36 loc) · 971 Bytes
/
500-BenchmarkAzure.sh
File metadata and controls
executable file
·47 lines (36 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
rclone copy -v google:fivetran-benchmark/tpcds_1000_dat azure:tpcds/tpcds_1000_dat
fivetran-benchmark.database.windows.net
fivetran
SweatshirtTV1
set -e
tempdir=`mktemp -d _work_XXXXXXXXXX`
cleanup() {
rm -rf "$tempdir" 2>/dev/null || :
}
trap cleanup TERM KILL
runName="$1"
if [ -z "$runName" ]; then
runName=`head -c 4 /dev/urandom | xxd -p`
fi
mkdir -p results
output=results/AzureResults_${runName}.csv
echo Saving output to $output
if [ -f $output ]; then
temp=`mktemp results/AzureResults${runName}_XXXXXXXXX.csv`
echo "moving previous timing run to $temp"
mv -v $output $temp
fi
echo "Warming up..."
for qu in `find microsoft_sql/ -type f -name 'warmup*.sql' | sort -V` ; do
./AzureQueryRunner.sh ddl "$qu"
done
echo 'Query,Time' > $output
for qu in `find microsoft_sql/ -type f -name 'query*.sql' | sort -V` ; do
echo "Running $qu..."
{
echo -n "$qu,"
./AzureQueryRunner.sh timing "$qu"
} >> $output
done
cleanup