-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_all.sh
61 lines (48 loc) · 2.15 KB
/
run_all.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
#!/bin/bash
DIR="results"
# change the path
DIR_data="/usr/ALENEX_datasets"
EXE_FILE="build/my_benchmark"
OPTIONS="--meva --plai --elia --rrrv --rlev --lave --lavo --encv --ds2i --s18v"
mkdir -p $DIR
time {
$EXE_FILE --entr $DIR_data/DNA_1 $DIR_data/5GRAM_1 $DIR_data/URL_1 $DIR_data/GOV2/10M-/1_gov.bin.docs \
>>$DIR/entropy_comparison.csv \
2>>$DIR/comparison.err
$EXE_FILE $OPTIONS $DIR_data/DNA_1 $DIR_data/DNA_2 $DIR_data/DNA_3 \
$DIR_data/5GRAM_1 $DIR_data/5GRAM_2 $DIR_data/5GRAM_3 \
$DIR_data/URL_1 $DIR_data/URL_2 $DIR_data/URL_3 \
>>$DIR/DNA_5GRAM_URL_comparison.csv \
2>>$DIR/comparison.err
$EXE_FILE $OPTIONS $DIR_data/GOV2/100K-1M/* \
>>$DIR/GOV2_100K-1M_comparison.csv \
2>>$DIR/comparison.err
$EXE_FILE $OPTIONS $DIR_data/GOV2/1M-10M/* \
>>$DIR/GOV2_1M-10M_comparison.csv \
2>>$DIR/comparison.err
$EXE_FILE $OPTIONS $DIR_data/GOV2/10M-/* \
>>$DIR/GOV2_10M-_comparison.csv \
2>>$DIR/comparison.err
NUM_COLUMNS=$(head -1 $DIR/GOV2_10M-_comparison.csv | sed 's/[^,]//g' | wc -c)
printf "'GOV2_AVG_10M-'" >>$DIR/GOV2_averages.csv
for i in $(seq 2 "$NUM_COLUMNS"); do
printf "," >>$DIR/GOV2_averages.csv
awk -v var="$i" -F ',' '{ total += $var } END { printf "%.3e", total/(NR-1) }' $DIR/GOV2_10M-_comparison.csv >>$DIR/GOV2_averages.csv
done
printf "\n" >>$DIR/GOV2_averages.csv
printf "'GOV2_AVG_1M-10M'" >>$DIR/GOV2_averages.csv
for i in $(seq 2 "$NUM_COLUMNS"); do
printf "," >>$DIR/GOV2_averages.csv
awk -v var="$i" -F ',' '{ total += $var } END { printf "%.3e", total/(NR-1) }' $DIR/GOV2_1M-10M_comparison.csv >>$DIR/GOV2_averages.csv
done
printf "\n" >>$DIR/GOV2_averages.csv
printf "'GOV2_AVG_100K-1M'" >>$DIR/GOV2_averages.csv
for i in $(seq 2 "$NUM_COLUMNS"); do
printf "," >>$DIR/GOV2_averages.csv
awk -v var="$i" -F ',' '{ total += $var } END { printf "%.3e", total/(NR-1) }' $DIR/GOV2_100K-1M_comparison.csv >>$DIR/GOV2_averages.csv
done
printf "\n" >>$DIR/GOV2_averages.csv
cat $DIR/DNA_5GRAM_URL_comparison.csv >$DIR/comparison.csv
cat $DIR/GOV2_averages.csv >>$DIR/comparison.csv
sed -n '6p' <$DIR/GOV2_10M-_comparison.csv >>$DIR/comparison.csv
}