-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
47 lines (46 loc) · 1.12 KB
/
Copy pathrun.sh
File metadata and controls
47 lines (46 loc) · 1.12 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
set -e
[ -d tests ] || mkdir tests
algList=('block' 'none' 'zheyang' ) # algList=('zheyang' 'block' 'none' 'eigen' 'tnasl' )
usr=100 #total no. of users
pt=$3
echo pretrust $3
file=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 3 | head -n 1`
folder=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 3 | head -n 1`
eu=0 #non-trusted users
if [ "$1" = "-usr:pre_trusted" ];then
eu=$usr
else
eu=$((usr-pt))
fi
echo eu is $eu
step=$2
for ((i = 0 ; i <= $eu ; i=$i+$step)); do
fileout=$file$i".trace"
./gen_trace -users $usr -output $fileout -usr:pre_trusted $pt $1 $i
echo $i
for j in "${algList[@]}"; do
echo $i
./sim_run -input $fileout -tm $j -strategy isolated
done
done
i=$((i-step))
echo COPYING.....
t=$file*
mkdir tests/$folder
echo tests/$folder folder created
echo file names start with $file
mv $t tests/$folder/
cp *.py tests/$folder/
cd tests/$folder
echo RunningPYTHON
name=()
for j in "${algList[@]}"; do
if [ $j = 'zheyang' ];then
j='zheya'
fi
python3 genCSV.py $j $file $step $i $1
name+=($j".csv")
done
name+=($1)
python3 plotgraph.py ${name[@]}
echo Raw data stored in tests/$folder folder