Skip to content

Instantly share code, notes, and snippets.

@fjrti
Created March 17, 2021 03:21
Show Gist options
  • Save fjrti/54cc74d0b3a971f67788da5d105c05b5 to your computer and use it in GitHub Desktop.
Save fjrti/54cc74d0b3a971f67788da5d105c05b5 to your computer and use it in GitHub Desktop.
#!/bin/bash
vip=172.21.15.128
stime=15
run_wrk_short() {
echo "==== short connection: with $1 task, $2 connection =="
wrk2 -H "Connection: Close" -t $1 -c $2 -d 30s -R 30000 http://$vip --latency
sleep $stime
}
run_wrk_long() {
echo "==== long connection: with $1 task, $2 connection =="
wrk2 -t $1 -c $2 -d 15s -R 50000 http://$vip --latency
sleep $stime
}
run_wrk_short 2 10
run_wrk_short 4 20
run_wrk_short 4 40
run_wrk_short 4 100
run_wrk_short 4 200
run_wrk_short 4 300
run_wrk_short 4 500
run_wrk_short 4 1000
run_wrk_short 8 1000
run_wrk_short 8 2000
run_wrk_short 8 3000
run_wrk_short 8 4000
run_wrk_short 8 5000
run_wrk_short 8 10000
run_wrk_long 2 10
run_wrk_long 4 20
run_wrk_long 4 40
run_wrk_long 4 100
run_wrk_long 4 200
run_wrk_long 4 300
run_wrk_long 4 500
run_wrk_long 4 1000
run_wrk_long 8 1000
run_wrk_long 8 2000
run_wrk_long 8 3000
run_wrk_long 8 4000
run_wrk_long 8 5000
run_wrk_long 8 10000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment