]> git.llucax.com Git - z.facultad/75.00/presentacion.git/blob - gen-raw-hist.sh
No mencionar pools de memoria
[z.facultad/75.00/presentacion.git] / gen-raw-hist.sh
1 #!/bin/bash
2
3 res_root="../../cd/resultados"
4
5 stats="../../dgcbench/stats.py"
6
7 progs="bigarr conalloc concpu mcore rnddata sbtree split"
8 progs="$progs bh bisort em3d tsp voronoi dil"
9
10 cdgc_opts="cdgc-conservative=0:fork=1:early_collect=1:eager_alloc=1"
11
12 declare -A opts=(
13         [basic]="cdgc-conservative=1:fork=0:early_collect=0:eager_alloc=0"
14         [cdgc]="$cdgc_opts"
15 )
16
17 declare -A time_opts=(
18         [basic]="basic"
19         [cdgc]="$cdgc_opts"
20 )
21
22 declare -A exps=(
23         [pause]='$2'
24         [stw]='$4'
25         [mem]='($5+$6+$7+$8)/1024/1024'
26         [ncol]=''
27 )
28
29 get_counts() {
30         exp="${exps[$1]}"
31         prog="$2"
32         opts="${opts[$3]}"
33         for f in "$res_root/raw-collect/collect-$prog-$opts-4cpu-"*.csv
34         do
35                 sed 1d "$f" | wc -l
36         done
37 }
38
39 get_maxs() {
40         exp="${exps[$1]}"
41         prog="$2"
42         opts="${opts[$3]}"
43         for f in "$res_root/raw-collect/collect-$prog-$opts-4cpu-"*.csv
44         do
45                 $stats "$exp" '%(max)s' < $f
46         done
47 }
48
49 declare -A funcs=(
50         [pause]=get_maxs
51         [stw]=get_maxs
52         [mem]=get_maxs
53         [ncol]=get_counts
54 )
55
56 for val in stw pause mem ncol
57 do
58         for prog in $progs
59         do
60                 dst="raw-hist-$val-$prog.csv"
61                 echo $dst
62                 rm -f $dst
63                 for gc in basic cdgc
64                 do
65                         echo -n "$gc," >> $dst
66                         ${funcs[$val]} $val $prog $gc | $stats >> $dst
67                 done
68         done
69 done
70
71 # time
72 for prog in $progs
73 do
74         dst="raw-hist-time-$prog.csv"
75         echo $dst
76         rm -f $dst
77         for gc in basic cdgc
78         do
79                 opts="${time_opts[$gc]}"
80                 src="$res_root/raw-timemem/timemem-$prog-$opts-4cpu.csv"
81                 echo -n "$gc," >> $dst
82                 $stats < "$src" >> $dst
83         done
84 done
85