github.com/rsc/tmp@v0.0.0-20240517235954-6deaab19748b/grpcbench/run.sh (about)

     1  #!/bin/bash
     2  
     3  set -e
     4  
     5  echo "Duration	Latency	Proto"
     6  go build -o grpcbench
     7  for latency in 0 1 2 4 8 16 32; do
     8  	for grpc in true false; do
     9  		for http2 in true false; do
    10  			if [[ "$grpc" == "true" && "$http2" == "false" ]]; then
    11  				continue
    12  			fi
    13  			echo
    14  			./grpcbench -latency=${latency}ms -grpc=$grpc -http2=$http2 -n 5
    15  		done
    16  	done
    17  done