docs: add benchmarking script

This commit is contained in:
Bobby DeSimone 2019-02-17 18:57:00 -08:00
parent 88b7766c7d
commit ede412448a
No known key found for this signature in database
GPG key ID: AEE4CF12FE86D07E

16
scripts/vegeta_benchmark.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
# see: https://github.com/tsenart/vegeta
cookie='cookie: _pomerium_proxy=REPLACE_ME'
url='GET https://hi.corp.beyondperimeter.com/'
rate=100
until [ $rate -gt 10001 ]; do
echo "${url}" | vegeta attack -header "${cookie}" -name=$rate -rate=$rate -duration=5s >results.$rate.bin
let rate+=100
sleep 10
done
for filename in results.*; do
cat "$filename" | vegeta report
cat "$filename" | vegeta report -type="hist[0,50ms,100ms,200ms,300ms,500ms,1000ms]"
done