I'm building my own android rom. In order to build it, I need to run
mka -j8 bacon
However, I wanted to measure the time it took to build it, so I used
/usr/bin/time -f "User\t%U\nSys\t%S\nReal\t%E\nCPU\t%P" mka -j8 bacon
This won't run, because it's saying
/usr/bin/time: cannot run mka: No such file or directory
Any help how to work around this, it's appreciated! I'm running xubuntu.
Edit:
For some reason, using make instead of mka does work, however using mka is better.
/usr/bin/time -f "User\t%U\nSys\t%S\nReal\t%E\nCPU\t%P" make -j8 bacon
Edit 2: from the cyanogenmod website
Invoking
$ source build/envsetup.sh
or$ . build/envsetup.sh
from your shell runs the envsetup.sh script in the build directory. envsetup.sh adds many functions to the build environment, the most important of which are listed below.
source build/evnsetup.sh
is the command I run before executing time. One of those added functions by evnsetup.sh is mka
, is it possible to call this from within the time
command?
Edit 3: Output of type mka
$ type mka
mka is a function
mka ()
{
case `uname -s` in
Darwin)
make -j `sysctl hw.ncpu|cut -d" " -f2` "$@"
;;
*)
schedtool -B -n 1 -e ionice -n 1 make -j$(cat /proc/cpuinfo | grep "^processor" | wc -l) "$@"
;;
esac
}
source build/evnsetup.sh
, at the point where you want to calltime mka -j8 bacon
, can you post the output of the commandtype mka
? – Malte Skoruppa Mar 8 '14 at 4:42