Statistics
| Revision:

root / Pi / C / Simple / bench.sh @ 39

History | View | Annotate | Download (360 Bytes)

1
#!/bin/bash
2

    
3
EXE=Pi_LONG
4
ITERATIONS=1000000000
5
TIME=time
6

    
7
REPEAT=10
8

    
9
[ ! $1 == '' ] && EXE=$1
10
[ ! $2 == '' ] && ITERATIONS=$2
11

    
12
LOGFILE=${EXE}_${HOSTNAME}_${ITERATIONS}.log
13

    
14
echo -ne "Start $EXE with $ITERATIONS : "
15
> $LOGFILE
16
i=1
17
while [ $i -le $REPEAT ]
18
do 
19
    echo -ne "$i "
20
    $TIME ./$EXE $ITERATIONS >> $LOGFILE 2>&1 
21
    i=$(($i+1))
22
done
23
echo " done."