diff --git a/README.md b/README.md index cf1dcb95fc264387d3e269f79a63fb1dcd392ee7..e2e069560266ea20de062d7ee702020d83d9407d 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,9 @@ public static Collection add(Collection c, int size) { ### Analyse des résultats expérimentaux -Tout d'abord nous remarquons que la structure `LinkedList` as gagné en temps +Tout d'abord nous remarquons que la structure `LinkedList` as gagné en temps d'éxécution global mais au niveau de la mémoire, il n'y as aucun changement particulier. + +De plus, on ### Discussion des résultats expérimentaux diff --git a/shellscript/script.sh b/shellscript/script.sh index b4fee40cd249c5d88646f469dfb0658112c3c3d9..49f008a39d95e211e6d5eec4cc4e6082812d2973 100755 --- a/shellscript/script.sh +++ b/shellscript/script.sh @@ -29,37 +29,20 @@ cd ../src echo -e "Size\tOperation\tOpSize\tType\tTime\tMemory" -if [[ $1 == "Hypothese" ]]; then - for size in ${structSize[*]}; do - for operation in ${operationType[*]}; do - for opSize in ${operationSize[*]}; do - for type in ${structType[*]}; do - - res=$((/usr/bin/time -f "\t%U\t%M" /usr/bin/java Hypothese $type $size $operation $opSize) 2>&1) - echo -e "$size\t$operation\t$opSize\t$type\t$res" - - done +for size in ${structSize[*]}; do + for operation in ${operationType[*]}; do + for opSize in ${operationSize[*]}; do + for type in ${structType[*]}; do + + res=$((/usr/bin/time -f "\t%U\t%M" /usr/bin/java Main $type $size $operation $opSize) 2>&1) + echo -e "$size\t$operation\t$opSize\t$type\t$res" + done done done - cd ../graphs - ./graphique_hypothese.R -else - for size in ${structSize[*]}; do - for operation in ${operationType[*]}; do - for opSize in ${operationSize[*]}; do - for type in ${structType[*]}; do - - res=$((/usr/bin/time -f "\t%U\t%M" /usr/bin/java Main $type $size $operation $opSize) 2>&1) - echo -e "$size\t$operation\t$opSize\t$type\t$res" - - done - done - done - done - cd ../graphs - ./graphique.R -fi +done +cd ../graphs +./graphique.R cd ../src rm *.class diff --git a/shellscript/script_hypo.sh b/shellscript/script_hypo.sh new file mode 100644 index 0000000000000000000000000000000000000000..dab28635b937496f68af041b15c6161cfda4859c --- /dev/null +++ b/shellscript/script_hypo.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +structType[0]="ArrayList" +structType[1]="LinkedList" +structType[2]="HashSet" + +size = 500000 + +operationSize[0]=10000 +operationSize[1]=20000 +operationSize[2]=50000 +operationSize[3]=100000 +operationSize[4]=200000 + +operationType[0]="Ajout" +operationType[1]="Présence" +operationType[2]="Suppression" + +cd ../src +/usr/bin/javac *.java + +echo -e "Size\tOperation\tOpSize\tType\tTime\tMemory" + +for operation in ${operationType[*]}; do + for opSize in ${operationSize[*]}; do + for type in ${structType[*]}; do + + res=$((/usr/bin/time -f "\t%U\t%M" /usr/bin/java Hypothese $type $size $operation $opSize) 2>&1) + echo -e "$size\t$operation\t$opSize\t$type\t$res" + + done + done +done +cd ../graphs +./graphique_hypothese.R +cd ../src +rm *.class \ No newline at end of file