feat: setup vegeta

This commit is contained in:
Aymeric GUERACAGUE 2021-03-28 16:45:55 +02:00
parent 371899180b
commit a3a1c46562
Signed by: Superkooka
GPG Key ID: F78F2B172E894865
3 changed files with 11 additions and 2 deletions

View File

@ -2,6 +2,10 @@ vagrant up
vagrant ssh
cd /vagrant
crystal run src/main.cr
clear && crystal run src/main.cr
vagrant halt
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

4
Vagrantfile vendored
View File

@ -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|

1
targets.txt Normal file
View File

@ -0,0 +1 @@
GET http://127.0.0.1:8000