-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPoR-FDT.sh
executable file
·69 lines (54 loc) · 1.58 KB
/
PoR-FDT.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
#!/bin/bash
#####################################################
### VESPo benchmarks for PoR on 1GB, 10GB, 100GB, 1TB
### Copyright(c) 2023 Jean-Guillaume Dumas
### usage: PoR-FDT.sh [threads] [iterations]
#####################################################
# Number of threads
if [ $# -lt 1 ]; then
NBTHREADS=8
else
NBTHREADS=$1
fi
# Number of iterations
if [ $# -lt 2 ]; then
ITER=3
else
ITER=$2
fi
# Paillier security
SECU=2048
SQFIL=bench_sq_vespo_P254.txt
echo "##### VESPO PoR benchmarks"
echo "##### 8 degrees from 5816 to 4026778"
PSINIT=0
if [ -e ${SQFIL} ]
then
PSINIT=`grep VAUDIT ${SQFIL} | grep OK | wc -l`
fi
PASSED=0
PERCEN=0
TOTALT=$(( (4+4) * ITER))
for DEGREE in 5816 18390 58154 186093
do
echo -ne "##### Passed: \e[32m${PERCEN}%\e[0m, current degree: ${DEGREE} ...\r"
# Actual benchmark:
OMP_NUM_THREADS=${NBTHREADS} ./vespo_bench ${DEGREE} ${SECU} ${ITER} &>> ${SQFIL}
PASSED=`grep VAUDIT ${SQFIL} | grep OK | wc -l`
PERCEN=$(( (100 * (PASSED - PSINIT)) / TOTALT ))
done
REFIL=bench_re_vespo_P254.txt
PRINIT=0
if [ -e ${REFIL} ]
then
PRINIT=`grep VAUDIT ${REFIL} | grep OK | wc -l`
fi
for DEGREE in 5125 46551 426519 4026778
do
echo -ne "##### Passed: \e[32m${PERCEN}%\e[0m, current degree: ${DEGREE} ...\r"
# Actual benchmark:
OMP_NUM_THREADS=${NBTHREADS} ./vespo_bench ${DEGREE} ${SECU} ${ITER} &>> ${REFIL}
PASSED=`grep VAUDIT ${SQFIL} ${REFIL} | grep OK | wc -l`
PERCEN=$(( (100 * (PASSED - PSINIT - PRINIT)) / TOTALT ))
done
echo -ne "##### Passed: \e[32m${PERCEN}%\e[0m \n"