-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_workloads.sh
executable file
·94 lines (85 loc) · 3.01 KB
/
test_workloads.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
84
85
86
87
88
89
90
91
92
93
94
#!/bin/sh
script_dir=$(dirname "$(readlink -f "$0")")
# source the common.sh from the evaluation
source $script_dir/evaluation/common.sh
# source the args_and_checks.sh from the evaluation
source $script_dir/evaluation/args_and_checks.sh
# Call the parse_args function with your command-line arguments
parse_args_and_checks "$@"
# Variables for the end-to-end test configuration
redis_address="tcp://127.0.0.1"
redis_port=6379
rocksdb_address="127.0.0.1"
rocksdb_port=15001
controller_address="127.0.0.1"
controller_port=1312
test_cfg=${script_dir}/configs/test_user.json
test_log_cfg=${script_dir}/configs/test_user_logging.json
# Default tests with combinations of
# {1,2,4,8,16,32} clients,
# {redis, rocksdb} dbs,
# {workloada_test, workloadb_test, workloadc_test, workloadd_test, workloadf_test} workloads
clients="1 2 4 8 16 32"
dbs="redis rocksdb"
workloads="workloada_test workloadb_test workloadc_test workloadd_test workloadf_test"
# Native controller
results_csv_file=${script_dir}/test_outputs/native-tests.csv
controller="native"
for n_clients in $clients; do
for db in $dbs; do
for workload in $workloads; do
if [[ $db == "rocksdb" ]]; then
db_port=$rocksdb_port
db_address=$rocksdb_address
elif [[ $db == "redis" ]]; then
db_port=$redis_port
db_address=$redis_address
fi
echo "Starting a test with $n_clients clients, $db store, $controller controller, and $workload."
run_native_test $n_clients $workload $db $db_address $db_port \
$controller $controller_address $controller_port "" $results_csv_file
echo ""
done
done
done
# GDPR controller w/o logging
results_csv_file=${script_dir}/test_outputs/gdpr-tests.csv
controller="gdpr"
for n_clients in $clients; do
for db in $dbs; do
for workload in $workloads; do
if [[ $db == "rocksdb" ]]; then
db_port=$rocksdb_port
db_address=$rocksdb_address
elif [[ $db == "redis" ]]; then
db_port=$redis_port
db_address=$redis_address
fi
echo "Starting a test with $n_clients clients, $db store, $controller controller, and $workload"
run_native_test $n_clients $workload $db $db_address $db_port \
$controller $controller_address $controller_port $test_cfg $results_csv_file
echo ""
done
done
done
# GDPR controller w/ logging
results_csv_file=${script_dir}/test_outputs/gdpr-log-tests.csv
controller="gdpr"
for n_clients in $clients; do
for db in $dbs; do
for workload in $workloads; do
if [[ $db == "rocksdb" ]]; then
db_port=$rocksdb_port
db_address=$rocksdb_address
elif [[ $db == "redis" ]]; then
db_port=$redis_port
db_address=$redis_address
fi
echo "Starting a test with $n_clients clients, $db store, $controller controller, and $workload with logging enabled."
run_native_test $n_clients $workload $db $db_address $db_port \
$controller $controller_address $controller_port $test_log_cfg $results_csv_file
echo ""
done
done
done
print_summary