Skip to content
Snippets Groups Projects
perf2.sh 492 B
Newer Older
#!/usr/bin/env bash

Heyd's avatar
Heyd committed
NTEST=50
TAILLE=1000000
echo -e "Structure\tTest\tOperation\tnbOperation\tCPU\tMem"
for i in `seq $NTEST`
Heyd's avatar
Heyd committed
do
  nbOperation=`expr $i \* 500`;

  for type in "Tableau" "Array" "Linked" "Maillon"
  do
    for operation in "Add" "Get" "RemoveTete" "RemoveMiddle"
    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