diff --git a/README b/README index 5b10a39..83acd30 100644 --- a/README +++ b/README @@ -1,3 +1,17 @@ Goto - A URL shortening service -This code is the basis of the presentation 'Practical Go Programming'. +This code is the basis of the presentation 'Practical Go Programming', +available in the talk/ directory. + +The accompanying code samples are in talk/code. + +The code in the main directory is the full-featured URL shortener, complete +with bindings to github.com/nf/stat, a statistics-collection library. + +There is a stress tester in bench/, which also depends on stat. + +The demo.sh script launches the stats server (stat must be checked out and +built in ../stat), 4 goto servers (3 slaves and 1 master), and several +iterations of the stress-tester. + +Run it and visit http://localhost:8090/ for a pretty graph. diff --git a/demo.sh b/demo.sh index 71bcc89..a3c5b57 100755 --- a/demo.sh +++ b/demo.sh @@ -20,37 +20,37 @@ sleep 1 echo "Testing the master (n=1)" bench/bench -host=localhost:8080 -n=1 & pid=$! -sleep 15 +read kill $pid echo "Testing the master (n=10)" bench/bench -host=localhost:8080 -n=10 & pid=$! -sleep 15 +read kill $pid echo "Testing 1 slave (n=10)" bench/bench -host=localhost:8081 -n=10 & pid=$! -sleep 15 +read kill $pid echo "Testing 2 slaves (n=10)" bench/bench -host=localhost:8081,localhost:8082 -n=10 & pid=$! -sleep 15 +read kill $pid echo "Testing 3 slaves (n=10)" bench/bench -host=localhost:8081,localhost:8082,localhost:8083 -n=10 & pid=$! -sleep 15 +read kill $pid echo "Testing 3 slaves (n=20)" bench/bench -host=localhost:8081,localhost:8082,localhost:8083 -n=20 & pid=$! -sleep 30 +read kill $pid echo "Shutting down" @@ -59,4 +59,3 @@ kill $master_pid kill $slave1_pid kill $slave2_pid kill $slave3_pid -echo "Done"