#!/bin/rc rfork e cmd=$1 echo '#' $1 echo measuring $1... >'#c/cons' rm -f /tmp/bench.time rc -c $cmd >'#c/cons' # warm cache and be able to see the output of the cmd... # # collect stats. A single run this time. # echo >/dev/sysstat bind -a '#W' /dev echo start >/dev/wsctl time rc -c $cmd >/dev/null >>[2]/tmp/bench.time echo stop >/dev/wsctl cp /dev/wsdata /tmp/wsdata cp /dev/sysstat /tmp/sysstat tail -1 /tmp/bench.time tail -1 /tmp/bench.time >'#c/cons' sed 's/[sur]//g'