Install using go >= 1.16
go install github.com/bojand/ghz/cmd/ghz@latest
zzh@ZZHPC:/zdata/Github/zgrpc-go-professionals$ ghz --proto ./proto/todo/v2/todo.proto \ --import-paths=proto \ --call todo.v2.TodoService.AddTask \ --data '{"description": "task"}' \ --cacert ./certs/ca_cert.pem \ --cname "check.test.example.com" \ --metadata '{"auth_token": "authd"}' \ 0.0.0.0:50051 Summary: Count: 200 Total: 35.98 ms Slowest: 17.31 ms Fastest: 0.49 ms Average: 7.12 ms Requests/sec: 5558.30 Response time histogram: 0.488 [1] |∎ 2.170 [16] |∎∎∎∎∎∎∎∎∎∎∎∎ 3.853 [53] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎ 5.535 [22] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎ 7.217 [19] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎ 8.899 [28] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎ 10.582 [12] |∎∎∎∎∎∎∎∎∎ 12.264 [16] |∎∎∎∎∎∎∎∎∎∎∎∎ 13.946 [14] |∎∎∎∎∎∎∎∎∎∎∎ 15.628 [11] |∎∎∎∎∎∎∎∎ 17.311 [8] |∎∎∎∎∎∎ Latency distribution: 10 % in 2.54 ms 25 % in 3.56 ms 50 % in 6.02 ms 75 % in 10.25 ms 90 % in 13.92 ms 95 % in 14.87 ms 99 % in 17.18 ms Status code distribution: [OK] 200 responses
标签:load,proto,GRPC,tool,ghz,--,ms,go,todo From: https://www.cnblogs.com/zhangzhihui/p/18188102