#!/bin/bash
#Compare l'operation de suppression en queue de liste sur les ArrayList / LinkedList 

TESTS=3
STRUCT=2
NBOPERATIONS="100000 125000 150000 175000 200000 225000 250000 275000 300000"
echo "NbOperations,Version,CPU,Mem"

for nb in $NBOPERATIONS
do
    for i in `seq $STRUCT`
    do 
        for j in `seq $TESTS`
        do 
                if [ $i = 1 ]
                then
                        res=`(/usr/bin/time -f "%U,%M" java p4a.MainArrayListStdRemoveDecrementation $nb > /dev/null) 2>&1`
                        echo "$nb,ArrayListStd,$res"
                else
                        res=`(/usr/bin/time -f "%U,%M" java p4a.MainLinkedListStdRemoveDecrementation $nb > /dev/null) 2>&1`
                        echo "$nb,LinkedListStd,$res"
                fi
                done
        done
done