-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-nh.sh
executable file
·35 lines (27 loc) · 945 Bytes
/
test-nh.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
iterations="$1"
path=`dirname $0`
path=`cd "$path"; pwd`
echo $path
cd "$path"
declare rps=0
for ((i=1;i<=iterations;i++));
do
declare sum=0
let rps=$i*500
echo "Testing envoy performance using nighthawk request per second is "$rps" ... "
for((j=1; j<=10; j++))
do
taskset -c 11-13 bazel-bin/nighthawk_client --rps $rps --connections 4 --concurrency 4 --request-body-size 16384 --prefetch-connections -v info http://127.0.0.1:10000/ | grep mean | awk '{print $8*1000+$9}' | tr -d 'a-zA-Z'| head -1 >>$rps.log
done
for((j=1; j<=10; j++))
do
temp='sed -n '$j'p '$rps'.log'
temp=$($temp)
echo $temp
let sum+=$temp
done
echo "$sum" >>sum.log
done
echo "*******************************************Testing over*************************************"
#less ../test-example/cpu_interim.log | awk '{print $9}' | sed -e '/^$/d' >>../test-example/cpu_memcpy_result.log