From: Dan Mick Date: Sat, 16 Jan 2016 05:29:25 +0000 (-0800) Subject: build-ceph.sh: track and report total runtime X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e0af3d35bdabdf00311ae277dbd3cacf87454c9f;p=autobuild-ceph.git build-ceph.sh: track and report total runtime Signed-off-by: Dan Mick --- diff --git a/build-ceph.sh b/build-ceph.sh index 1345b0f..9bad6fe 100755 --- a/build-ceph.sh +++ b/build-ceph.sh @@ -1,6 +1,12 @@ #!/bin/bash -x set -e +SECONDS=0 + +function print_runtime() { + printf "Total run time: %d:%02d\n" $((SECONDS / 60 )) $((SECONDS % 60)) +} + git submodule foreach 'git clean -fdx && git reset --hard' rm -rf ceph-object-corpus rm -rf ceph-erasure-code-corpus @@ -89,7 +95,7 @@ make -j$(get_processors) "$@" || exit 4 # run "make check", but give it a time limit in case a test gets stuck -trap "pkill -9 ceph-osd || true ; pkill -9 ceph-mon || true" EXIT +trap "pkill -9 ceph-osd || true ; pkill -9 ceph-mon || true; print_runtime" EXIT if ! ../maxtime 5400 make $(maybe_parallel_make_check) check "$@" ; then display_failures .