8 TIME=${TIME:-/usr/bin/time}
10 FORMATS=${FORMATS:-png svg eps}
12 NAMES=${NAMES:-`echo ./micro/*.d | xargs -n1 sh -c 'basename $0 .d'` dil}
14 GCS=${GCS:-basic cdgc}
16 CPUS=${CPUS:-`grep '^processor' /proc/cpuinfo | wc -l`}
18 PLOTONLY=${PLOTONLY:-0}
29 make -srj4 micro-gc-build dil-gc-build GC=$gc
32 prog="./build/$gc/bin/$name"
33 dst="./build/$gc/time/$name-${CPUS}cpu.csv"
36 echo "$NORUN" | grep -q "$gc\\|$name" &&
38 test $PLOTONLY -eq 1 &&
41 eval "args=\"\$args_$name\""
43 test ${#args} -gt 40 &&
44 pa="`echo $args | cut -b1-40`..."
47 echo -n " RUN $name $pa > $dst: "
51 test $(($i % 5)) -eq 0 &&
55 $TIME -f%e -a -o $dst \
56 $prog $args > /dev/null
64 dst=./build/time-$name-${CPUS}cpu.csv
67 echo "$NORUN" | grep -q "$name" &&
69 test $PLOTONLY -eq 1 &&
71 mv $dst ./build/time-$name-${CPUS}cpu-old.csv
76 src=./build/$gc/time/$name-${CPUS}cpu.csv
77 eval "factor=\"\$factor_$name\""
80 (echo -n $gc,; awk "{print \$1*$factor}" $src | ./stats.py) >> $dst
81 echo " STATS `tail -n1 $dst | tr , ' '` >> $dst"
85 echo -n " PLOT ${CPUS}cpu > ./build/time-${CPUS}cpu.{"
88 dst=./build/time-${CPUS}cpu.$fmt
90 mv $dst ./build/time-${CPUS}cpu-old.$fmt
95 files="$files ./build/time-$name-${CPUS}cpu.csv"
97 ./time-plot.sh $fmt $dst $files