-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbenchmark_hashbuild.sh
More file actions
executable file
·45 lines (38 loc) · 1.66 KB
/
Copy pathbenchmark_hashbuild.sh
File metadata and controls
executable file
·45 lines (38 loc) · 1.66 KB
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
#!/bin/bash
cd ../hyrise
Benchmark_name='hashbuild'
rm --recursive -f ../benchmarks_hyrise/logs/${Benchmark_name}
mkdir ../benchmarks_hyrise/logs ../benchmarks_hyrise/logs/${Benchmark_name}
Benchmarks=( 'hashbuild'
'hashbuild_2cores' 'hashbuild_3cores' 'hashbuild_4cores'
#'hashbuild_shared_2cores' 'hashbuild_shared_3cores' 'hashbuild_shared_4cores'
);
Warehouse_numbers=(10000 25000 50000 100000 250000 500000 1000000);
rowCount=10000000;
for numWarehouses in ${Warehouse_numbers[@]}; do
rm ../benchmarks_hyrise/stock.tbl
let numItems=${rowCount}/${numWarehouses}
mkdir ../benchmarks_hyrise/logs/${Benchmark_name}/w${numWarehouses}i${numItems}
# generate dataset
if [ ! -f ../benchmarks_hyrise/stock_w${numWarehouses}i${numItems}.tbl ]; then
../benchmarks_hyrise/generate_dataset.sh ${numItems} ${numWarehouses}
mv ../benchmarks_hyrise/stock.tbl ../benchmarks_hyrise/stock_w${numWarehouses}i${numItems}.tbl
fi
ln -s ../benchmarks_hyrise/stock_w${numWarehouses}i${numItems}.tbl ../benchmarks_hyrise/stock.tbl
# start server
../benchmarks_hyrise/run_server.sh &
SERVER_ID=$!
sleep 5
curl -X POST --data-urlencode "query@../benchmarks_hyrise/queries/benchmark/load_table.json" http://localhost:5000/jsonQuery
for name in ${Benchmarks[@]}; do
echo ${name}
for i in 1 2 3; do
curl -X POST --data-urlencode "query@../benchmarks_hyrise/queries/benchmark/${Benchmark_name}/${name}.json" --data performance=true http://localhost:5000/jsonQuery > ../benchmarks_hyrise/logs/${Benchmark_name}/w${numWarehouses}i${numItems}/${name}_${i}.log
done
done
# kill old instance
kill -9 ${SERVER_ID}
killall hyrise-server_release
killall hyrise-server_release
sleep 5
done