Update benchmark.sh
This commit is contained in:
parent
0cf404a6b2
commit
b921dc9bfa
@ -1,17 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
functions=(hello)
|
|
||||||
# 5 10 20 50 100 200 400 500 1000
|
|
||||||
connections=(2)
|
|
||||||
times=(1m)
|
|
||||||
data=(isprime)
|
|
||||||
kuberhost="node1:32764"
|
|
||||||
maxthreads=160
|
|
||||||
wrk_options=(-t$threads -d$time -c$connection $(array_contains data function && "-s$function.wrk") -H"Host: $function.kubeless" -H"Content-Type:application/json" --latency http://$kuberhost/$function)
|
|
||||||
wrk_output=$function.$connection.$time.txt
|
|
||||||
hey_options=(-c $connection -z $time -o csv -m POST -host "$function.kubeless" $(array_contains data function && "-D $function.body") -T "application/json" http://$kuberhost/$function)
|
|
||||||
hey_output=$function.$connection.$time.csv
|
|
||||||
|
|
||||||
array_contains () {
|
array_contains () {
|
||||||
local array="$1[@]"
|
local array="$1[@]"
|
||||||
local seeking=$2
|
local seeking=$2
|
||||||
@ -25,6 +13,18 @@ array_contains () {
|
|||||||
return $in
|
return $in
|
||||||
}
|
}
|
||||||
|
|
||||||
|
functions=(hello)
|
||||||
|
# 5 10 20 50 100 200 400 500 1000
|
||||||
|
connections=(2)
|
||||||
|
times=(1m)
|
||||||
|
data=(isprime)
|
||||||
|
kuberhost="node1:32764"
|
||||||
|
maxthreads=160
|
||||||
|
wrk_options=(-t$threads -d$time -c$connection $(array_contains data function && "-s$function.wrk") -H"Host: $function.kubeless" -H"Content-Type:application/json" --latency http://$kuberhost/$function)
|
||||||
|
wrk_output=$function.$connection.$time.txt
|
||||||
|
hey_options=(-c $connection -z $time -o csv -m POST -host "$function.kubeless" $(array_contains data function && "-D $function.body") -T "application/json" http://$kuberhost/$function)
|
||||||
|
hey_output=$function.$connection.$time.csv
|
||||||
|
|
||||||
WRK_INSTALLED=$(which wrk)
|
WRK_INSTALLED=$(which wrk)
|
||||||
if [ "$WRK_INSTALLED" = "" ]
|
if [ "$WRK_INSTALLED" = "" ]
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user