diff --git a/src/node/stress/stress_client.js b/src/node/stress/stress_client.js index 8332652e2a92d7470c36d2ec8bc0e16676b80e21..8c76f0c279ef8a7c29116e7f5acbc2647a60209f 100644 --- a/src/node/stress/stress_client.js +++ b/src/node/stress/stress_client.js @@ -102,7 +102,7 @@ function main() { var argv = parseArgs(process.argv, { string: ['server_addresses', 'test_cases', 'metrics_port'], default: {'server_addresses': 'localhost:8080', - 'test_duration-secs': -1, + 'test_duration_secs': -1, 'num_channels_per_server': 1, 'num_stubs_per_channel': 1, 'metrics_port': '8081'} @@ -118,8 +118,8 @@ function main() { })); start(server_addresses, test_cases, argv.num_channels_per_server, argv.num_stubs_per_channel, argv.metrics_port); - if (argv['test_duration-secs'] > -1) { - setTimeout(stop, argv['test_duration-secs'] * 1000); + if (argv['test_duration_secs'] > -1) { + setTimeout(stop, argv['test_duration_secs'] * 1000); } } diff --git a/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md b/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md index f9b16672803f013a34368f0626d1a366130a7ff7..62ca8aff2cd30e1239447b9ee7cf87217dd05478 100644 --- a/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md +++ b/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md @@ -19,7 +19,7 @@ Parameter | Description ----------------------|--------------------------------- `--server_addresses` | The stress client should accept a list of server addresses in the following format:<br> ```<name_1>:<port_1>,<name_2>:<port_2>..<name_N>:<port_N>``` <br> _Note:_ `<name>` can be either server name or IP address.<br><br>_Type:_ string <br>_default:_ ```localhost:8080``` <br>_Example:_ ``foo.foobar.com:8080,bar.foobar.com:8080`` <br><br> Currently, the stress test framework only passes one server address to the client. `--test_cases` | List of test cases along with the relative weights in the following format:<br> `<testcase_1:w_1>,<testcase_2:w_2>...<testcase_n:w_n>`. <br> The test cases names are the same as those currently used by the interop clients<br><br>_Type:_ string <br>_Example:_ `empty_unary:20,large_unary:10,empty_stream:70` <br>(The stress client would then make `empty_unary` calls 20% of the time, `large_unary` calls 10% of the time and `empty_stream` calls 70% of the time.) <br>_Note:_ The weights need not add up to 100. -`--test_duration-secs` | The test duration in seconds. A value of -1 means that the test should run forever until forcefully terminated. <br>_Type:_ int <br>_default:_ -1 +`--test_duration_secs` | The test duration in seconds. A value of -1 means that the test should run forever until forcefully terminated. <br>_Type:_ int <br>_default:_ -1 `--num_channels_per_server` | Number of channels (i.e connections) to each server. <br> _Type:_ int <br> _default:_ 1 <br><br> _Note:_ Unfortunately, the term `channel` is used differently in `grpc-java` and `C based grpc`. In this context, this really means "number of connections to the server" `--num_stubs_per_channel ` | Number of client stubs per each connection to server.<br>_Type:_ int <br>_default:_ 1 `--metrics_port` | The port at which the stress client exposes [QPS metrics](https://github.com/grpc/grpc/blob/master/src/proto/grpc/testing/metrics.proto). <br>_Type:_ int <br>_default:_ 8081