Update benchmark.sh
This commit is contained in:
		@@ -2,9 +2,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
functions=(hello)
 | 
					functions=(hello)
 | 
				
			||||||
connections=(2 5 10 20 50 100 200 400 500 1000)
 | 
					connections=(2 5 10 20 50 100 200 400 500 1000)
 | 
				
			||||||
times=(10s 30s 1m 5m 15m)
 | 
					times=(1m)
 | 
				
			||||||
data=(isprime)
 | 
					data=(isprime)
 | 
				
			||||||
kuberhost="node1:32764"
 | 
					kuberhost="node1:32764"
 | 
				
			||||||
 | 
					maxthreads=160
 | 
				
			||||||
 | 
					
 | 
				
			||||||
WRK_INSTALLED=$(which wrk)
 | 
					WRK_INSTALLED=$(which wrk)
 | 
				
			||||||
if [ "$WRK_INSTALLED" = "" ]
 | 
					if [ "$WRK_INSTALLED" = "" ]
 | 
				
			||||||
@@ -34,11 +35,11 @@ do
 | 
				
			|||||||
    echo -e "\n"
 | 
					    echo -e "\n"
 | 
				
			||||||
    for connection in "${connections[@]}"
 | 
					    for connection in "${connections[@]}"
 | 
				
			||||||
    do
 | 
					    do
 | 
				
			||||||
        if [[ $connection -lt 41 ]]
 | 
					        if [[ $connection -lt $(($maxthreads + 1)) ]]
 | 
				
			||||||
        then
 | 
					        then
 | 
				
			||||||
            threads=$(($connection-1))
 | 
					            threads=$(($connection-1))
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            threads=40
 | 
					            threads=$maxthreads
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
        echo -e "Threads: $threads Connections $connection\n"
 | 
					        echo -e "Threads: $threads Connections $connection\n"
 | 
				
			||||||
	for time in "${times[@]}"
 | 
						for time in "${times[@]}"
 | 
				
			||||||
@@ -60,11 +61,11 @@ do
 | 
				
			|||||||
    echo -e "\n"
 | 
					    echo -e "\n"
 | 
				
			||||||
    for connection in "${connections[@]}"
 | 
					    for connection in "${connections[@]}"
 | 
				
			||||||
    do
 | 
					    do
 | 
				
			||||||
        if [[ $connection -lt 41 ]]
 | 
					        if [[ $connection -lt $(($maxthreads + 1)) ]]
 | 
				
			||||||
        then
 | 
					        then
 | 
				
			||||||
            threads=$(($connection-1))
 | 
					            threads=$(($connection-1))
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            threads=40
 | 
					            threads=$maxthreads
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
        echo -e "Threads: $threads Connections $connection\n"
 | 
					        echo -e "Threads: $threads Connections $connection\n"
 | 
				
			||||||
	for time in "${times[@]}"
 | 
						for time in "${times[@]}"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user