diff options
author | 2015-11-20 17:01:57 -0800 | |
---|---|---|
committer | 2015-11-20 17:01:57 -0800 | |
commit | 3ff9727a373e5e8819b9db288df99f8d7f68270e (patch) | |
tree | af8c81a2ffbb00977643a424a0ee9db48b08f6fe /test/proto/benchmarks | |
parent | 71b962634eceacae336b1c706829e4ad9621b397 (diff) | |
parent | 4dd8f43970f59b062433c5bb48388a78c0c09984 (diff) |
merge with head
Diffstat (limited to 'test/proto/benchmarks')
-rw-r--r-- | test/proto/benchmarks/control.proto | 24 | ||||
-rw-r--r-- | test/proto/benchmarks/services.proto | 14 | ||||
-rw-r--r-- | test/proto/benchmarks/stats.proto | 17 |
3 files changed, 47 insertions, 8 deletions
diff --git a/test/proto/benchmarks/control.proto b/test/proto/benchmarks/control.proto index 966ab78baa..42a5dd0a85 100644 --- a/test/proto/benchmarks/control.proto +++ b/test/proto/benchmarks/control.proto @@ -49,7 +49,10 @@ enum RpcType { STREAMING = 1; } +// Parameters of poisson process distribution, which is a good representation +// of activity coming in from independent identical stationary sources. message PoissonParams { + // The rate of arrivals (a.k.a. lambda parameter of the exp distribution). double offered_load = 1; } @@ -67,6 +70,8 @@ message ParetoParams { double alpha = 2; } +// Once an RPC finishes, immediately start a new one. +// No configuration parameters needed. message ClosedLoopParams { } @@ -87,16 +92,23 @@ message SecurityParams { } message ClientConfig { + // List of targets to connect to. At least one target needs to be specified. repeated string server_targets = 1; ClientType client_type = 2; SecurityParams security_params = 3; + // How many concurrent RPCs to start for each channel. + // For synchronous client, use a separate thread for each outstanding RPC. int32 outstanding_rpcs_per_channel = 4; + // Number of independent client channels to create. + // i-th channel will connect to server_target[i % server_targets.size()] int32 client_channels = 5; - // only for async client: + // Only for async client. Number of threads to use to start/manage RPCs. int32 async_client_threads = 7; RpcType rpc_type = 8; + // The requested load for the entire client (aggregated over all the threads). LoadParams load_params = 10; PayloadConfig payload_config = 11; + HistogramParams histogram_params = 12; } message ClientStatus { @@ -105,6 +117,7 @@ message ClientStatus { // Request current stats message Mark { + // if true, the stats will be reset after taking their snapshot. bool reset = 1; } @@ -118,10 +131,13 @@ message ClientArgs { message ServerConfig { ServerType server_type = 1; SecurityParams security_params = 2; + // Host on which to listen. + string host = 3; + // Port on which to listen. Zero means pick unused port. int32 port = 4; - // only for async server + // Only for async server. Number of threads used to serve the requests. int32 async_server_threads = 7; - // restrict core usage + // restrict core usage, currently unused int32 core_limit = 8; PayloadConfig payload_config = 9; } @@ -135,6 +151,8 @@ message ServerArgs { message ServerStatus { ServerStats stats = 1; + // the port bound by the server int32 port = 2; + // Number of cores on the server. See gpr_cpu_num_cores. int32 cores = 3; } diff --git a/test/proto/benchmarks/services.proto b/test/proto/benchmarks/services.proto index 4c2cbabdf8..ff295ed970 100644 --- a/test/proto/benchmarks/services.proto +++ b/test/proto/benchmarks/services.proto @@ -47,9 +47,19 @@ service BenchmarkService { } service WorkerService { - // Start server with specified workload + // Start server with specified workload. + // First request sent specifies the ServerConfig followed by ServerStatus + // response. After that, a "Mark" can be sent anytime to request the latest + // stats. Closing the stream will initiate shutdown of the test server + // and once the shutdown has finished, the OK status is sent to terminate + // this RPC. rpc RunServer(stream ServerArgs) returns (stream ServerStatus); - // Start client with specified workload + // Start client with specified workload. + // First request sent specifies the ClientConfig followed by ClientStatus + // response. After that, a "Mark" can be sent anytime to request the latest + // stats. Closing the stream will initiate shutdown of the test client + // and once the shutdown has finished, the OK status is sent to terminate + // this RPC. rpc RunClient(stream ClientArgs) returns (stream ClientStatus); } diff --git a/test/proto/benchmarks/stats.proto b/test/proto/benchmarks/stats.proto index d52144f321..7e02707dbb 100644 --- a/test/proto/benchmarks/stats.proto +++ b/test/proto/benchmarks/stats.proto @@ -32,16 +32,24 @@ syntax = "proto3"; package grpc.testing; message ServerStats { - // wall clock time + // wall clock time change in seconds since last reset double time_elapsed = 1; - // user time used by the server process and threads + // change in user time (in seconds) used by the server since last reset double time_user = 2; - // server time used by the server process and all threads + // change in server time (in seconds) used by the server process and all + // threads since last reset double time_system = 3; } +// Histogram params based on grpc/support/histogram.c +message HistogramParams { + double resolution = 1; // first bucket is [0, 1 + resolution) + double max_possible = 2; // use enough buckets to allow this value +} + +// Histogram data based on grpc/support/histogram.c message HistogramData { repeated uint32 bucket = 1; double min_seen = 2; @@ -52,7 +60,10 @@ message HistogramData { } message ClientStats { + // Latency histogram. Data points are in nanoseconds. HistogramData latencies = 1; + + // See ServerStats for details. double time_elapsed = 2; double time_user = 3; double time_system = 4; |