-
Notifications
You must be signed in to change notification settings - Fork 7
/
do.sh
executable file
·92 lines (68 loc) · 1.79 KB
/
do.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
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PWD_DIR=`pwd`
source $SCRIPT_DIR/do_parameters.sh
cd $SCRIPT_DIR
BENCHMARK="unknown"
options=("Logger-Window" "Clients" "CheckpointInterval" "Recovery" "Single-Run" "Profiler" "Quit")
if [ "$#" -eq 1 ]; then
BENCHMARK=$1
if echo "${options[@]}" | fgrep --word-regexp "$BENCHMARK"; then
t=1
else
echo "ERROR: Invalid benchmark specified - $BENCHMARK"
echo "Please choose from: ${options[@]}"
exit 1
fi
else
PS3='Choose benchmark: '
CMD=""
PLT=""
ulimit -n 4096
select opt in "${options[@]}";
do
BENCHMARK=$opt
break
done
fi
case $BENCHMARK in
"Logger-Window")
CMD="python exp_tpcc_logger_windowsize.py"
PLT="python plt_tpcc_logger_windowsize.py"
;;
"Clients")
CMD="python exp_tpcc_clients.py"
PLT="python plt_tpcc.py"
;;
"CheckpointInterval")
CMD="python exp_tpcc_checkpoint_throughput.py"
PLT="python plt_tpcc_checkpoint_throughput.py"
;;
"Recovery")
CMD="python exp_tpcc_recovery.py"
PLT="python plt_tpcc_recovery.py"
;;
"Single-Run")
CMD="python exp_tpcc_single_run.py"
;;
"Profiler")
CMD="python exp_tpcc_profiler_run.py"
;;
"Quit")
exit 0
;;
*) echo invalid option;;
esac
echo "Chosen benachmark: $BENCHMARK"
echo "---------------------------"
echo "executing experiment: " $CMD $PARAMETER
echo "---------------------------"
$CMD $PARAMETER
# read -p "With plotting? [y/n] " answer
# if [[ $answer = y ]] ; then
# echo "---------------------------"
# echo "executing plot: " $PLT
# echo "---------------------------"
# $PLT
# fi
cd $PWD_DIR