feat: setup vegeta
This commit is contained in:
parent
371899180b
commit
a3a1c46562
|
|
@ -2,6 +2,10 @@ vagrant up
|
||||||
vagrant ssh
|
vagrant ssh
|
||||||
|
|
||||||
cd /vagrant
|
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
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@ Vagrant.configure("2") do |config|
|
||||||
echo #{ssh_pub_key} >> /root/.ssh/authorized_keys
|
echo #{ssh_pub_key} >> /root/.ssh/authorized_keys
|
||||||
|
|
||||||
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
|
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
|
SHELL
|
||||||
end
|
end
|
||||||
config.vm.provider "virtualbox" do |v|
|
config.vm.provider "virtualbox" do |v|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
GET http://127.0.0.1:8000
|
||||||
Loading…
Reference in New Issue