forked from rahulketch/cloudsuite-tuning
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun.sh
executable file
·27 lines (23 loc) · 852 Bytes
/
run.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
#!/bin/bash
source ../common/safeguard
source main_func
rm_all_containers
create_network
(($LOAD)) && start_server
(($LOAD)) && detect_stage server-ready
start_client
(($LOAD)) && load_server
warmup_server
while read OPERATIONS; do
TARGET="$((OPERATIONS * MULTIPLIER))"
docker stats >> $UTIL_LOG &
sudo perf stat -e $PERF_EVENTS --cpu $SERVER_CPUS -p ${SERVER_PID} sleep infinity 2>>$PERF_LOG &
(docker exec $CLIENT_CONTAINER bash -c "/ycsb/bin/ycsb run cassandra-cql -p hosts=$SERVER_CONTAINER -P /ycsb/workloads/workloadb -s -threads $THREADS -p operationcount=$TARGET -p recordcount=$RECORDS")>>$CLIENT_LOG &
CLIENT_PID=$!
wait $CLIENT_PID
sudo pkill -f "docker stats"
sudo pkill -fx "sleep infinity"
done < $OPERATIONS_FILE
mv $OPERATIONS_FILE $OUT/operations.txt
cp user.cfg $OUT/user.cfg
log_folder