Skip to content

Commit 1a2b41c

Browse files
gekyadbridge
authored andcommitted
equeue: Added profiling reports to Travis
1 parent 5cf249a commit 1a2b41c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,24 @@ matrix:
115115
- python tools/make.py -t GCC_ARM -m DISCO_F401VC --source=. --build=BUILD/DISCO_F401VC/GCC_ARM -j0
116116
# Run local equeue tests
117117
- make -C $EVENTS/equeue test
118+
# Run profiling tests
119+
- make -C $EVENTS/equeue prof | tee prof
120+
after_success:
121+
# update status if we succeeded, compare with master if possible
122+
- |
123+
CURR=$(grep -o '[0-9]\+ cycles' prof | awk '{sum += $1} END {print sum}')
124+
PREV=$(curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \
125+
| jq -re "select(.sha != \"$TRAVIS_COMMIT\")
126+
| .statuses[] | select(.context == \"travis-ci/$NAME\").description
127+
| capture(\"runtime is (?<runtime>[0-9]+)\").runtime" \
128+
|| echo 0)
129+
130+
STATUSM="Passed, runtime is ${CURR} cycles"
131+
if [ "$PREV" -ne 0 ]
132+
then
133+
STATUSM="$STATUSM ($(python -c "print '%+d' % ($CURR-$PREV)") cycles)"
134+
fi
135+
- bash -c "$STATUS" success "$STATUSM"
118136

119137
- env:
120138
- NAME=littlefs

0 commit comments

Comments
 (0)