From d828fc0df44de8c64712e397bceebdbb51d8db17 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Thu, 15 Mar 2018 16:19:04 -0500 Subject: [PATCH] equeue: Added profiling reports to Travis --- .travis.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9de3678080..5aae7c3eb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -115,6 +115,24 @@ matrix: - python tools/make.py -t GCC_ARM -m DISCO_F401VC --source=. --build=BUILD/DISCO_F401VC/GCC_ARM -j0 # Run local equeue tests - make -C $EVENTS/equeue test + # Run profiling tests + - make -C $EVENTS/equeue prof | tee prof + after_success: + # update status if we succeeded, compare with master if possible + - | + CURR=$(grep -o '[0-9]\+ cycles' prof | awk '{sum += $1} END {print sum}') + PREV=$(curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \ + | jq -re "select(.sha != \"$TRAVIS_COMMIT\") + | .statuses[] | select(.context == \"travis-ci/$NAME\").description + | capture(\"runtime is (?[0-9]+)\").runtime" \ + || echo 0) + + STATUSM="Passed, runtime is ${CURR} cycles" + if [ "$PREV" -ne 0 ] + then + STATUSM="$STATUSM ($(python -c "print '%+d' % ($CURR-$PREV)") cycles)" + fi + - bash -c "$STATUS" success "$STATUSM" - env: - NAME=littlefs