diff --git a/README.md b/README.md index d5a842e..a68bd12 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ vagrant up vagrant ssh cd /vagrant -crystal run src/main.cr +clear && crystal run src/main.cr -vagrant halt \ No newline at end of file +vagrant halt + +vegeta attack -targets targets.txt -rate=20 -duration=30s + +vegeta attack -targets=targets.txt -name=300qps -rate=300 -duration=25s > results.300qps.bin;cat results.300qps.bin | vegeta plot > plot.300qps.html diff --git a/Vagrantfile b/Vagrantfile index 5322f72..9a8058f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -10,6 +10,10 @@ Vagrant.configure("2") do |config| echo #{ssh_pub_key} >> /root/.ssh/authorized_keys curl -fsSL https://crystal-lang.org/install.sh | sudo bash + + curl -LO https://github.com/tsenart/vegeta/releases/download/v12.7.0/vegeta-12.7.0-linux-amd64.tar.gz + tar -zxvf vegeta-12.7.0-linux-amd64.tar.gz + sudo mv ./vegeta /usr/bin/vegeta SHELL end config.vm.provider "virtualbox" do |v| diff --git a/targets.txt b/targets.txt new file mode 100644 index 0000000..645688b --- /dev/null +++ b/targets.txt @@ -0,0 +1 @@ +GET http://127.0.0.1:8000 \ No newline at end of file