|
13 | 13 | [](https://www.paypal.me/bojandj) |
14 | 14 | [](https://www.buymeacoffee.com/bojand) |
15 | 15 |
|
16 | | -Simple [gRPC](http://grpc.io/) benchmarking and load testing tool inspired by [hey](https://github.com/rakyll/hey/) and [grpcurl](https://github.com/fullstorydev/grpcurl). |
| 16 | +[gRPC](http://grpc.io/) benchmarking and load testing tool. |
17 | 17 |
|
18 | 18 | ## Documentation |
19 | 19 |
|
@@ -59,62 +59,66 @@ go build . |
59 | 59 | usage: ghz [<flags>] [<host>] |
60 | 60 |
|
61 | 61 | Flags: |
62 | | - -h, --help Show context-sensitive help (also try --help-long and --help-man). |
63 | | - --config= Path to the JSON or TOML config file that specifies all the test run settings. |
64 | | - --proto= The Protocol Buffer .proto file. |
65 | | - --protoset= The compiled protoset file. Alternative to proto. -proto takes precedence. |
66 | | - --call= A fully-qualified method name in 'package.Service/method' or 'package.Service.Method' format. |
67 | | - -i, --import-paths= Comma separated list of proto import paths. The current working directory and the directory of the protocol buffer file are automatically added to the import list. |
68 | | - --cacert= File containing trusted root certificates for verifying the server. |
69 | | - --cert= File containing client certificate (public key), to present to the server. Must also provide -key option. |
70 | | - --key= File containing client private key, to present to the server. Must also provide -cert option. |
71 | | - --cname= Server name override when validating TLS certificate - useful for self signed certs. |
72 | | - --skipTLS Skip TLS client verification of the server's certificate chain and host name. |
73 | | - --insecure Use plaintext and insecure connection. |
74 | | - --authority= Value to be used as the :authority pseudo-header. Only works if -insecure is used. |
75 | | - --async Make requests asynchronous as soon as possible. Does not wait for request to finish before sending next one. |
76 | | - -r, --rps=0 Requests per second (RPS) rate limit for constant load schedule. Default is no rate limit. |
77 | | - --load-schedule="const" Specifies the load schedule. Options are const, step, or line. Default is const. |
78 | | - --load-start=0 Specifies the RPS load start value for step or line schedules. |
79 | | - --load-step=0 Specifies the load step value or slope value. |
80 | | - --load-end=0 Specifies the load end value for step or line load schedules. |
81 | | - --load-step-duration=0 Specifies the load step duration value for step load schedule. |
82 | | - --load-max-duration=0 Specifies the max load duration value for step or line load schedule. |
83 | | - -c, --concurrency=50 Number of request workers to run concurrently for const concurrency schedule. Default is 50. |
| 62 | + -h, --help Show context-sensitive help (also try --help-long and --help-man). |
| 63 | + --config= Path to the JSON or TOML config file that specifies all the test run settings. |
| 64 | + --proto= The Protocol Buffer .proto file. |
| 65 | + --protoset= The compiled protoset file. Alternative to proto. -proto takes precedence. |
| 66 | + --call= A fully-qualified method name in 'package.Service/method' or 'package.Service.Method' format. |
| 67 | + -i, --import-paths= Comma separated list of proto import paths. The current working directory and the directory of the protocol buffer file are automatically added to the import list. |
| 68 | + --cacert= File containing trusted root certificates for verifying the server. |
| 69 | + --cert= File containing client certificate (public key), to present to the server. Must also provide -key option. |
| 70 | + --key= File containing client private key, to present to the server. Must also provide -cert option. |
| 71 | + --cname= Server name override when validating TLS certificate - useful for self signed certs. |
| 72 | + --skipTLS Skip TLS client verification of the server's certificate chain and host name. |
| 73 | + --insecure Use plaintext and insecure connection. |
| 74 | + --authority= Value to be used as the :authority pseudo-header. Only works if -insecure is used. |
| 75 | + --async Make requests asynchronous as soon as possible. Does not wait for request to finish before sending next one. |
| 76 | + -r, --rps=0 Requests per second (RPS) rate limit for constant load schedule. Default is no rate limit. |
| 77 | + --load-schedule="const" Specifies the load schedule. Options are const, step, or line. Default is const. |
| 78 | + --load-start=0 Specifies the RPS load start value for step or line schedules. |
| 79 | + --load-step=0 Specifies the load step value or slope value. |
| 80 | + --load-end=0 Specifies the load end value for step or line load schedules. |
| 81 | + --load-step-duration=0 Specifies the load step duration value for step load schedule. |
| 82 | + --load-max-duration=0 Specifies the max load duration value for step or line load schedule. |
| 83 | + -c, --concurrency=50 Number of request workers to run concurrently for const concurrency schedule. Default is 50. |
84 | 84 | --concurrency-schedule="const" |
85 | | - Concurrency change schedule. Options are const, step, or line. Default is const. |
86 | | - --concurrency-start=0 Concurrency start value for step and line concurrency schedules. |
87 | | - --concurrency-end=0 Concurrency end value for step and line concurrency schedules. |
88 | | - --concurrency-step=1 Concurrency step / slope value for step and line concurrency schedules. |
| 85 | + Concurrency change schedule. Options are const, step, or line. Default is const. |
| 86 | + --concurrency-start=0 Concurrency start value for step and line concurrency schedules. |
| 87 | + --concurrency-end=0 Concurrency end value for step and line concurrency schedules. |
| 88 | + --concurrency-step=1 Concurrency step / slope value for step and line concurrency schedules. |
89 | 89 | --concurrency-step-duration=0 |
90 | | - Specifies the concurrency step duration value for step concurrency schedule. |
| 90 | + Specifies the concurrency step duration value for step concurrency schedule. |
91 | 91 | --concurrency-max-duration=0 |
92 | | - Specifies the max concurrency adjustment duration value for step or line concurrency schedule. |
93 | | - -n, --total=200 Number of requests to run. Default is 200. |
94 | | - -t, --timeout=20s Timeout for each request. Default is 20s, use 0 for infinite. |
95 | | - -z, --duration=0 Duration of application to send requests. When duration is reached, application stops and exits. If duration is specified, n is ignored. Examples: -z 10s -z 3m. |
96 | | - -x, --max-duration=0 Maximum duration of application to send requests with n setting respected. If duration is reached before n requests are completed, application stops and exits. Examples: -x 10s -x 3m. |
97 | | - --duration-stop="close" Specifies how duration stop is reported. Options are close, wait or ignore. Default is close. |
98 | | - -d, --data= The call data as stringified JSON. If the value is '@' then the request contents are read from stdin. |
99 | | - -D, --data-file= File path for call data JSON file. Examples: /home/user/file.json or ./file.json. |
100 | | - -b, --binary The call data comes as serialized binary message or multiple count-prefixed messages read from stdin. |
101 | | - -B, --binary-file= File path for the call data as serialized binary message or multiple count-prefixed messages. |
102 | | - -m, --metadata= Request metadata as stringified JSON. |
103 | | - -M, --metadata-file= File path for call metadata JSON file. Examples: /home/user/metadata.json or ./metadata.json. |
104 | | - --stream-interval=0 Interval for stream requests between message sends. |
105 | | - --reflect-metadata= Reflect metadata as stringified JSON used only for reflection request. |
106 | | - -o, --output= Output path. If none provided stdout is used. |
107 | | - -O, --format= Output format. One of: summary, csv, json, pretty, html, influx-summary, influx-details. Default is summary. |
108 | | - --skipFirst=0 Skip the first X requests when doing the results tally. |
109 | | - --connections=1 Number of connections to use. Concurrency is distributed evenly among all the connections. Default is 1. |
110 | | - --connect-timeout=10s Connection timeout for the initial connection dial. Default is 10s. |
111 | | - --keepalive=0 Keepalive time duration. Only used if present and above 0. |
112 | | - --name= User specified name for the test. |
113 | | - --tags= JSON representation of user-defined string tags. |
114 | | - --cpus=12 Number of cpu cores to use. |
115 | | - --debug= The path to debug log file. |
116 | | - -e, --enable-compression Enable Gzip compression on requests. |
117 | | - -v, --version Show application version. |
| 92 | + Specifies the max concurrency adjustment duration value for step or line concurrency schedule. |
| 93 | + -n, --total=200 Number of requests to run. Default is 200. |
| 94 | + -t, --timeout=20s Timeout for each request. Default is 20s, use 0 for infinite. |
| 95 | + -z, --duration=0 Duration of application to send requests. When duration is reached, application stops and exits. If duration is specified, n is ignored. Examples: -z 10s -z 3m. |
| 96 | + -x, --max-duration=0 Maximum duration of application to send requests with n setting respected. If duration is reached before n requests are completed, application stops and exits. Examples: -x 10s -x 3m. |
| 97 | + --duration-stop="close" Specifies how duration stop is reported. Options are close, wait or ignore. Default is close. |
| 98 | + -d, --data= The call data as stringified JSON. If the value is '@' then the request contents are read from stdin. |
| 99 | + -D, --data-file= File path for call data JSON file. Examples: /home/user/file.json or ./file.json. |
| 100 | + -b, --binary The call data comes as serialized binary message or multiple count-prefixed messages read from stdin. |
| 101 | + -B, --binary-file= File path for the call data as serialized binary message or multiple count-prefixed messages. |
| 102 | + -m, --metadata= Request metadata as stringified JSON. |
| 103 | + -M, --metadata-file= File path for call metadata JSON file. Examples: /home/user/metadata.json or ./metadata.json. |
| 104 | + --stream-interval=0 Interval for stream requests between message sends. |
| 105 | + --stream-call-duration=0 Duration after which client will close the stream in each streaming call. |
| 106 | + --stream-call-count=0 Count of messages sent, after which client will close the stream in each streaming call. |
| 107 | + --stream-dynamic-messages In streaming calls, regenerate and apply call template data on every message send. |
| 108 | + --reflect-metadata= Reflect metadata as stringified JSON used only for reflection request. |
| 109 | + -o, --output= Output path. If none provided stdout is used. |
| 110 | + -O, --format= Output format. One of: summary, csv, json, pretty, html, influx-summary, influx-details. Default is summary. |
| 111 | + --skipFirst=0 Skip the first X requests when doing the results tally. |
| 112 | + --count-errors Count erroneous (non-OK) resoponses in stats calculations. |
| 113 | + --connections=1 Number of connections to use. Concurrency is distributed evenly among all the connections. Default is 1. |
| 114 | + --connect-timeout=10s Connection timeout for the initial connection dial. Default is 10s. |
| 115 | + --keepalive=0 Keepalive time duration. Only used if present and above 0. |
| 116 | + --name= User specified name for the test. |
| 117 | + --tags= JSON representation of user-defined string tags. |
| 118 | + --cpus=12 Number of cpu cores to use. |
| 119 | + --debug= The path to debug log file. |
| 120 | + -e, --enable-compression Enable Gzip compression on requests. |
| 121 | + -v, --version Show application version. |
118 | 122 |
|
119 | 123 | Args: |
120 | 124 | [<host>] Host and port to test. |
|
0 commit comments