aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/proto
diff options
context:
space:
mode:
Diffstat (limited to 'src/proto')
-rwxr-xr-xsrc/proto/gen_build_yaml.py25
-rw-r--r--src/proto/grpc/binary_log/v1alpha/log.proto108
-rw-r--r--src/proto/grpc/health/v1/health.proto2
-rw-r--r--src/proto/grpc/testing/compiler_test.proto75
-rw-r--r--src/proto/grpc/testing/control.proto93
-rw-r--r--src/proto/grpc/testing/duplicate/echo_duplicate.proto2
-rw-r--r--src/proto/grpc/testing/echo.proto2
-rw-r--r--src/proto/grpc/testing/echo_messages.proto2
-rw-r--r--src/proto/grpc/testing/messages.proto8
-rw-r--r--src/proto/grpc/testing/metrics.proto23
-rw-r--r--src/proto/grpc/testing/services.proto2
-rw-r--r--src/proto/grpc/testing/test.proto4
12 files changed, 310 insertions, 36 deletions
diff --git a/src/proto/gen_build_yaml.py b/src/proto/gen_build_yaml.py
index e243d0defc..2a8d9fab93 100755
--- a/src/proto/gen_build_yaml.py
+++ b/src/proto/gen_build_yaml.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python2.7
-# Copyright 2015-2016, Google Inc.
+# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@ import os
import re
import sys
-def update_deps(key, proto_filename, deps, is_trans, visited):
+def update_deps(key, proto_filename, deps, deps_external, is_trans, visited):
if not proto_filename in visited:
visited.append(proto_filename)
with open(proto_filename) as inp:
@@ -44,10 +44,17 @@ def update_deps(key, proto_filename, deps, is_trans, visited):
imp = re.search(r'import "([^"]*)"', line)
if not imp: continue
imp_proto = imp.group(1)
+ # This indicates an external dependency, which we should handle
+ # differently and not traverse recursively
+ if imp_proto.startswith('google/'):
+ if key not in deps_external:
+ deps_external[key] = []
+ deps_external[key].append(imp_proto[:-6])
+ continue
if key not in deps: deps[key] = []
deps[key].append(imp_proto[:-6])
if is_trans:
- update_deps(key, imp_proto, deps, is_trans, visited)
+ update_deps(key, imp_proto, deps, deps_external, is_trans, visited)
def main():
proto_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
@@ -55,17 +62,23 @@ def main():
deps = {}
deps_trans = {}
+ deps_external = {}
+ deps_external_trans = {}
for root, dirs, files in os.walk('src/proto'):
for f in files:
if f[-6:] != '.proto': continue
look_at = os.path.join(root, f)
deps_for = look_at[:-6]
- update_deps(deps_for, look_at, deps, False, []) # First level deps
- update_deps(deps_for, look_at, deps_trans, True, []) # Transitive deps
+ # First level deps
+ update_deps(deps_for, look_at, deps, deps_external, False, [])
+ # Transitive deps
+ update_deps(deps_for, look_at, deps_trans, deps_external_trans, True, [])
json = {
'proto_deps': deps,
- 'proto_transitive_deps': deps_trans
+ 'proto_transitive_deps': deps_trans,
+ 'proto_external_deps': deps_external,
+ 'proto_transitive_external_deps': deps_external_trans
}
print yaml.dump(json)
diff --git a/src/proto/grpc/binary_log/v1alpha/log.proto b/src/proto/grpc/binary_log/v1alpha/log.proto
new file mode 100644
index 0000000000..83166cd410
--- /dev/null
+++ b/src/proto/grpc/binary_log/v1alpha/log.proto
@@ -0,0 +1,108 @@
+// Copyright 2016, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+import "google/protobuf/timestamp.proto"
+
+package grpc.binary_log.v1alpha;
+
+enum Direction {
+ SERVER_SEND;
+ SERVER_RECV;
+ CLIENT_SEND;
+ CLIENT_RECV;
+}
+
+message KeyValuePair {
+ string key;
+ string value;
+}
+
+// Any sort of metadata that may be sent in either direction during a call
+message Metadata {
+ // Cryptographically unique identifier, generated on the client and sent
+ // to the server.
+ uint64 rpc_id = 1;
+ // Timestamp of logging the metadata
+ google.protobuf.Timestamp timestamp = 2;
+ Direction direction = 3;
+ // The actual metadata that is being sent
+ repeated KeyValuePair metadata = 4;
+
+ // Initial metadata sent by the client to initiate a request
+ message ClientInitialMetadata {
+ // The full method name that is being called
+ string method_name = 1;
+ // The call's deadline
+ google.protobuf.Timestamp deadline = 2;
+ // The address of the connected peer
+ string peer = 3;
+ }
+
+ // Arbitrary key/value pairs specified by the user that are not sent over
+ // the network but are nonetheless useful to log
+ message UserData {
+ }
+
+ // Initial metadata response sent by the server after accepting the request
+ message ServerInitialMetadata {
+ }
+
+ // Status sent by the server when closing the call on the server side
+ message ServerStatus {
+ // The status code
+ uint32 code = 1;
+ // The status details
+ string details = 2;
+ }
+
+ oneof kind {
+ ClientInitialMetadata client_initial_metadata = 5;
+ UserData user_data = 6;
+ ServerInitialMetadata server_initial_metadata = 7;
+ ServerStatus server_status = 8;
+ }
+}
+
+// A message that is sent during a call
+message Message {
+ // Cryptographically unique identifier, generated on the client and sent
+ // to the server.
+ uint64 rpc_id = 1;
+ // The sequence number of the message. Messages sent by the client and by the
+ // server should have independently incrementing sequence numbers.
+ uint32 sequence_number = 2;
+ Direction direction = 3;
+ // The length of the complete message.
+ uint32 length = 4;
+ // The contents of the message. May be a prefix instead of the complete
+ // message.
+ bytes data = 5;
+}
diff --git a/src/proto/grpc/health/v1/health.proto b/src/proto/grpc/health/v1/health.proto
index 6e27606d1b..4ab30a0256 100644
--- a/src/proto/grpc/health/v1/health.proto
+++ b/src/proto/grpc/health/v1/health.proto
@@ -1,4 +1,4 @@
-// Copyright 2015-2016, Google Inc.
+// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/src/proto/grpc/testing/compiler_test.proto b/src/proto/grpc/testing/compiler_test.proto
new file mode 100644
index 0000000000..085e8ae59f
--- /dev/null
+++ b/src/proto/grpc/testing/compiler_test.proto
@@ -0,0 +1,75 @@
+// Copyright 2016, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// File detached comment 1
+
+// File detached comment 2
+
+// File leading comment 1
+syntax = "proto3";
+
+// Ignored detached comment
+
+// Ignored package leading comment
+package grpc.testing;
+
+message Request {
+}
+message Response {
+}
+
+// ServiceA detached comment 1
+
+// ServiceA detached comment 2
+
+// ServiceA leading comment 1
+service ServiceA {
+ // MethodA1 leading comment 1
+ rpc MethodA1(Request) returns (Response); // MethodA1 trailing comment 1
+
+ // MethodA2 detached leading comment 1
+
+ // Method A2 leading comment 1
+ // Method A2 leading comment 2
+ rpc MethodA2(stream Request) returns (Response);
+ // MethodA2 trailing comment 1
+}
+// Ignored ServiceA trailing comment 1
+
+// ServiceB leading comment 1
+service ServiceB {
+ // ServiceB trailing comment 1
+
+ // MethodB1 leading comment 1
+ rpc MethodB1(Request) returns (Response);
+ // MethodB1 trailing comment 1
+}
+// Ignored ServiceB trailing comment 2
+
+// Ignored file trailing comment
diff --git a/src/proto/grpc/testing/control.proto b/src/proto/grpc/testing/control.proto
index cc365cafe1..20496a8116 100644
--- a/src/proto/grpc/testing/control.proto
+++ b/src/proto/grpc/testing/control.proto
@@ -1,4 +1,4 @@
-// Copyright 2015-2016, Google Inc.
+// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -35,14 +35,18 @@ import "src/proto/grpc/testing/stats.proto";
package grpc.testing;
enum ClientType {
+ // Many languages support a basic distinction between using
+ // sync or async client, and this allows the specification
SYNC_CLIENT = 0;
ASYNC_CLIENT = 1;
+ OTHER_CLIENT = 2; // used for some language-specific variants
}
enum ServerType {
SYNC_SERVER = 0;
ASYNC_SERVER = 1;
ASYNC_GENERIC_SERVER = 2;
+ OTHER_SERVER = 3; // used for some language-specific variants
}
enum RpcType {
@@ -57,18 +61,6 @@ message PoissonParams {
double offered_load = 1;
}
-message UniformParams {
- double interarrival_lo = 1;
- double interarrival_hi = 2;
-}
-
-message DeterministicParams { double offered_load = 1; }
-
-message ParetoParams {
- double interarrival_base = 1;
- double alpha = 2;
-}
-
// Once an RPC finishes, immediately start a new one.
// No configuration parameters needed.
message ClosedLoopParams {}
@@ -77,9 +69,6 @@ message LoadParams {
oneof load {
ClosedLoopParams closed_loop = 1;
PoissonParams poisson = 2;
- UniformParams uniform = 3;
- DeterministicParams determ = 4;
- ParetoParams pareto = 5;
};
}
@@ -111,6 +100,9 @@ message ClientConfig {
// Specify the cores we should run the client on, if desired
repeated int32 core_list = 13;
int32 core_limit = 14;
+
+ // If we use an OTHER_CLIENT client_type, this string gives more detail
+ string other_client_api = 15;
}
message ClientStatus { ClientStats stats = 1; }
@@ -142,6 +134,9 @@ message ServerConfig {
// Specify the cores we should run the server on, if desired
repeated int32 core_list = 10;
+
+ // If we use an OTHER_SERVER client_type, this string gives more detail
+ string other_server_api = 11;
}
message ServerArgs {
@@ -169,3 +164,69 @@ message CoreResponse {
message Void {
}
+
+// A single performance scenario: input to qps_json_driver
+message Scenario {
+ // Human readable name for this scenario
+ string name = 1;
+ // Client configuration
+ ClientConfig client_config = 2;
+ // Number of clients to start for the test
+ int32 num_clients = 3;
+ // Server configuration
+ ServerConfig server_config = 4;
+ // Number of servers to start for the test
+ int32 num_servers = 5;
+ // Warmup period, in seconds
+ int32 warmup_seconds = 6;
+ // Benchmark time, in seconds
+ int32 benchmark_seconds = 7;
+ // Number of workers to spawn locally (usually zero)
+ int32 spawn_local_worker_count = 8;
+}
+
+// A set of scenarios to be run with qps_json_driver
+message Scenarios {
+ repeated Scenario scenarios = 1;
+}
+
+// Basic summary that can be computed from ClientStats and ServerStats
+// once the scenario has finished.
+message ScenarioResultSummary
+{
+ // Total number of operations per second over all clients.
+ double qps = 1;
+ // QPS per one server core.
+ double qps_per_server_core = 2;
+ // server load based on system_time (0.85 => 85%)
+ double server_system_time = 3;
+ // server load based on user_time (0.85 => 85%)
+ double server_user_time = 4;
+ // client load based on system_time (0.85 => 85%)
+ double client_system_time = 5;
+ // client load based on user_time (0.85 => 85%)
+ double client_user_time = 6;
+
+ // X% latency percentiles (in nanoseconds)
+ double latency_50 = 7;
+ double latency_90 = 8;
+ double latency_95 = 9;
+ double latency_99 = 10;
+ double latency_999 = 11;
+}
+
+// Results of a single benchmark scenario.
+message ScenarioResult {
+ // Inputs used to run the scenario.
+ Scenario scenario = 1;
+ // Histograms from all clients merged into one histogram.
+ HistogramData latencies = 2;
+ // Client stats for each client
+ repeated ClientStats client_stats = 3;
+ // Server stats for each server
+ repeated ServerStats server_stats = 4;
+ // Number of cores available to each server
+ repeated int32 server_cores = 5;
+ // An after-the-fact computed summary
+ ScenarioResultSummary summary = 6;
+}
diff --git a/src/proto/grpc/testing/duplicate/echo_duplicate.proto b/src/proto/grpc/testing/duplicate/echo_duplicate.proto
index 9d84de108e..94130ea767 100644
--- a/src/proto/grpc/testing/duplicate/echo_duplicate.proto
+++ b/src/proto/grpc/testing/duplicate/echo_duplicate.proto
@@ -1,5 +1,5 @@
-// Copyright 2015-2016, Google Inc.
+// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/src/proto/grpc/testing/echo.proto b/src/proto/grpc/testing/echo.proto
index 06c3bafbad..0eef53a92a 100644
--- a/src/proto/grpc/testing/echo.proto
+++ b/src/proto/grpc/testing/echo.proto
@@ -1,5 +1,5 @@
-// Copyright 2015-2016, Google Inc.
+// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/src/proto/grpc/testing/echo_messages.proto b/src/proto/grpc/testing/echo_messages.proto
index 5ce0a1fd64..1be1966f10 100644
--- a/src/proto/grpc/testing/echo_messages.proto
+++ b/src/proto/grpc/testing/echo_messages.proto
@@ -1,5 +1,5 @@
-// Copyright 2015-2016, Google Inc.
+// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/src/proto/grpc/testing/messages.proto b/src/proto/grpc/testing/messages.proto
index 193b6c4171..a063b470c7 100644
--- a/src/proto/grpc/testing/messages.proto
+++ b/src/proto/grpc/testing/messages.proto
@@ -1,5 +1,5 @@
-// Copyright 2015, Google Inc.
+// Copyright 2015-2016, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -159,6 +159,12 @@ message StreamingOutputCallResponse {
}
// For reconnect interop test only.
+// Client tells server what reconnection parameters it used.
+message ReconnectParams {
+ int32 max_reconnect_backoff_ms = 1;
+}
+
+// For reconnect interop test only.
// Server tells client whether its reconnects are following the spec and the
// reconnect backoffs it saw.
message ReconnectInfo {
diff --git a/src/proto/grpc/testing/metrics.proto b/src/proto/grpc/testing/metrics.proto
index 4485d3a53b..1202b20b8f 100644
--- a/src/proto/grpc/testing/metrics.proto
+++ b/src/proto/grpc/testing/metrics.proto
@@ -1,5 +1,4 @@
-
-// Copyright 2015, Google Inc.
+// Copyright 2015-2016, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -28,26 +27,38 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// An integration test service that covers all the method signature permutations
-// of unary/streaming requests/responses.
+// Contains the definitions for a metrics service and the type of metrics
+// exposed by the service.
+//
+// Currently, 'Gauge' (i.e a metric that represents the measured value of
+// something at an instant of time) is the only metric type supported by the
+// service.
syntax = "proto3";
package grpc.testing;
+// Reponse message containing the gauge name and value
message GaugeResponse {
string name = 1;
oneof value {
int64 long_value = 2;
- double double_vale = 3;
+ double double_value = 3;
string string_value = 4;
}
}
-message GaugeRequest { string name = 1; }
+// Request message containing the gauge name
+message GaugeRequest {
+ string name = 1;
+}
message EmptyMessage {}
service MetricsService {
+ // Returns the values of all the gauges that are currently being maintained by
+ // the service
rpc GetAllGauges(EmptyMessage) returns (stream GaugeResponse);
+
+ // Returns the value of one gauge
rpc GetGauge(GaugeRequest) returns (GaugeResponse);
}
diff --git a/src/proto/grpc/testing/services.proto b/src/proto/grpc/testing/services.proto
index a2c5fda47e..f71dae34ee 100644
--- a/src/proto/grpc/testing/services.proto
+++ b/src/proto/grpc/testing/services.proto
@@ -1,4 +1,4 @@
-// Copyright 2015-2016, Google Inc.
+// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/src/proto/grpc/testing/test.proto b/src/proto/grpc/testing/test.proto
index 9faba297a3..84369db4b8 100644
--- a/src/proto/grpc/testing/test.proto
+++ b/src/proto/grpc/testing/test.proto
@@ -1,5 +1,5 @@
-// Copyright 2015, Google Inc.
+// Copyright 2015-2016, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -80,6 +80,6 @@ service UnimplementedService {
// A service used to control reconnect server.
service ReconnectService {
- rpc Start(grpc.testing.Empty) returns (grpc.testing.Empty);
+ rpc Start(grpc.testing.ReconnectParams) returns (grpc.testing.Empty);
rpc Stop(grpc.testing.Empty) returns (grpc.testing.ReconnectInfo);
}