-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevaluation.sh
More file actions
executable file
·63 lines (52 loc) · 1.33 KB
/
evaluation.sh
File metadata and controls
executable file
·63 lines (52 loc) · 1.33 KB
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
#!/usr/bin/bash
workloadPath=../datasets/
extension="*.dat"
mode="threads_mode"
input=8
if [[ "$1" != "" ]]; then
workloadPath="$1"
fi
if [[ "$2" != "" ]]; then
mode="$2"
fi
if [[ "$3" != "" ]]; then
input="$3"
fi
path="ls $workloadPath$extension | sort -n"
loggingPath="logging"
evaluationPath="evaluation"
jsonLoggingPath=${loggingPath}/result.json
resultPath=${evaluationPath}/result-duration.csv
if [ $mode == "threads_mode" ]; then
echo "Hello"
resultPath=${evaluationPath}/result-threads.csv
fi
if [ ! -d "$loggingPath" ]; then
mkdir ./$loggingPath
fi
if [ ! -d "$evaluationPath" ]; then
mkdir ./$evaluationPath
fi
for workload in $path
do
if [ $mode == "threads_mode" ]; then
duration=$input
for thread in 1 2 4 8 16 32
do
sudo HEARTBEAT_ENABLED_DIR=. ./bench_client -t $thread -d $duration -l $workload -j $jsonLoggingPath -r $resultPath
done
elif [ $mode == "duration_mode" ]; then
thread=$input
for (( duration=10; duration<=40; duration+=10 ));
do
sudo HEARTBEAT_ENABLED_DIR=. ./bench_client -t $thread -d $duration -l $workload -j $jsonLoggingPath -r $resultPath
done
fi
done
# Cleanup heartbeats shared memory
MEMS=`ipcs | grep $USER | awk '{print $2}'`
for k in $MEMS
do
echo Freeing $k
ipcrm -m $k
done