-
Notifications
You must be signed in to change notification settings - Fork 4
/
lab6-extension.sh
executable file
·44 lines (37 loc) · 2.07 KB
/
lab6-extension.sh
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
#! /bin/bash
rm conf/workers.conf
cp ./worker_files/one_worker.conf ./conf/workers.conf
SELECTION_TIME="$(./bin/startSimpleDB.sh etc/imdb.schema -f ./queries/selection_query.txt | grep "seconds")"
JOIN_TIME="$(./bin/startSimpleDB.sh etc/imdb.schema -f ./queries/join_query.txt |grep "seconds")"
AGG_TIME="$(./bin/startSimpleDB.sh etc/imdb.schema -f ./queries/agg_query.txt | grep "seconds")"
echo "=== One Worker ==="
echo "Selection Query Time: $SELECTION_TIME"
echo "Join Query Time: $JOIN_TIME"
echo "Aggerate Query Time: $AGG_TIME"
rm conf/workers.conf
cp ./worker_files/two_worker.conf ./conf/workers.conf
SELECTION_TIME="$(./bin/startSimpleDB.sh etc/imdb.schema -f ./queries/selection_query.txt | grep "seconds")"
JOIN_TIME="$(./bin/startSimpleDB.sh etc/imdb.schema -f ./queries/join_query.txt |grep "seconds")"
AGG_TIME="$(./bin/startSimpleDB.sh etc/imdb.schema -f ./queries/agg_query.txt | grep "seconds")"
echo "=== Two Workers ==="
echo "Selection Query Time: $SELECTION_TIME"
echo "Join Query Time: $JOIN_TIME"
echo "Aggerate Query Time: $AGG_TIME"
rm conf/workers.conf
cp ./worker_files/four_worker.conf ./conf/workers.conf
SELECTION_TIME="$(./bin/startSimpleDB.sh etc/imdb.schema -f ./queries/selection_query.txt | grep "seconds")"
JOIN_TIME="$(./bin/startSimpleDB.sh etc/imdb.schema -f ./queries/join_query.txt |grep "seconds")"
AGG_TIME="$(./bin/startSimpleDB.sh etc/imdb.schema -f ./queries/agg_query.txt | grep "seconds")"
echo "=== Four Workers ==="
echo "Selection Query Time: $SELECTION_TIME"
echo "Join Query Time: $JOIN_TIME"
echo "Aggerate Query Time: $AGG_TIME"
rm conf/workers.conf
cp ./worker_files/eight_worker.conf ./conf/workers.conf
SELECTION_TIME="$(./bin/startSimpleDB.sh etc/imdb.schema -f ./queries/selection_query.txt | grep "seconds")"
JOIN_TIME="$(./bin/startSimpleDB.sh etc/imdb.schema -f ./queries/join_query.txt |grep "seconds")"
AGG_TIME="$(./bin/startSimpleDB.sh etc/imdb.schema -f ./queries/agg_query.txt | grep "seconds")"
echo "=== Eight Workers ==="
echo "Selection Query Time: $SELECTION_TIME"
echo "Join Query Time: $JOIN_TIME"
echo "Aggerate Query Time: $AGG_TIME"