#!/bin/bash

prog="./out/artifacts/P4a_jar/P4a.jar"

echo -e "Structure\tOperation\tn\tTemps\tMem"
for i in `seq 1 25` ; do
    for struct in arraylist vector hashmap ; do
        for op in remplir acceder supprimer ; do
            for n in $(shuf -i 1-250000 -n 1) ; do
            (
                time=$(/bin/time -f "%U\t%M" java -jar $prog $struct $op $n 2>&1)
                echo -e "$struct\t$op\t$n\t$time"
            )
            done
         done
     done
 done