|
|
4 years ago | |
|---|---|---|
| .. | ||
| Sources | 4 years ago | |
| Tests | 5 years ago | |
| scenarios | 5 years ago | |
| .gitignore | 5 years ago | |
| Makefile | 5 years ago | |
| Package.swift | 4 years ago | |
| README.md | 5 years ago | |
An implementation of the QPS worker for benchmarking described in the gRPC benchmarking guide
To rebuild the proto files run make generate-qps-worker.
The benchmarks can be built in the usual Swift Package Manager way but release
mode is strongly recommended: swift build -c release
To date the changes to gRPC to run the tests automatically have not been pushed upstream. You can easily run the tests locally using the C++ driver program.
This can be built using Bazel from the root of a checkout of the grpc/grpc repository with:
bazel build test/cpp/qps:qps_json_driver
The qps_json_driver binary will be in bazel-bin/test/cpp/qps/.
For examples of running benchmarking tests proceed as follows.
Note: the driver may also be built (via CMake) as a side effect of running the performance testing script (
./tools/run_tests/run_performance_tests.py) from grpc/grpc.The script is also the source of the scenarios listed below.
Open a terminal window and run the QPSBenchmark, this will become the server when instructed by the driver.
swift run -c release QPSBenchmark --driver_port 10400
Open another terminal window and run QPSBenchmark, this will become the client when instructed by the driver.
swift run -c release QPSBenchmark --driver_port 10410
Configure the environment for the driver:
export QPS_WORKERS="localhost:10400,localhost:10410"
Invoke the driver with a scenario file, for example:
/path/to/qps_json_driver --scenarios_file=/path/to/scenario.json
scenarios/unary-unconstrained.json: will run a test with unary RPCs
using all cores on the machine. 64 clients will connect to the server, each
enqueuing up to 100 requests.scenarios/unary-1-connection.json: as above with a single client.scenarios/bidirectional-ping-pong-1-connection.json: will run bidirectional
streaming RPCs using a single client.