Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] Small changes to the build performance script
@ 2013-04-25 12:10 Stefan Stanacar
  2013-04-25 12:10 ` [PATCH 1/3] scripts/contrib/build-perf-test.sh: use the same identation everywhere Stefan Stanacar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Stanacar @ 2013-04-25 12:10 UTC (permalink / raw)
  To: openembedded-core



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(-)

-- 
1.8.1.4




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] scripts/contrib/build-perf-test.sh: use the same identation everywhere
  2013-04-25 12:10 [PATCH 0/3] Small changes to the build performance script Stefan Stanacar
@ 2013-04-25 12:10 ` Stefan Stanacar
  2013-04-25 12:11 ` [PATCH 2/3] scripts/contrib/build-perf-test.sh: skip network sanity tests Stefan Stanacar
  2013-04-25 12:11 ` [PATCH 3/3] scripts/contrib/build-perf-test.sh: change the global results format Stefan Stanacar
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Stanacar @ 2013-04-25 12:10 UTC (permalink / raw)
  To: openembedded-core

Some functions didn't used the same identation as the rest of them,
let's fix that.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
 scripts/contrib/build-perf-test.sh | 72 +++++++++++++++++++-------------------
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/scripts/contrib/build-perf-test.sh b/scripts/contrib/build-perf-test.sh
index 44a902c..f48220a 100755
--- a/scripts/contrib/build-perf-test.sh
+++ b/scripts/contrib/build-perf-test.sh
@@ -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"
 }
 
 
-- 
1.8.1.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] scripts/contrib/build-perf-test.sh: skip network sanity tests
  2013-04-25 12:10 [PATCH 0/3] Small changes to the build performance script Stefan Stanacar
  2013-04-25 12:10 ` [PATCH 1/3] scripts/contrib/build-perf-test.sh: use the same identation everywhere Stefan Stanacar
@ 2013-04-25 12:11 ` Stefan Stanacar
  2013-04-25 12:11 ` [PATCH 3/3] scripts/contrib/build-perf-test.sh: change the global results format Stefan Stanacar
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Stanacar @ 2013-04-25 12:11 UTC (permalink / raw)
  To: openembedded-core

When 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.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
 scripts/contrib/build-perf-test.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/contrib/build-perf-test.sh b/scripts/contrib/build-perf-test.sh
index f48220a..ee30409 100755
--- a/scripts/contrib/build-perf-test.sh
+++ b/scripts/contrib/build-perf-test.sh
@@ -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
 #
-- 
1.8.1.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] scripts/contrib/build-perf-test.sh: change the global results format
  2013-04-25 12:10 [PATCH 0/3] Small changes to the build performance script Stefan Stanacar
  2013-04-25 12:10 ` [PATCH 1/3] scripts/contrib/build-perf-test.sh: use the same identation everywhere Stefan Stanacar
  2013-04-25 12:11 ` [PATCH 2/3] scripts/contrib/build-perf-test.sh: skip network sanity tests Stefan Stanacar
@ 2013-04-25 12:11 ` Stefan Stanacar
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Stanacar @ 2013-04-25 12:11 UTC (permalink / raw)
  To: openembedded-core

When 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.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
 scripts/contrib/build-perf-test.sh | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/scripts/contrib/build-perf-test.sh b/scripts/contrib/build-perf-test.sh
index ee30409..0af2cfe 100755
--- a/scripts/contrib/build-perf-test.sh
+++ b/scripts/contrib/build-perf-test.sh
@@ -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
-- 
1.8.1.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-25 12:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25 12:10 [PATCH 0/3] Small changes to the build performance script Stefan Stanacar
2013-04-25 12:10 ` [PATCH 1/3] scripts/contrib/build-perf-test.sh: use the same identation everywhere Stefan Stanacar
2013-04-25 12:11 ` [PATCH 2/3] scripts/contrib/build-perf-test.sh: skip network sanity tests Stefan Stanacar
2013-04-25 12:11 ` [PATCH 3/3] scripts/contrib/build-perf-test.sh: change the global results format Stefan Stanacar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox