-
Notifications
You must be signed in to change notification settings - Fork 0
/
timer.sh
executable file
·54 lines (47 loc) · 1.51 KB
/
timer.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
rm -f *.dat *.png NFT
rm -r -f results
F0=0
FF=10
STEP=0.01
FILENAME="datos.dat"
python3 datos.py > datos.dat
python3 graficar.py "datos.dat"
#time -f "Tiempo compilando (C++): \t\t%e" c++ NFT.cpp -o NFT
#time -f "Tiempo calculando (C++): \t\t%e" ./NFT $FILENAME $F0 $FF $STEP "transf_c.dat"
#time -f "Tiempo graficando (Python, C++): \t%e" python3 graficar.py "transf_c.dat"
#time -f "Tiempo calculando (Python): \t\t%e" python3 NFT.py $FILENAME $F0 $FF $STEP "transf_python.dat"
#time -f "Tiempo graficando (Python, Python): \t%e" python3 graficar.py "transf_python.dat"
#time -f "Tiempo calculando (Julia): \t\t%e" julia NFT.jl $FILENAME $F0 $FF $STEP "transf_julia.dat"
#time -f "Tiempo graficando (Python, Julia): \t%e" python3 graficar.py "transf_julia.dat"
# Cronometraje de todo:
echo "Ccomp"
COUNTER=0
MAX=10
while [ $COUNTER -lt $MAX ]; do
time -f "%e" c++ NFT.cpp -o NFT
COUNTER=$((COUNTER+1))
done
echo "Crun"
COUNTER=0
while [ $COUNTER -lt $MAX ]; do
time -f "%e" ./NFT $FILENAME $F0 $FF $STEP "transf_c.dat"
COUNTER=$((COUNTER+1))
done
echo "python"
COUNTER=0
while [ $COUNTER -lt $MAX ]; do
time -f "%e" python3 NFT.py $FILENAME $F0 $FF $STEP "transf_python.dat"
COUNTER=$((COUNTER+1))
done
echo "julia"
COUNTER=0
while [ $COUNTER -lt $MAX ]; do
time -f "%e" julia NFT.jl $FILENAME $F0 $FF $STEP "transf_julia.dat"
COUNTER=$((COUNTER+1))
done
rm -f *.dat NFT
#mkdir results
#mv datos.png results/
#mv transf_c.png results/
#mv transf_python.png results/
#mv transf_julia.png results/