T=/mnt/tmp
L=linux-3.6.tar.bz2
J=16

swapoff -a
swapon -a
sysctl -q vm.drop_caches=3

date
uname -a
free

T=/mnt/tmp
mount -t tmpfs tmpfs $T -o size=4G

tar xf $L -C $T
make -s -C $T/linux-* defconfig

cat /proc/vmstat > $T/vmstat.a
time -p make -s -C $T/linux-* -j$J all
cat /proc/vmstat > $T/vmstat.b
paste $T/vmstat.a $T/vmstat.b | awk '{print $1, $4-$2}'

umount $T
