Skip to content
Snippets Groups Projects
Commit d783addf authored by Mickael Da Silva's avatar Mickael Da Silva
Browse files

R

parent 9c708d97
No related merge requests found
......@@ -100,16 +100,13 @@ int main(int argc, char **argv){
t = atoi(argv[3]);
}
size_t l = 0;
int fd = open(argv[2], O_RDWR | O_CREAT);
tab = generate_tab(t, &l);
dup2(fd, 1);
for(int i = 0; i<t; i++){
printf("%ld ", tab[i]);
}
printf(".");
printf("\n");
close(fd);
// free(tab);
}
......
library(ggplot2)
perf <- read.table("perf.dat", header = TRUE)
ggplot(perf, aes(x=taille, y=temps, group=tri, colour=as.character(tri))) + geom_point() +
geom_smooth() + ggtitle("Notre super graphe")
ggsave("graphe.png")
\ No newline at end of file
iTest taille tri temps mem
1 60 fusion 0.00 1468
1 60 insertion 0.00 1488
1 60 rapide 0.00 1524
2 9 fusion 0.00 1480
2 9 insertion 0.00 1492
2 9 rapide 0.00 1476
3 87 fusion 0.00 1448
3 87 insertion 0.00 1520
3 87 rapide 0.00 1504
#!/bin/bash
echo -e "iTest\ttaille\ttri\ttemps\tmem"
for iTest in `seq 1 3`
do
taille=$(( `od -An -N4 -tu < /dev/urandom` % 100))
for tri in "fusion" "insertion" "rapide"
do
`( ./tri -g $tri $taille ) > tabs/$tri.txt`
res=`( /usr/bin/time -f "%U\t%M" ./tri --$tri tabs/$tri.txt > /dev/null ) 2>&1`
echo -e "$iTest\t$taille\t$tri\t$res"
done
done
\ No newline at end of file
383 886 777 915 793 335 386 492 649 421 362 27 690 59 763 926 540 426 172 736 211 368 567 429 782 530 862 123 67 135 929 802 22 58 69 167 393 456 11 42 229 373 421 919 784 537 198 324 315 370 413 526 91 980 956 873 862 170 996 281 305 925 84 327 336 505 846 729 313 857 124 895 582 545 814 367 434 364 43 750 87 808 276 178 788 584 403 .
383 886 777 915 793 335 386 492 649 421 362 27 690 59 763 926 540 426 172 736 211 368 567 429 782 530 862 123 67 135 929 802 22 58 69 167 393 456 11 42 229 373 421 919 784 537 198 324 315 370 413 526 91 980 956 873 862 170 996 281 305 925 84 327 336 505 846 729 313 857 124 895 582 545 814 367 434 364 43 750 87 808 276 178 788 584 403 .
383 886 777 915 793 335 386 492 649 421 362 27 690 59 763 926 540 426 172 736 211 368 567 429 782 530 862 123 67 135 929 802 22 58 69 167 393 456 11 42 229 373 421 919 784 537 198 324 315 370 413 526 91 980 956 873 862 170 996 281 305 925 84 327 336 505 846 729 313 857 124 895 582 545 814 367 434 364 43 750 87 808 276 178 788 584 403 .
No preview for this file type
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment