#!/usr/bin/env bash

NTEST=50
TAILLE=1000000


echo -e "Structure\tTest\tOperation\tnbOperation\tCPU\tMem"
for i in `seq $NTEST`
do
  nbOperation=`expr $i \* 10`;

  for type in "Tableau" "Array" "Linked" "Maillon"
  do
    for operation in "AddTete" "AddQueue" "AddRandom" "Get" "RemoveTete" "RemoveMiddle" "RemoveQueue" "RemoveRandom"
    do
        res=`(/usr/bin/time -f "%U\t%M" java -jar Main.jar $type $TAILLE $operation $nbOperation > /dev/null) 2>&1`
        echo -e "$type\t$i\t$operation\t$nbOperation\t$res"
      done
    done
  done
