Small changes to the build performance script
cover Small changes to the build performance script
The following changes since commit addcfcda84ed6b43b00f569a6060e3b78196ef52:
glib-2.0: disable tests for native builds, and respect ptest for LSB (2013-04-23 13:00:43 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib stefans/perf-test2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=stefans/perf-test2
Stefan Stanacar (3):
scripts/contrib/build-perf-test.sh: use the same identation everywhere scripts/contrib/build-perf-test.sh: skip network sanity tests scripts/contrib/build-perf-test.sh: change the global results format
scripts/contrib/build-perf-test.sh | 96 +++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 44 deletions(-)
Signature · 1 line
1.8.1.4
PATCH 1/3 scripts/contrib/build-perf-test.sh: use the same identation everywhere
Some functions didn't used the same identation as the rest of them, let's fix that.
--- scripts/contrib/build-perf-test.sh | 72 +++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-)
scripts/contrib/build-perf-test.sh +36 -36
@@ -257,36 +257,36 @@ do_sync () { # - report size, remove INHERIT test1_p1 () { -log "Running Test 1, part 1/3: Measure wall clock of bitbake $IMAGE and size of tmp/ dir" -bbnotime "$IMAGE -c fetchall" -do_rmtmp -do_rmsstate -do_sync -bbtime "$IMAGE" -log "SIZE of tmp dir is: `du -sh tmp | sed 's/tmp//'`" -log "Buildstats are saved in $OUTDIR/buildstats-test1" -mv tmp/buildstats $OUTDIR/buildstats-test1 + log "Running Test 1, part 1/3: Measure wall clock of bitbake $IMAGE and size of tmp/ dir" + bbnotime "$IMAGE -c fetchall" + do_rmtmp + do_rmsstate + do_sync + bbtime "$IMAGE" + log "SIZE of tmp dir is: `du -sh tmp | sed 's/tmp//'`" + log "Buildstats are saved in $OUTDIR/buildstats-test1" + mv tmp/buildstats $OUTDIR/buildstats-test1 } test1_p2 () { -log "Running Test 1, part 2/3: bitbake virtual/kernel -c cleansstate and time bitbake virtual/kernel" -bbnotime "virtual/kernel -c cleansstate" -do_sync -bbtime "virtual/kernel" + log "Running Test 1, part 2/3: bitbake virtual/kernel -c cleansstate and time bitbake virtual/kernel" + bbnotime "virtual/kernel -c cleansstate" + do_sync + bbtime "virtual/kernel" } test1_p3 () { -log "Running Test 1, part 3/3: Build $IMAGE w/o sstate and report size of tmp/dir with rm_work enabled" -echo "INHERIT += \"rm_work\"" >> conf/local.conf -do_rmtmp -do_rmsstate -do_sync -bbtime "$IMAGE" -sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf -log "SIZE of tmp dir is: `du -sh tmp | sed 's/tmp//'`" -log "Buildstats are saved in $OUTDIR/buildstats-test13" -mv tmp/buildstats $OUTDIR/buildstats-test13 + log "Running Test 1, part 3/3: Build $IMAGE w/o sstate and report size of tmp/dir with rm_work enabled" + echo "INHERIT += \"rm_work\"" >> conf/local.conf + do_rmtmp + do_rmsstate + do_sync + bbtime "$IMAGE" + sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf + log "SIZE of tmp dir is: `du -sh tmp | sed 's/tmp//'`" + log "Buildstats are saved in $OUTDIR/buildstats-test13" + mv tmp/buildstats $OUTDIR/buildstats-test13 }
@@ -296,11 +296,11 @@ mv tmp/buildstats $OUTDIR/buildstats-test13 # Pre: populated sstate cache test2 () { -#assuming test 1 has run -log "Running Test 2: Measure wall clock of bitbake $IMAGE -c rootfs with sstate" -do_rmtmp -do_sync -bbtime "$IMAGE -c rootfs" + # Assuming test 1 has run + log "Running Test 2: Measure wall clock of bitbake $IMAGE -c rootfs with sstate" + do_rmtmp + do_sync + bbtime "$IMAGE -c rootfs" }
@@ -314,14 +314,14 @@ bbtime "$IMAGE -c rootfs" test3 () { -log "Running Test 3: Parsing time metrics (bitbake -p)" -log " Removing tmp/cache && cache" -rm -rf tmp/cache cache -bbtime "-p" -log " Removing tmp/cache/default-eglibc/" -rm -rf tmp/cache/default-eglibc/ -bbtime "-p" -bbtime "-p" + log "Running Test 3: Parsing time metrics (bitbake -p)" + log " Removing tmp/cache && cache" + rm -rf tmp/cache cache + bbtime "-p" + log " Removing tmp/cache/default-eglibc/" + rm -rf tmp/cache/default-eglibc/ + bbtime "-p" + bbtime "-p" }
Signature · 1 line
1.8.1.4
PATCH 2/3 scripts/contrib/build-perf-test.sh: skip network sanity tests
In reply to Stefan StanacarWhen your proxy/network connection is unstable the network sanity test which runs before every build (because we wipe all the files in the build dir) can influence build time. Appending CONNECTIVITY_CHECK_URIS = "" in local.conf will disable the check.
--- scripts/contrib/build-perf-test.sh | 4 ++++ 1 file changed, 4 insertions(+)
scripts/contrib/build-perf-test.sh +4 -0
@@ -165,6 +165,10 @@ else echo "DL_DIR = \"$clonedir/build-perf-test/downloads\"" >> conf/local.conf fi +# Sometimes I've noticed big differences in timings for the same commit, on the same machine +# Disabling the network sanity check helps a bit (because of my crappy network connection and/or proxy) +echo "CONNECTIVITY_CHECK_URIS =\"\"" >> conf/local.conf + # # Functions #
Signature · 1 line
1.8.1.4
PATCH 3/3 scripts/contrib/build-perf-test.sh: change the global results format
In reply to Stefan StanacarWhen all builds have finished write the hostname, commit and times on a single line in the global results file (useful for merging later on files from multiple systems).
Also the final cleaning should be last after writing the results.
--- scripts/contrib/build-perf-test.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
scripts/contrib/build-perf-test.sh +12 -8
@@ -239,6 +239,15 @@ do_sync () { sleep 3 } +write_results() { + echo -n "`uname -n`,$rev," >> $globalres + for i in "${TIMES[@]}"; do + echo -n "$i," >> $globalres + done + echo >> $globalres + sed -i '$ s/,$//' $globalres +} + #### #
@@ -338,15 +347,10 @@ test1_p3 test2 test3 +# if we got til here write to global results +write_results + log "All done, cleaning up..." do_rmtmp do_rmsstate - -# if we got til here write to global results -echo "$rev" >> $globalres -for i in "${TIMES[@]}"; do - echo -n "$i," >> $globalres -done -echo >> $globalres -sed -i '$ s/,$//' $globalres
Signature · 1 line
1.8.1.4