#!/bin/bash

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

for iTest in `seq 1 2`
do
    size=$(( `od -An -N4 -tu < /dev/urandom` % 1000000))
    max=$(( `od -An -N4 -tu < /dev/urandom` % 100000))

    ./tri -g $max $size 1>tabs/perf_tab.txt
    #cat tabs/perf_tab.txt
    for tri in "fusion" "insertion" "rapide"
    do
        res=$( time ./tri --$tri tabs/perf_tab.txt 2>&1)
        echo -e "$iTest\t$taille\t$tri\t$res"
    done
    rm tabs/perf_tab.txt
done