From: Markus Lehtonen Date: Wed, 7 Sep 2016 11:56:13 +0000 (+0300) Subject: build-perf-bisect: add buildtime2 test method X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9454eec70ff1e18d43dc4332da9acea9cb1fad35;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git build-perf-bisect: add buildtime2 test method Method for better evaluating the build time of one build target, without the buildtime of the (build) dependencies affecting the result. Signed-off-by: Markus Lehtonen --- diff --git a/build-perf-bisect.sh b/build-perf-bisect.sh index bd8defe2976..4dae07304cd 100755 --- a/build-perf-bisect.sh +++ b/build-perf-bisect.sh @@ -33,7 +33,7 @@ Optional arguments: -c average over COUNT test runs (default: $test_count) -d DL_DIR to use -m test method, available options are: - buildtime, tmpsize, esdktime, parsetime + buildtime, buildtime2, tmpsize, esdktime, parsetime (default: $test_method) -w work directory to use EOF @@ -213,6 +213,23 @@ buildtime () { save_buildstats } +buildtime2 () { + # Pre-build to get all the deps in place + _time=`time_cmd bitbake $1` || exit 125 + run_cmd bitbake -c cleansstate $1 + rm -rf tmp*/buildstats/* + + do_sync + + results+=(`time_cmd bitbake $1`) || exit 125 + + save_buildstats +} + +cleanup_buildtime2 () { + run_cmd rm -rf tmp* +} + tmpsize () { log "cleaning up build directory" run_cmd rm -rf bitbake.lock conf/sanity_info cache tmp sstate-cache @@ -263,6 +280,10 @@ builddir="$workdir/build-$git_rev-$timestamp" case "$test_method" in buildtime) ;; + buildtime2) + builddir="$workdir/build" + cleanup_func=cleanup_buildtime2 + ;; tmpsize) quantity="SIZE" ;;