diff options
author | Stefan Stanacar <stefanx.stanacar@intel.com> | 2013-06-12 18:07:19 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-13 17:38:10 +0100 |
commit | b7308e7814a9a3c7dee2477acca7e4b7a176cc1d (patch) | |
tree | b98ddd5baa325bfc3565418989c504bb66a638df /scripts/contrib/build-perf-test.sh | |
parent | 9d39cdc28baf8e689ce69803deefc343d3117101 (diff) | |
download | poky-b7308e7814a9a3c7dee2477acca7e4b7a176cc1d.tar.gz |
scripts/contrib/build-perf-test.sh: add branch name and sizes to results
Be more descriptive about the revision we are running on
in the global results file: add branch:commit and git describe fields.
Also add the sizes for tmp dir not only times. (previously these were
only available in the output.log)
(From OE-Core rev: 769a2c8ce797ee3afa39ab0fe9d9206a60cc4ba1)
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/build-perf-test.sh')
-rwxr-xr-x | scripts/contrib/build-perf-test.sh | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/scripts/contrib/build-perf-test.sh b/scripts/contrib/build-perf-test.sh index 0af2cfea0e..8d243f0f30 100755 --- a/scripts/contrib/build-perf-test.sh +++ b/scripts/contrib/build-perf-test.sh | |||
@@ -112,9 +112,9 @@ if [ $reqpass -ne 0 ]; then | |||
112 | fi | 112 | fi |
113 | 113 | ||
114 | if [ -n "$commit" ]; then | 114 | if [ -n "$commit" ]; then |
115 | echo "git checkout $commit" | 115 | echo "git checkout -f $commit" |
116 | git pull > /dev/null 2>&1 | 116 | git pull > /dev/null 2>&1 |
117 | git checkout $commit || exit 1 | 117 | git checkout -f $commit || exit 1 |
118 | git pull > /dev/null 2>&1 | 118 | git pull > /dev/null 2>&1 |
119 | fi | 119 | fi |
120 | 120 | ||
@@ -144,8 +144,9 @@ log () { | |||
144 | # Config stuff | 144 | # Config stuff |
145 | # | 145 | # |
146 | 146 | ||
147 | rev=$(git rev-parse HEAD) || exit 1 | 147 | branch=`git branch 2>&1 | grep "^* " | tr -d "* "` |
148 | log "Git revision is $rev" | 148 | gitcommit=$(git rev-parse HEAD) || exit 1 |
149 | log "Running on $branch:$gitcommit" | ||
149 | 150 | ||
150 | source ./oe-init-build-env $OUTDIR/build >/dev/null || exit 1 | 151 | source ./oe-init-build-env $OUTDIR/build >/dev/null || exit 1 |
151 | cd $OUTDIR/build | 152 | cd $OUTDIR/build |
@@ -175,6 +176,8 @@ echo "CONNECTIVITY_CHECK_URIS =\"\"" >> conf/local.conf | |||
175 | 176 | ||
176 | declare -a TIMES | 177 | declare -a TIMES |
177 | time_count=0 | 178 | time_count=0 |
179 | declare -a SIZES | ||
180 | size_count=0 | ||
178 | 181 | ||
179 | bbtime () { | 182 | bbtime () { |
180 | log " Timing: bitbake $1" | 183 | log " Timing: bitbake $1" |
@@ -240,10 +243,13 @@ do_sync () { | |||
240 | } | 243 | } |
241 | 244 | ||
242 | write_results() { | 245 | write_results() { |
243 | echo -n "`uname -n`,$rev," >> $globalres | 246 | echo -n "`uname -n`,$branch:$gitcommit,`git describe`," >> $globalres |
244 | for i in "${TIMES[@]}"; do | 247 | for i in "${TIMES[@]}"; do |
245 | echo -n "$i," >> $globalres | 248 | echo -n "$i," >> $globalres |
246 | done | 249 | done |
250 | for i in "${SIZES[@]}"; do | ||
251 | echo -n "$i," >> $globalres | ||
252 | done | ||
247 | echo >> $globalres | 253 | echo >> $globalres |
248 | sed -i '$ s/,$//' $globalres | 254 | sed -i '$ s/,$//' $globalres |
249 | } | 255 | } |
@@ -276,7 +282,9 @@ test1_p1 () { | |||
276 | do_rmsstate | 282 | do_rmsstate |
277 | do_sync | 283 | do_sync |
278 | bbtime "$IMAGE" | 284 | bbtime "$IMAGE" |
279 | log "SIZE of tmp dir is: `du -sh tmp | sed 's/tmp//'`" | 285 | s=`du -sh tmp | sed 's/tmp//'` |
286 | SIZES[(( size_count++ ))]="$s" | ||
287 | log "SIZE of tmp dir is: $s" | ||
280 | log "Buildstats are saved in $OUTDIR/buildstats-test1" | 288 | log "Buildstats are saved in $OUTDIR/buildstats-test1" |
281 | mv tmp/buildstats $OUTDIR/buildstats-test1 | 289 | mv tmp/buildstats $OUTDIR/buildstats-test1 |
282 | } | 290 | } |
@@ -297,7 +305,9 @@ test1_p3 () { | |||
297 | do_sync | 305 | do_sync |
298 | bbtime "$IMAGE" | 306 | bbtime "$IMAGE" |
299 | sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf | 307 | sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf |
300 | log "SIZE of tmp dir is: `du -sh tmp | sed 's/tmp//'`" | 308 | s=`du -sh tmp | sed 's/tmp//'` |
309 | SIZES[(( size_count++ ))]="$s" | ||
310 | log "SIZE of tmp dir is: $s" | ||
301 | log "Buildstats are saved in $OUTDIR/buildstats-test13" | 311 | log "Buildstats are saved in $OUTDIR/buildstats-test13" |
302 | mv tmp/buildstats $OUTDIR/buildstats-test13 | 312 | mv tmp/buildstats $OUTDIR/buildstats-test13 |
303 | } | 313 | } |