-
Notifications
You must be signed in to change notification settings - Fork 2
/
run-workflows-for-dataset.sh
executable file
·73 lines (62 loc) · 2.4 KB
/
run-workflows-for-dataset.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
#data/flights/workflows
if [ "$#" -ne 5 ]; then
echo "You must enter exactly 5 command line arguments"
echo "Usage: ./run-workflows-for-dataset.sh [env folder location] [dataset size] [dataset] [driver] [run folder name]"
echo "Example: ./run-workflows-for-dataset.sh ../env 1M movies monetdb results/run_1"
exit 0
fi
#set -x
# the virtual environment to use
ENVIR_FOLDER=$1
#dataset size
DATASET_SIZE=$2
# which dataset to test
DATASET=$3
# which database driver to test
DRIVER=$4
# to keep track of which run it was
RUN_FOLDERNAME=$5
# to store results for this specific case
RESULT_DESTINATION="${RUN_FOLDERNAME}/size_${DATASET_SIZE}/${DATASET}/${DRIVER}"
# make the result destination
echo "preparing result destination folders: ${RESULT_DESTINATION}"
mkdir -p ${RESULT_DESTINATION}
if [ "${DATASET}" = "flights" ]; then
for WORKFLOW_FILENAME in $( ls data/${DATASET}/workflows )
do
if [ -f "stop_scripts" ]; then
echo "stopping execution run-workflows-for-dataset.sh"
exit 0
fi
WORKFLOW="${WORKFLOW_FILENAME%.*}"
echo "./run-workflow.sh ${ENVIR_FOLDER} ${DATASET_SIZE} ${DATASET} ${DRIVER} ${WORKFLOW} ${RESULT_DESTINATION}"
./run-workflow.sh ${ENVIR_FOLDER} ${DATASET_SIZE} ${DATASET} ${DRIVER} ${WORKFLOW} ${RESULT_DESTINATION}
done
elif [ "${DATASET}" = "movies" ]; then
for WORKFLOW_FILENAME in $( ls data/${DATASET}/workflows/ | grep ".*_fixed.json" )
do
if [ -f "stop_scripts" ]; then
echo "stopping execution run-workflows-for-dataset.sh"
exit 0
fi
WORKFLOW="${WORKFLOW_FILENAME%.*}"
echo "./run-workflow.sh ${ENVIR_FOLDER} ${DATASET_SIZE} ${DATASET} ${DRIVER} ${WORKFLOW} ${RESULT_DESTINATION}"
./run-workflow.sh ${ENVIR_FOLDER} ${DATASET_SIZE} ${DATASET} ${DRIVER} ${WORKFLOW} ${RESULT_DESTINATION}
done
elif [ "${DATASET}" = "weather" ]; then
for WORKFLOW_FILENAME in $( ls data/${DATASET}/workflows )
do
if [ -f "stop_scripts" ]; then
echo "stopping execution of run-workflows-for-dataset.sh"
exit 0
fi
WORKFLOW="${WORKFLOW_FILENAME%.*}"
echo "./run-workflow.sh ${ENVIR_FOLDER} ${DATASET_SIZE} ${DATASET} ${DRIVER} ${WORKFLOW} ${RESULT_DESTINATION}"
./run-workflow.sh ${ENVIR_FOLDER} ${DATASET_SIZE} ${DATASET} ${DRIVER} ${WORKFLOW} ${RESULT_DESTINATION}
done
else
echo "You must enter valid dataset name."
echo "Example: ./run-workflows-for-dataset.sh ../env movies monetdb"
exit 0
fi