#!/bin/bash

echo -e "iTest\ttaille\ttri\ttemps\tmem"

for iTest in `seq 1 2`
do
    size=$(( `od -An -N4 -tu < /dev/urandom` % 100000))
    max=$(( `od -An -N4 -tu < /dev/urandom` % 1000))
    pwd
    ../tri -g $max $size 1>../tabs/perf_tab.txt
    #cat tabs/perf_tab.txt
    for tri in "insertion" "rapide"
    do
        res=$( time ../tri --$tri ../tabs/perf_tab.txt 1>/dev/null)
        echo -e "$iTest\t$taille\t$tri\t$res"
    done
    rm ../tabs/perf_tab.txt
done