Skip to content

Commit d93339f

Browse files
committed
Utility script to extract times from buildbot runs.
- Legacy-Id: 800
1 parent 9059da0 commit d93339f

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

test/show-times

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# Since it's a pain to manually update the acceptable diffs, this script will pick
4+
# new and modified diffs from the buildbot results, massage them slightly, display
5+
# the difference between the old and new (or the new if no old one) and ask
6+
# whether the diff should be updated.
7+
#
8+
# This script assumes that buildbot log files are available in $bblogdir; this
9+
# will be true only on the buildbot master.
10+
11+
program=${0##*/}
12+
progdir=${0%/*}
13+
14+
bblogdir=/var/lib/buildbot/master/ietfdb/builder1
15+
16+
function die() { echo "$program: $*"; echo "Terminating"; exit 1; }
17+
18+
sudo chown buildbot:staff -R $bblogdir
19+
sudo chmod g+rw -R $bblogdir
20+
21+
latest=$(ls $bblogdir | egrep "^[0-9]+$" | sort -nr | head -n 1)
22+
23+
function urltimes() {
24+
awk '
25+
/^OK/ { path = $3 }
26+
/^ *2007-/ { time[path] = substr($2, 2) }
27+
END { for (path in time) { printf "%8s %s\n", time[path], path } }
28+
' "$@"
29+
}
30+
31+
echo "Longest URL fetch times from build $latest:"
32+
cat $bblogdir/$latest-log-django-test-stdio | tr -d "\r" | urltimes | sort -n | tail

0 commit comments

Comments
 (0)