]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
build-perf-bisect: add buildtime2 test method
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Wed, 7 Sep 2016 11:56:13 +0000 (14:56 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 6 Oct 2016 05:51:47 +0000 (08:51 +0300)
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 <markus.lehtonen@linux.intel.com>
build-perf-bisect.sh

index bd8defe29768310a9f9e1ac124ed75107ed185d1..4dae07304cdd32558807c2e1747f2251604e497f 100755 (executable)
@@ -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"
         ;;