Last active
January 14, 2016 23:09
-
-
Save captncraig/f953339f5c97ece37bdf 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
apt-get update | |
apt-get install -y curl git mercurial make binutils bison gcc build-essential | |
git clone https://go.googlesource.com/go go14 | |
git clone go14 go15 | |
git clone go14 go16 | |
#build all go versions | |
cd go14/src | |
git checkout go1.4.3 | |
./make.bash | |
export GOROOT_BOOTSTRAP=/root/go14 | |
cd ~/go15/src | |
git checkout go1.5.2 | |
./make.bash | |
cd ~/go16/src | |
git checkout go1.6beta2 | |
./make.bash | |
#install caddy | |
export GOPATH=~/gopath | |
~/go14/bin/go get -d -v github.com/mholt/caddy | |
#checkout target tag | |
cd ~/gopath/src/github.com/mholt/caddy | |
git checkout master | |
#build all the caddys | |
cd ~ | |
~/go14/bin/go build -o caddy14 github.com/mholt/caddy | |
~/go15/bin/go build -o caddy15 github.com/mholt/caddy | |
~/go16/bin/go build -o caddy16 github.com/mholt/caddy | |
git clone https://github.com/wg/wrk.git | |
cd wrk | |
apt-get install -y openssl libssl-dev | |
make | |
cd ~ | |
#generate keys and setup test files | |
openssl ecparam -name secp521r1 -genkey -out localhost.key | |
openssl req -new -x509 -key localhost.key -out localhost.cert -days 730 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=localhost" | |
echo "test" > index.html | |
cat > Caddyfile << EOL | |
localhost:2015 { | |
} | |
localhost:2016 { | |
tls localhost.cert localhost.key | |
} | |
EOL |
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
echo "GO 1.6beta2" | |
./caddy16 -pidfile c.pid & | |
sleep 5 | |
wrk/wrk -t12 -c400 -d5m http://localhost:2015 | |
kill `cat c.pid` | |
echo "SLEEPING 3 min" | |
sleep 3m | |
echo "GO 1.4.3" | |
./caddy14 -pidfile c.pid & | |
sleep 5 | |
wrk/wrk -t12 -c400 -d5m http://localhost:2015 | |
kill `cat c.pid` | |
echo "SLEEPING 3 min" | |
sleep 3m | |
echo "GO 1.5.2" | |
./caddy15 -pidfile c.pid & | |
sleep 5 | |
wrk/wrk -t12 -c400 -d5m http://localhost:2015 | |
kill `cat c.pid` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment