#!/usr/bin/env bash

NTEST=1
TAILLES="100 1000 10000 100000 1000000 10000000 100000000"
echo "Tableau"
echo "Taille, CPU, Mem"
for taille in $TAILLES
do
  for i in `seq $NTEST`
  do
  res=`(/usr/bin/time -f "%U, %M" java -jar Main.jar "Tableau" $taille > /dev/null) 2>&1`
    echo "$taille, $res"
  done
done

echo "Array"
echo "Taille, CPU, Mem"
for taille in $TAILLES
do
  for i in `seq $NTEST`
  do
  res=`(/usr/bin/time -f "%U, %M" java -jar Main.jar "Array" $taille > /dev/null) 2>&1`
    echo "$taille, $res"
  done
done


echo "Linked"
echo "Taille, CPU, Mem"
for taille in $TAILLES
do
  for i in `seq $NTEST`
  do
  res=`(/usr/bin/time -f "%U, %M" java -jar Main.jar "Linked" $taille > /dev/null) 2>&1`
    echo "$taille, $res"
  done
done
