-
Notifications
You must be signed in to change notification settings - Fork 12
/
eval-zeropca-refine.sh
82 lines (68 loc) · 1.95 KB
/
eval-zeropca-refine.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
#!/usr/bin/env bash
#input=input/*-100.pcap
#input=input/*-1000.pcap
#
#input=input/maxdiff-fromOrig/*-1000.pcap
input="input/maxdiff-fromOrig/*-100*.pcap"
#refines="base PCA PCA1 PCAmoco PCAmocoSF"
refines="PCAmocoSF"
L1PROTOS="input/ari_*"
L2PROTOS="input/awdl-* input/au-* input/wlan-beacons-*"
# never perform LE optimization for zeropca! see nemesys-le-compare.ods
LEPROTOS=""
#LEPROTOS="input/awdl-* input/au-* input/smb* input/*/smb* input/wlan-beacons-*"
prefix="zeropca"
cftnpad="350"
for f in reports/${prefix}-* ; do
if [ -e "$f" ] ; then
cftnext=$(expr 1 + $(ls -d reports/${prefix}-* | sed "s/^.*${prefix}-\([0-9]*\)-.*$/\1/" | sort | tail -1))
cftnpad=$(printf "%03d" ${cftnext})
fi
break
done
currcomm=$(git log -1 --format="%h")
report=reports/${prefix}-${cftnpad}-refinement-${currcomm}
mkdir ${report}
for fn in ${input} ; do
optargs="-r -p" # with plots add: -p
for proto in ${L2PROTOS} ; do
if [[ "${fn}" == ${proto} ]] ; then
# replace
optargs="-l 2"
fi
done
for proto in ${L1PROTOS} ; do
if [[ "${fn}" == ${proto} ]] ; then
# replace
optargs="-l 1"
fi
done
for proto in ${LEPROTOS} ; do
if [[ "${fn}" == $proto ]] ; then
# append
optargs="${optargs} -e" # -e: little endian
fi
done
for ref in ${refines} ; do
python src/nemezero_pca-refinement.py $* ${optargs} -f ${ref} ${fn}
done
# # # # #
# # # the wrong branch: apply LE optimization to the LE and BE protocols
# for ref in ${refines} ; do
# python src/nemezero_pca-refinement.py $* ${optargs} -f ${ref} ${fn}
# python src/nemezero_pca-refinement.py $* ${optargs} -e -f ${ref} ${fn}
# done
done
mv reports/*.pdf ${report}/
for fn in ${input};
do
bn=$(basename -- ${fn})
strippedname="${bn%.*}"
mv reports/${strippedname} ${report}/
done
cd ${report}/
../combine-stats.sh
cd -
python reports/combine-nemesys-fms.py ${report}/
echo "Report written to folder ${report}"
spd-say "Bin fertig!"