Skip to content

Instantly share code, notes, and snippets.

@mwhudson
Created March 21, 2016 22:00
Show Gist options
  • Save mwhudson/21783bf20a0f8af3e765 to your computer and use it in GitHub Desktop.
Save mwhudson/21783bf20a0f8af3e765 to your computer and use it in GitHub Desktop.
#!/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