Created
March 21, 2016 22:00
-
-
Save mwhudson/21783bf20a0f8af3e765 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
buildlog=$(go build -o /tmp/blah -x -work $2 2>&1) | |
eval $(echo "$buildlog" | grep WORK=) | |
linkcmd=$(echo "$buildlog" | grep -F "$(go tool -n link)") | |
for i in `seq $1`; do | |
eval /usr/bin/time -f '"BenchmarkLink$3 1 %e secs %M MaxRSS"' $linkcmd | |
done | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
echo "Building go $1" | |
(cd /opt/opensource/go/src; git checkout $1; ./make.bash > /dev/null 2>&1) | |
echo "installing juju with $1" | |
go install github.com/juju/juju/cmd/juju | |
echo "Benchmarking go old" | |
~/bin/benchlink.sh 100 cmd/go CmdGo 2>&1 > old.txt 2>&1 | |
echo "Benchmarking juju old" | |
~/bin/benchlink.sh 100 github.com/juju/juju/cmd/juju Juju >> old.txt 2>&1 | |
echo "Building go $2" | |
(cd /opt/opensource/go/src; git checkout $2; ./make.bash > /dev/null 2>&1) | |
echo "installing juju with $2" | |
go install github.com/juju/juju/cmd/juju | |
echo "Benchmarking go new" | |
~/bin/benchlink.sh 100 cmd/go CmdGo 2>&1 > new.txt 2>&1 | |
echo "Benchmarking juju new" | |
~/bin/benchlink.sh 100 github.com/juju/juju/cmd/juju Juju >> new.txt 2>&1 | |
benchstat old.txt new.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment