aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.github/ISSUE_TEMPLATE.md31
-rw-r--r--INSTALL.md9
-rw-r--r--composer.json2
-rw-r--r--setup.py2
-rw-r--r--src/compiler/cpp_generator.cc6
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.c47
-rw-r--r--src/core/ext/transport/chttp2/transport/internal.h11
-rw-r--r--src/core/ext/transport/chttp2/transport/parsing.c7
-rw-r--r--src/core/ext/transport/chttp2/transport/writing.c36
-rw-r--r--src/core/lib/transport/bdp_estimator.c19
-rw-r--r--src/core/lib/transport/bdp_estimator.h3
-rw-r--r--src/php/composer.json2
-rw-r--r--src/proto/grpc/testing/control.proto3
-rw-r--r--src/proto/grpc/testing/services.proto17
-rw-r--r--src/python/grpcio/grpc/__init__.py411
-rw-r--r--src/python/grpcio_health_checking/setup.py2
-rw-r--r--src/python/grpcio_reflection/setup.py2
-rw-r--r--src/python/grpcio_tests/setup.py2
-rw-r--r--templates/composer.json.template2
-rw-r--r--templates/src/php/composer.json.template2
-rw-r--r--templates/tools/dockerfile/gcp_api_libraries.include1
-rw-r--r--templates/tools/dockerfile/interoptest/grpc_interop_go1.7/Dockerfile.template (renamed from templates/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile.template)8
-rw-r--r--templates/tools/dockerfile/interoptest/grpc_interop_go1.8/Dockerfile.template (renamed from templates/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile.template)10
-rw-r--r--templates/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile.template42
-rw-r--r--templates/tools/dockerfile/stress_test/grpc_interop_stress_cxx/Dockerfile.template41
-rw-r--r--templates/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile.template41
-rw-r--r--templates/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile.template46
-rw-r--r--templates/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile.template45
-rw-r--r--templates/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile.template42
-rw-r--r--templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/fuzzer/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/php7_jessie_x64/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template2
-rw-r--r--templates/tools/dockerfile/test/python_pyenv_x64/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/sanity/Dockerfile.template1
-rw-r--r--test/core/transport/bdp_estimator_test.c15
-rw-r--r--test/core/util/trickle_endpoint.c27
-rw-r--r--test/core/util/trickle_endpoint.h2
-rw-r--r--test/cpp/codegen/compiler_test_golden6
-rw-r--r--test/cpp/microbenchmarks/BUILD2
-rw-r--r--test/cpp/microbenchmarks/bm_fullstack_trickle.cc271
-rw-r--r--test/cpp/performance/writes_per_rpc_test.cc4
-rw-r--r--test/cpp/qps/client.h7
-rw-r--r--test/cpp/qps/client_async.cc296
-rw-r--r--test/cpp/qps/client_sync.cc220
-rw-r--r--test/cpp/qps/qps_worker.cc12
-rw-r--r--test/cpp/qps/server_async.cc190
-rw-r--r--test/cpp/qps/server_sync.cc111
m---------third_party/protobuf0
-rw-r--r--tools/distrib/python/grpcio_tools/protoc_lib_deps.py4
-rw-r--r--tools/distrib/python/grpcio_tools/setup.py2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_go1.7/Dockerfile (renamed from tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile)13
-rw-r--r--[-rwxr-xr-x]tools/dockerfile/interoptest/grpc_interop_go1.8/Dockerfile (renamed from tools/run_tests/stress_test/cleanup_docker_images.sh)24
-rw-r--r--tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile117
-rwxr-xr-xtools/dockerfile/stress_test/grpc_interop_stress_csharp/build_interop_stress.sh51
-rw-r--r--tools/dockerfile/stress_test/grpc_interop_stress_cxx/Dockerfile132
-rwxr-xr-xtools/dockerfile/stress_test/grpc_interop_stress_cxx/build_interop_stress.sh51
-rwxr-xr-xtools/dockerfile/stress_test/grpc_interop_stress_go/build_interop_stress.sh62
-rw-r--r--tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile117
-rwxr-xr-xtools/dockerfile/stress_test/grpc_interop_stress_java/build_interop_stress.sh55
-rw-r--r--tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile109
-rwxr-xr-xtools/dockerfile/stress_test/grpc_interop_stress_node/build_interop_stress.sh48
-rw-r--r--tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile125
-rwxr-xr-xtools/dockerfile/stress_test/grpc_interop_stress_php/build_interop_stress.sh57
-rw-r--r--tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile103
-rwxr-xr-xtools/dockerfile/stress_test/grpc_interop_stress_python/build_interop_stress.sh49
-rw-r--r--tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile114
-rwxr-xr-xtools/dockerfile/stress_test/grpc_interop_stress_ruby/build_interop_stress.sh52
-rw-r--r--tools/dockerfile/test/csharp_jessie_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/cxx_jessie_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/cxx_jessie_x86/Dockerfile4
-rw-r--r--tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/cxx_wheezy_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/fuzzer/Dockerfile4
-rw-r--r--tools/dockerfile/test/multilang_jessie_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/node_jessie_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/php7_jessie_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/php_jessie_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/python_jessie_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/python_pyenv_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/ruby_jessie_x64/Dockerfile4
-rw-r--r--tools/dockerfile/test/sanity/Dockerfile4
-rwxr-xr-xtools/gce/linux_worker_init.sh4
-rwxr-xr-xtools/gcp/stress_test/run_client.py206
-rwxr-xr-xtools/gcp/stress_test/run_node.sh37
-rwxr-xr-xtools/gcp/stress_test/run_ruby.sh37
-rwxr-xr-xtools/gcp/stress_test/run_server.py138
-rwxr-xr-xtools/gcp/stress_test/stress_test_utils.py217
-rwxr-xr-xtools/gcp/utils/kubernetes_api.py269
-rwxr-xr-xtools/jenkins/run_interop_stress.sh37
-rwxr-xr-xtools/profiling/microbenchmarks/bm_diff.py4
-rw-r--r--tools/run_tests/README.md2
-rw-r--r--tools/run_tests/artifacts/artifact_targets.py2
-rwxr-xr-xtools/run_tests/dockerize/build_docker_and_run_tests.sh3
-rw-r--r--tools/run_tests/generated/tests.json1016
-rw-r--r--tools/run_tests/performance/scenario_config.py7
-rwxr-xr-xtools/run_tests/python_utils/jobset.py7
-rwxr-xr-xtools/run_tests/python_utils/port_server.py66
-rw-r--r--tools/run_tests/python_utils/report_utils.py14
-rw-r--r--tools/run_tests/python_utils/start_port_server.py25
-rw-r--r--tools/run_tests/python_utils/upload_test_results.py113
-rwxr-xr-xtools/run_tests/run_stress_tests.py331
-rwxr-xr-xtools/run_tests/run_tests.py18
-rwxr-xr-xtools/run_tests/run_tests_matrix.py22
-rwxr-xr-xtools/run_tests/sanity/check_submodules.sh2
-rwxr-xr-xtools/run_tests/start_port_server.py6
-rw-r--r--tools/run_tests/stress_test/README.md76
-rw-r--r--tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md25
-rw-r--r--tools/run_tests/stress_test/configs/asan.json85
-rw-r--r--tools/run_tests/stress_test/configs/csharp.json91
-rw-r--r--tools/run_tests/stress_test/configs/go.json96
-rw-r--r--tools/run_tests/stress_test/configs/java.json98
-rw-r--r--tools/run_tests/stress_test/configs/node-cxx.json97
-rw-r--r--tools/run_tests/stress_test/configs/node.json96
-rw-r--r--tools/run_tests/stress_test/configs/opt-tsan-asan.json134
-rw-r--r--tools/run_tests/stress_test/configs/opt.json85
-rw-r--r--tools/run_tests/stress_test/configs/php-cxx.json93
-rw-r--r--tools/run_tests/stress_test/configs/python.json98
-rw-r--r--tools/run_tests/stress_test/configs/ruby.json92
-rw-r--r--tools/run_tests/stress_test/configs/tsan.json85
-rwxr-xr-xtools/run_tests/stress_test/print_summary.py59
-rwxr-xr-xtools/run_tests/stress_test/run_on_gke.py674
132 files changed, 2766 insertions, 5217 deletions
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000000..60131f2eab
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,31 @@
+Please answer these questions before submitting your issue.
+
+### Should this be an issue in the gRPC issue tracker?
+
+Create new issues for bugs and feature requests. An issue needs to be actionable. General gRPC discussions and usage questions belong to:
+- [grpc.io mailing list](https://groups.google.com/forum/#!forum/grpc-io)
+- [StackOverflow, with `grpc` tag](http://stackoverflow.com/questions/tagged/grpc)
+
+*Please don't double post your questions in more locations, we are monitoring both channels and the time spent de-duplicating questions can is better spent answering more user questions.*
+
+### What version of gRPC and what language are you using?
+
+
+### What operating system (Linux, Windows, …) and version?
+
+
+### What runtime / compiler are you using (e.g. python version or version of gcc)
+
+
+### What did you do?
+If possible, provide a recipe for reproducing the error. Try being specific and include code snippets if helpful.
+
+### What did you expect to see?
+
+
+### What did you see instead?
+
+Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
+
+### Anything else we should know about your project / environment?
+
diff --git a/INSTALL.md b/INSTALL.md
index 6cfa1b6cba..5406fec84d 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -51,6 +51,15 @@ If you plan to build from source and run tests, install the following as well:
$ brew install gflags
```
+*Tip*: when building,
+you *may* want to explicitly set the `LIBTOOL` and `LIBTOOLIZE`
+environment variables when running `make` to ensure the version
+installed by `brew` is being used:
+
+```sh
+ $ LIBTOOL=glibtool LIBTOOLIZE=glibtoolize make
+```
+
## Protoc
By default gRPC uses [protocol buffers](https://github.com/google/protobuf),
diff --git a/composer.json b/composer.json
index 0cafb94808..284b57a809 100644
--- a/composer.json
+++ b/composer.json
@@ -7,7 +7,7 @@
"license": "BSD-3-Clause",
"require": {
"php": ">=5.5.0",
- "google/protobuf": "^v3.1.0"
+ "google/protobuf": "^v3.3.0"
},
"require-dev": {
"google/auth": "v0.9"
diff --git a/setup.py b/setup.py
index adf8387d3d..cb852735f0 100644
--- a/setup.py
+++ b/setup.py
@@ -237,7 +237,7 @@ INSTALL_REQUIRES = (
'six>=1.5.2',
# TODO(atash): eventually split the grpcio package into a metapackage
# depending on protobuf and the runtime component (independent of protobuf)
- 'protobuf>=3.2.0',
+ 'protobuf>=3.3.0',
)
if not PY3:
diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc
index d3e71625d6..a1a0258c68 100644
--- a/src/compiler/cpp_generator.cc
+++ b/src/compiler/cpp_generator.cc
@@ -804,6 +804,12 @@ void PrintHeaderService(grpc_generator::Printer *printer,
" public:\n");
printer->Indent();
+ // Service metadata
+ printer->Print(*vars,
+ "static constexpr char const* service_full_name() {\n"
+ " return \"$Package$$Service$\";\n"
+ "}\n");
+
// Client side
printer->Print(
"class StubInterface {\n"
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
index d6b79bd492..30738080ee 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
@@ -884,14 +884,23 @@ static void write_action_begin_locked(grpc_exec_ctx *exec_ctx, void *gt,
GPR_TIMER_BEGIN("write_action_begin_locked", 0);
grpc_chttp2_transport *t = gt;
GPR_ASSERT(t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE);
- if (!t->closed && grpc_chttp2_begin_write(exec_ctx, t)) {
- set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_WRITING,
- "begin writing");
- grpc_closure_sched(exec_ctx, &t->write_action, GRPC_ERROR_NONE);
- } else {
- set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_IDLE,
- "begin writing nothing");
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing");
+ switch (t->closed ? GRPC_CHTTP2_NOTHING_TO_WRITE
+ : grpc_chttp2_begin_write(exec_ctx, t)) {
+ case GRPC_CHTTP2_NOTHING_TO_WRITE:
+ set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_IDLE,
+ "begin writing nothing");
+ GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing");
+ break;
+ case GRPC_CHTTP2_PARTIAL_WRITE:
+ set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE,
+ "begin writing partial");
+ grpc_closure_sched(exec_ctx, &t->write_action, GRPC_ERROR_NONE);
+ break;
+ case GRPC_CHTTP2_FULL_WRITE:
+ set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_WRITING,
+ "begin writing");
+ grpc_closure_sched(exec_ctx, &t->write_action, GRPC_ERROR_NONE);
+ break;
}
GPR_TIMER_END("write_action_begin_locked", 0);
}
@@ -2130,27 +2139,29 @@ static void end_all_the_calls(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
static void update_bdp(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
double bdp_dbl) {
- uint32_t bdp;
- if (bdp_dbl <= 0) {
- bdp = 0;
- } else if (bdp_dbl > UINT32_MAX) {
- bdp = UINT32_MAX;
+ int32_t bdp;
+ const int32_t kMinBDP = 128;
+ if (bdp_dbl <= kMinBDP) {
+ bdp = kMinBDP;
+ } else if (bdp_dbl > INT32_MAX) {
+ bdp = INT32_MAX;
} else {
- bdp = (uint32_t)(bdp_dbl);
+ bdp = (int32_t)(bdp_dbl);
}
int64_t delta =
(int64_t)bdp -
(int64_t)t->settings[GRPC_LOCAL_SETTINGS]
[GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE];
- if (delta == 0 || (bdp != 0 && delta > -1024 && delta < 1024)) {
+ if (delta == 0 || (delta > -bdp / 10 && delta < bdp / 10)) {
return;
}
if (grpc_bdp_estimator_trace) {
gpr_log(GPR_DEBUG, "%s: update initial window size to %d", t->peer_string,
(int)bdp);
}
- push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, bdp);
- push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE, bdp);
+ push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE,
+ (uint32_t)bdp);
+ push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE, (uint32_t)bdp);
}
static grpc_error *try_http_parsing(grpc_exec_ctx *exec_ctx,
@@ -2543,7 +2554,7 @@ static void incoming_byte_stream_update_flow_control(grpc_exec_ctx *exec_ctx,
add_max_recv_bytes);
if ((int64_t)s->incoming_window_delta + (int64_t)initial_window_size -
(int64_t)s->announce_window >
- (int64_t)initial_window_size / 2) {
+ 2 * (int64_t)initial_window_size) {
write_type = GRPC_CHTTP2_STREAM_WRITE_PIGGYBACK;
}
grpc_chttp2_become_writable(exec_ctx, t, s, write_type,
diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h
index 0aaa4aebe5..733e9900ef 100644
--- a/src/core/ext/transport/chttp2/transport/internal.h
+++ b/src/core/ext/transport/chttp2/transport/internal.h
@@ -552,9 +552,14 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx,
grpc_chttp2_transport *t,
bool covered_by_poller, const char *reason);
-/** Someone is unlocking the transport mutex: check to see if writes
- are required, and frame them if so */
-bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t);
+typedef enum {
+ GRPC_CHTTP2_NOTHING_TO_WRITE,
+ GRPC_CHTTP2_PARTIAL_WRITE,
+ GRPC_CHTTP2_FULL_WRITE,
+} grpc_chttp2_begin_write_result;
+
+grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
+ grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t);
void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
grpc_error *error);
diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c
index 638b137316..d0b94bd6ce 100644
--- a/src/core/ext/transport/chttp2/transport/parsing.c
+++ b/src/core/ext/transport/chttp2/transport/parsing.c
@@ -418,12 +418,7 @@ static grpc_error *update_incoming_window(grpc_exec_ctx *exec_ctx,
GRPC_CHTTP2_FLOW_DEBIT_STREAM_INCOMING_WINDOW_DELTA("parse", t, s,
incoming_frame_size);
- if ((int64_t)t->settings[GRPC_SENT_SETTINGS]
- [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] +
- (int64_t)s->incoming_window_delta - (int64_t)s->announce_window <=
- (int64_t)t->settings[GRPC_SENT_SETTINGS]
- [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] /
- 2) {
+ if ((int64_t)s->incoming_window_delta - (int64_t)s->announce_window <= 0) {
grpc_chttp2_become_writable(exec_ctx, t, s,
GRPC_CHTTP2_STREAM_WRITE_INITIATE_UNCOVERED,
"window-update-required");
diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c
index 069780ae5a..60db567fb3 100644
--- a/src/core/ext/transport/chttp2/transport/writing.c
+++ b/src/core/ext/transport/chttp2/transport/writing.c
@@ -160,19 +160,22 @@ static bool stream_ref_if_not_destroyed(gpr_refcount *r) {
return true;
}
+/* How many bytes of incoming flow control would we like to advertise */
uint32_t grpc_chttp2_target_incoming_window(grpc_chttp2_transport *t) {
- return (uint32_t)GPR_MAX(
+ return (uint32_t)GPR_MIN(
(int64_t)((1u << 31) - 1),
t->stream_total_over_incoming_window +
- (int64_t)GPR_MAX(
- t->settings[GRPC_SENT_SETTINGS]
- [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] -
- t->stream_total_under_incoming_window,
- 0));
+ t->settings[GRPC_SENT_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]);
}
-bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx,
- grpc_chttp2_transport *t) {
+/* How many bytes would we like to put on the wire during a single syscall */
+static uint32_t target_write_size(grpc_chttp2_transport *t) {
+ return 1024 * 1024;
+}
+
+grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
+ grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) {
grpc_chttp2_stream *s;
GPR_TIMER_BEGIN("grpc_chttp2_begin_write", 0);
@@ -206,9 +209,20 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx,
}
}
+ bool partial_write = false;
+
/* for each grpc_chttp2_stream that's become writable, frame it's data
(according to available window sizes) and add to the output buffer */
- while (grpc_chttp2_list_pop_writable_stream(t, &s)) {
+ while (true) {
+ if (t->outbuf.length > target_write_size(t)) {
+ partial_write = true;
+ break;
+ }
+
+ if (!grpc_chttp2_list_pop_writable_stream(t, &s)) {
+ break;
+ }
+
bool sent_initial_metadata = s->sent_initial_metadata;
bool now_writing = false;
@@ -395,7 +409,9 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx,
GPR_TIMER_END("grpc_chttp2_begin_write", 0);
- return t->outbuf.count > 0;
+ return t->outbuf.count > 0 ? (partial_write ? GRPC_CHTTP2_PARTIAL_WRITE
+ : GRPC_CHTTP2_FULL_WRITE)
+ : GRPC_CHTTP2_NOTHING_TO_WRITE;
}
void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
diff --git a/src/core/lib/transport/bdp_estimator.c b/src/core/lib/transport/bdp_estimator.c
index e1483677fd..536694214e 100644
--- a/src/core/lib/transport/bdp_estimator.c
+++ b/src/core/lib/transport/bdp_estimator.c
@@ -44,6 +44,7 @@ void grpc_bdp_estimator_init(grpc_bdp_estimator *estimator, const char *name) {
estimator->estimate = 65536;
estimator->ping_state = GRPC_BDP_PING_UNSCHEDULED;
estimator->name = name;
+ estimator->bw_est = 0;
}
bool grpc_bdp_estimator_get_estimate(grpc_bdp_estimator *estimator,
@@ -84,16 +85,26 @@ void grpc_bdp_estimator_start_ping(grpc_bdp_estimator *estimator) {
GPR_ASSERT(estimator->ping_state == GRPC_BDP_PING_SCHEDULED);
estimator->ping_state = GRPC_BDP_PING_STARTED;
estimator->accumulator = 0;
+ estimator->ping_start_time = gpr_now(GPR_CLOCK_MONOTONIC);
}
void grpc_bdp_estimator_complete_ping(grpc_bdp_estimator *estimator) {
+ gpr_timespec dt_ts =
+ gpr_time_sub(gpr_now(GPR_CLOCK_MONOTONIC), estimator->ping_start_time);
+ double dt = (double)dt_ts.tv_sec + 1e-9 * (double)dt_ts.tv_nsec;
+ double bw = dt > 0 ? ((double)estimator->accumulator / dt) : 0;
if (grpc_bdp_estimator_trace) {
- gpr_log(GPR_DEBUG, "bdp[%s]:complete acc=%" PRId64 " est=%" PRId64,
- estimator->name, estimator->accumulator, estimator->estimate);
+ gpr_log(GPR_DEBUG, "bdp[%s]:complete acc=%" PRId64 " est=%" PRId64
+ " dt=%lf bw=%lfMbs bw_est=%lfMbs",
+ estimator->name, estimator->accumulator, estimator->estimate, dt,
+ bw / 125000.0, estimator->bw_est / 125000.0);
}
GPR_ASSERT(estimator->ping_state == GRPC_BDP_PING_STARTED);
- if (estimator->accumulator > 2 * estimator->estimate / 3) {
- estimator->estimate *= 2;
+ if (estimator->accumulator > 2 * estimator->estimate / 3 &&
+ bw > estimator->bw_est) {
+ estimator->estimate =
+ GPR_MAX(estimator->accumulator, estimator->estimate * 2);
+ estimator->bw_est = bw;
if (grpc_bdp_estimator_trace) {
gpr_log(GPR_DEBUG, "bdp[%s]: estimate increased to %" PRId64,
estimator->name, estimator->estimate);
diff --git a/src/core/lib/transport/bdp_estimator.h b/src/core/lib/transport/bdp_estimator.h
index df8d1f6fc0..752bee1abd 100644
--- a/src/core/lib/transport/bdp_estimator.h
+++ b/src/core/lib/transport/bdp_estimator.h
@@ -34,6 +34,7 @@
#ifndef GRPC_CORE_LIB_TRANSPORT_BDP_ESTIMATOR_H
#define GRPC_CORE_LIB_TRANSPORT_BDP_ESTIMATOR_H
+#include <grpc/support/time.h>
#include <stdbool.h>
#include <stdint.h>
@@ -52,6 +53,8 @@ typedef struct grpc_bdp_estimator {
grpc_bdp_estimator_ping_state ping_state;
int64_t accumulator;
int64_t estimate;
+ gpr_timespec ping_start_time;
+ double bw_est;
const char *name;
} grpc_bdp_estimator;
diff --git a/src/php/composer.json b/src/php/composer.json
index 24c17c3b57..a4fba7e4f6 100644
--- a/src/php/composer.json
+++ b/src/php/composer.json
@@ -5,7 +5,7 @@
"version": "1.4.0",
"require": {
"php": ">=5.5.0",
- "google/protobuf": "^v3.1.0"
+ "google/protobuf": "^v3.3.0"
},
"require-dev": {
"google/auth": "v0.9"
diff --git a/src/proto/grpc/testing/control.proto b/src/proto/grpc/testing/control.proto
index acee86678d..02b156d0cd 100644
--- a/src/proto/grpc/testing/control.proto
+++ b/src/proto/grpc/testing/control.proto
@@ -52,6 +52,9 @@ enum ServerType {
enum RpcType {
UNARY = 0;
STREAMING = 1;
+ STREAMING_FROM_CLIENT = 2;
+ STREAMING_FROM_SERVER = 3;
+ STREAMING_BOTH_WAYS = 4;
}
// Parameters of poisson process distribution, which is a good representation
diff --git a/src/proto/grpc/testing/services.proto b/src/proto/grpc/testing/services.proto
index 969782d656..85949abd86 100644
--- a/src/proto/grpc/testing/services.proto
+++ b/src/proto/grpc/testing/services.proto
@@ -42,9 +42,22 @@ service BenchmarkService {
// The server returns the client payload as-is.
rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
- // One request followed by one response.
- // The server returns the client payload as-is.
+ // Repeated sequence of one request followed by one response.
+ // Should be called streaming ping-pong
+ // The server returns the client payload as-is on each response
rpc StreamingCall(stream SimpleRequest) returns (stream SimpleResponse);
+
+ // Single-sided unbounded streaming from client to server
+ // The server returns the client payload as-is once the client does WritesDone
+ rpc StreamingFromClient(stream SimpleRequest) returns (SimpleResponse);
+
+ // Single-sided unbounded streaming from server to client
+ // The server repeatedly returns the client payload as-is
+ rpc StreamingFromServer(SimpleRequest) returns (stream SimpleResponse);
+
+ // Two-sided unbounded streaming between server to client
+ // Both sides send the content of their own choice to the other
+ rpc StreamingBothWays(stream SimpleRequest) returns (stream SimpleResponse);
}
service WorkerService {
diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py
index 4960df3be9..2952dcd36a 100644
--- a/src/python/grpcio/grpc/__init__.py
+++ b/src/python/grpcio/grpc/__init__.py
@@ -61,13 +61,13 @@ class Future(six.with_metaclass(abc.ABCMeta)):
This method does not block.
Returns:
- True if the computation has not yet begun, will not be allowed to take
- place, and determination of both was possible without blocking. False
- under all other circumstances including but not limited to the
- computation's already having begun, the computation's already having
- finished, and the computation's having been scheduled for execution on a
- remote system for which a determination of whether or not it commenced
- before being cancelled cannot be made without blocking.
+ bool:
+ Returns True if the computation was canceled.
+ Returns False under all other circumstances, for example:
+ 1. computation has begun and could not be canceled.
+ 2. computation has finished
+ 3. computation is scheduled for execution and it is impossible to
+ determine its state without blocking.
"""
raise NotImplementedError()
@@ -78,10 +78,12 @@ class Future(six.with_metaclass(abc.ABCMeta)):
This method does not block.
Returns:
- True if the computation was cancelled any time before its result became
- immediately available. False under all other circumstances including but
- not limited to this object's cancel method not having been called and
- the computation's result having become immediately available.
+ bool:
+ Returns True if the computation was cancelled before its result became
+ available.
+ False under all other circumstances, for example:
+ 1. computation was not cancelled.
+ 2. computation's result is available.
"""
raise NotImplementedError()
@@ -92,9 +94,10 @@ class Future(six.with_metaclass(abc.ABCMeta)):
This method does not block.
Returns:
- True if the computation is scheduled to take place in the future or is
- taking place now, or False if the computation took place in the past or
- was cancelled.
+ bool:
+ Returns True if the computation is scheduled for execution or currently
+ executing.
+ Returns False if the computation already executed or was cancelled.
"""
raise NotImplementedError()
@@ -105,22 +108,24 @@ class Future(six.with_metaclass(abc.ABCMeta)):
This method does not block.
Returns:
- True if the computation is known to have either completed or have been
- unscheduled or interrupted. False if the computation may possibly be
- executing or scheduled to execute later.
+ bool:
+ Returns True if the computation already executed or was cancelled.
+ Returns False if the computation is scheduled for execution or currently
+ executing.
+ This is exactly opposite of the running() method's result.
"""
raise NotImplementedError()
@abc.abstractmethod
def result(self, timeout=None):
- """Accesses the outcome of the computation or raises its exception.
+ """Returns the result of the computation or raises its exception.
This method may return immediately or may block.
Args:
timeout: The length of time in seconds to wait for the computation to
- finish or be cancelled, or None if this method should block until the
- computation has finished or is cancelled no matter how long that takes.
+ finish or be cancelled. If None, the call will block until the
+ computations's termination.
Returns:
The return value of the computation.
@@ -142,12 +147,11 @@ class Future(six.with_metaclass(abc.ABCMeta)):
Args:
timeout: The length of time in seconds to wait for the computation to
- terminate or be cancelled, or None if this method should block until
- the computation is terminated or is cancelled no matter how long that
- takes.
+ terminate or be cancelled. If None, the call will block until the
+ computations's termination.
Returns:
- The exception raised by the computation, or None if the computation did
+ The exception raised by the computation, or None if the computation did
not raise an exception.
Raises:
@@ -165,12 +169,11 @@ class Future(six.with_metaclass(abc.ABCMeta)):
Args:
timeout: The length of time in seconds to wait for the computation to
- terminate or be cancelled, or None if this method should block until
- the computation is terminated or is cancelled no matter how long that
- takes.
+ terminate or be cancelled. If None, the call will block until the
+ computations's termination.
Returns:
- The traceback of the exception raised by the computation, or None if the
+ The traceback of the exception raised by the computation, or None if the
computation did not raise an exception.
Raises:
@@ -260,7 +263,12 @@ class RpcContext(six.with_metaclass(abc.ABCMeta)):
@abc.abstractmethod
def is_active(self):
- """Describes whether the RPC is active or has terminated."""
+ """Describes whether the RPC is active or has terminated.
+
+ Returns:
+ bool:
+ True if RPC is active, False otherwise.
+ """
raise NotImplementedError()
@abc.abstractmethod
@@ -290,8 +298,9 @@ class RpcContext(six.with_metaclass(abc.ABCMeta)):
callback: A no-parameter callable to be called on RPC termination.
Returns:
- True if the callback was added and will be called later; False if the
- callback was not added and will not later be called (because the RPC
+ bool:
+ True if the callback was added and will be called later; False if the
+ callback was not added and will not be called (because the RPC
already terminated or some other reason).
"""
raise NotImplementedError()
@@ -305,7 +314,7 @@ class Call(six.with_metaclass(abc.ABCMeta, RpcContext)):
@abc.abstractmethod
def initial_metadata(self):
- """Accesses the initial metadata from the service-side of the RPC.
+ """Accesses the initial metadata sent by the server.
This method blocks until the value is available.
@@ -316,7 +325,7 @@ class Call(six.with_metaclass(abc.ABCMeta, RpcContext)):
@abc.abstractmethod
def trailing_metadata(self):
- """Accesses the trailing metadata from the service-side of the RPC.
+ """Accesses the trailing metadata sent by the server.
This method blocks until the value is available.
@@ -327,7 +336,7 @@ class Call(six.with_metaclass(abc.ABCMeta, RpcContext)):
@abc.abstractmethod
def code(self):
- """Accesses the status code emitted by the service-side of the RPC.
+ """Accesses the status code sent by the server.
This method blocks until the value is available.
@@ -338,7 +347,7 @@ class Call(six.with_metaclass(abc.ABCMeta, RpcContext)):
@abc.abstractmethod
def details(self):
- """Accesses the details value emitted by the service-side of the RPC.
+ """Accesses the details sent by the server.
This method blocks until the value is available.
@@ -352,10 +361,12 @@ class Call(six.with_metaclass(abc.ABCMeta, RpcContext)):
class ChannelCredentials(object):
- """A value encapsulating the data required to create a secure Channel.
+ """An encapsulation of the data required to create a secure Channel.
This class has no supported interface - it exists to define the type of its
- instances and its instances exist to be passed to other functions.
+ instances and its instances exist to be passed to other functions. For
+ example, ssl_channel_credentials returns an instance, and secure_channel
+ consumes an instance of this class.
"""
def __init__(self, credentials):
@@ -363,7 +374,8 @@ class ChannelCredentials(object):
class CallCredentials(object):
- """A value encapsulating data asserting an identity over a channel.
+ """An encapsulation of the data required to assert an identity over a
+ channel.
A CallCredentials may be composed with ChannelCredentials to always assert
identity for every call over that Channel.
@@ -389,7 +401,8 @@ class AuthMetadataPluginCallback(six.with_metaclass(abc.ABCMeta)):
"""Callback object received by a metadata plugin."""
def __call__(self, metadata, error):
- """Inform the gRPC runtime of the metadata to construct a CallCredentials.
+ """Inform the gRPC runtime of the metadata to construct a
+ CallCredentials.
Args:
metadata: The :term:`metadata` used to construct the CallCredentials.
@@ -416,7 +429,7 @@ class AuthMetadataPlugin(six.with_metaclass(abc.ABCMeta)):
class ServerCredentials(object):
- """A value encapsulating the data required to open a secure port on a Server.
+ """An encapsulation of the data required to open a secure port on a Server.
This class has no supported interface - it exists to define the type of its
instances and its instances exist to be passed to other functions.
@@ -430,7 +443,7 @@ class ServerCredentials(object):
class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)):
- """Affords invoking a unary-unary RPC."""
+ """Affords invoking a unary-unary RPC from client-side."""
@abc.abstractmethod
def __call__(self, request, timeout=None, metadata=None, credentials=None):
@@ -486,7 +499,7 @@ class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)):
credentials: An optional CallCredentials for the RPC.
Returns:
- An object that is both a Call for the RPC and a Future. In the event of
+ An object that is both a Call for the RPC and a Future. In the event of
RPC completion, the return Call-Future's result value will be the
response message of the RPC. Should the event terminate with non-OK
status, the returned Call-Future's exception value will be an RpcError.
@@ -495,7 +508,7 @@ class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)):
class UnaryStreamMultiCallable(six.with_metaclass(abc.ABCMeta)):
- """Affords invoking a unary-stream RPC."""
+ """Affords invoking a unary-stream RPC from client-side."""
@abc.abstractmethod
def __call__(self, request, timeout=None, metadata=None, credentials=None):
@@ -504,12 +517,13 @@ class UnaryStreamMultiCallable(six.with_metaclass(abc.ABCMeta)):
Args:
request: The request value for the RPC.
timeout: An optional duration of time in seconds to allow for the RPC.
+ If None, the timeout is considered infinite.
metadata: An optional :term:`metadata` to be transmitted to the
service-side of the RPC.
credentials: An optional CallCredentials for the RPC.
Returns:
- An object that is both a Call for the RPC and an iterator of response
+ An object that is both a Call for the RPC and an iterator of response
values. Drawing response values from the returned Call-iterator may
raise RpcError indicating termination of the RPC with non-OK status.
"""
@@ -517,7 +531,7 @@ class UnaryStreamMultiCallable(six.with_metaclass(abc.ABCMeta)):
class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)):
- """Affords invoking a stream-unary RPC in any call style."""
+ """Affords invoking a stream-unary RPC from client-side."""
@abc.abstractmethod
def __call__(self,
@@ -530,6 +544,7 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)):
Args:
request_iterator: An iterator that yields request values for the RPC.
timeout: An optional duration of time in seconds to allow for the RPC.
+ If None, the timeout is considered infinite.
metadata: Optional :term:`metadata` to be transmitted to the
service-side of the RPC.
credentials: An optional CallCredentials for the RPC.
@@ -539,8 +554,8 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)):
Raises:
RpcError: Indicating that the RPC terminated with non-OK status. The
- raised RpcError will also be a Call for the RPC affording the RPC's
- metadata, status code, and details.
+ raised RpcError will also implement grpc.Call, affording methods
+ such as metadata, code, and details.
"""
raise NotImplementedError()
@@ -550,17 +565,18 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)):
timeout=None,
metadata=None,
credentials=None):
- """Synchronously invokes the underlying RPC.
+ """Synchronously invokes the underlying RPC on the client.
Args:
request_iterator: An iterator that yields request values for the RPC.
timeout: An optional duration of time in seconds to allow for the RPC.
+ If None, the timeout is considered infinite.
metadata: Optional :term:`metadata` to be transmitted to the
service-side of the RPC.
credentials: An optional CallCredentials for the RPC.
Returns:
- The response value for the RPC and a Call for the RPC.
+ The response value for the RPC and a Call object for the RPC.
Raises:
RpcError: Indicating that the RPC terminated with non-OK status. The
@@ -575,17 +591,18 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)):
timeout=None,
metadata=None,
credentials=None):
- """Asynchronously invokes the underlying RPC.
+ """Asynchronously invokes the underlying RPC on the client.
Args:
request_iterator: An iterator that yields request values for the RPC.
timeout: An optional duration of time in seconds to allow for the RPC.
+ If None, the timeout is considered infinite.
metadata: Optional :term:`metadata` to be transmitted to the
service-side of the RPC.
credentials: An optional CallCredentials for the RPC.
Returns:
- An object that is both a Call for the RPC and a Future. In the event of
+ An object that is both a Call for the RPC and a Future. In the event of
RPC completion, the return Call-Future's result value will be the
response message of the RPC. Should the event terminate with non-OK
status, the returned Call-Future's exception value will be an RpcError.
@@ -594,7 +611,7 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)):
class StreamStreamMultiCallable(six.with_metaclass(abc.ABCMeta)):
- """Affords invoking a stream-stream RPC in any call style."""
+ """Affords invoking a stream-stream RPC on client-side."""
@abc.abstractmethod
def __call__(self,
@@ -602,17 +619,18 @@ class StreamStreamMultiCallable(six.with_metaclass(abc.ABCMeta)):
timeout=None,
metadata=None,
credentials=None):
- """Invokes the underlying RPC.
+ """Invokes the underlying RPC on the client.
Args:
request_iterator: An iterator that yields request values for the RPC.
timeout: An optional duration of time in seconds to allow for the RPC.
+ if not specified the timeout is considered infinite.
metadata: Optional :term:`metadata` to be transmitted to the
service-side of the RPC.
credentials: An optional CallCredentials for the RPC.
Returns:
- An object that is both a Call for the RPC and an iterator of response
+ An object that is both a Call for the RPC and an iterator of response
values. Drawing response values from the returned Call-iterator may
raise RpcError indicating termination of the RPC with non-OK status.
"""
@@ -623,27 +641,32 @@ class StreamStreamMultiCallable(six.with_metaclass(abc.ABCMeta)):
class Channel(six.with_metaclass(abc.ABCMeta)):
- """Affords RPC invocation via generic methods."""
+ """Affords RPC invocation via generic methods on client-side."""
@abc.abstractmethod
def subscribe(self, callback, try_to_connect=False):
- """Subscribes to this Channel's connectivity.
+ """Subscribe to this Channel's connectivity state machine.
+
+ A Channel may be in any of the states described by ChannelConnectivity.
+ This method allows application to monitor the state transitions.
+ The typical use case is to debug or gain better visibility into gRPC
+ runtime's state.
Args:
- callback: A callable to be invoked and passed a ChannelConnectivity value
- describing this Channel's connectivity. The callable will be invoked
- immediately upon subscription and again for every change to this
- Channel's connectivity thereafter until it is unsubscribed or this
+ callback: A callable to be invoked with ChannelConnectivity argument.
+ ChannelConnectivity describes current state of the channel.
+ The callable will be invoked immediately upon subscription and again for
+ every change to ChannelConnectivity until it is unsubscribed or this
Channel object goes out of scope.
try_to_connect: A boolean indicating whether or not this Channel should
- attempt to connect if it is not already connected and ready to conduct
- RPCs.
+ attempt to connect immediately. If set to False, gRPC runtime decides
+ when to connect.
"""
raise NotImplementedError()
@abc.abstractmethod
def unsubscribe(self, callback):
- """Unsubscribes a callback from this Channel's connectivity.
+ """Unsubscribes a subscribed callback from this Channel's connectivity.
Args:
callback: A callable previously registered with this Channel from having
@@ -736,7 +759,7 @@ class ServicerContext(six.with_metaclass(abc.ABCMeta, RpcContext)):
@abc.abstractmethod
def invocation_metadata(self):
- """Accesses the metadata from the invocation-side of the RPC.
+ """Accesses the metadata from the sent by the client.
Returns:
The invocation :term:`metadata`.
@@ -749,15 +772,16 @@ class ServicerContext(six.with_metaclass(abc.ABCMeta, RpcContext)):
Returns:
A string identifying the peer that invoked the RPC being serviced.
+ The string format is determined by gRPC runtime.
"""
raise NotImplementedError()
@abc.abstractmethod
def send_initial_metadata(self, initial_metadata):
- """Sends the initial metadata value to the invocation-side of the RPC.
+ """Sends the initial metadata value to the client.
- This method need not be called by method implementations if they have no
- service-side initial metadata to transmit.
+ This method need not be called by implementations if they have no
+ metadata to add to what the gRPC runtime will transmit.
Args:
initial_metadata: The initial :term:`metadata`.
@@ -766,10 +790,10 @@ class ServicerContext(six.with_metaclass(abc.ABCMeta, RpcContext)):
@abc.abstractmethod
def set_trailing_metadata(self, trailing_metadata):
- """Accepts the trailing metadata value of the RPC.
+ """Sends the trailing metadata for the RPC.
- This method need not be called by method implementations if they have no
- service-side trailing metadata to transmit.
+ This method need not be called by implementations if they have no
+ metadata to add to what the gRPC runtime will transmit.
Args:
trailing_metadata: The trailing :term:`metadata`.
@@ -778,27 +802,25 @@ class ServicerContext(six.with_metaclass(abc.ABCMeta, RpcContext)):
@abc.abstractmethod
def set_code(self, code):
- """Accepts the status code of the RPC.
+ """Sets the value to be used as status code upon RPC completion.
This method need not be called by method implementations if they wish the
gRPC runtime to determine the status code of the RPC.
Args:
- code: A StatusCode value to be transmitted to the invocation side of the
- RPC as the status code of the RPC.
+ code: A StatusCode object to be sent to the client.
"""
raise NotImplementedError()
@abc.abstractmethod
def set_details(self, details):
- """Accepts the service-side details of the RPC.
+ """Sets the value to be used as detail string upon RPC completion.
This method need not be called by method implementations if they have no
details to transmit.
Args:
- details: A string to be transmitted to the invocation side of the RPC as
- the status details of the RPC.
+ details: An arbitrary string to be sent to the client upon completion.
"""
raise NotImplementedError()
@@ -845,7 +867,7 @@ class HandlerCallDetails(six.with_metaclass(abc.ABCMeta)):
"""Describes an RPC that has just arrived for service.
Attributes:
method: The method name of the RPC.
- invocation_metadata: The :term:`metadata` from the invocation side of the RPC.
+ invocation_metadata: The :term:`metadata` sent by the client.
"""
@@ -854,14 +876,14 @@ class GenericRpcHandler(six.with_metaclass(abc.ABCMeta)):
@abc.abstractmethod
def service(self, handler_call_details):
- """Services an RPC (or not).
+ """Returns the handler for servicing the RPC.
Args:
handler_call_details: A HandlerCallDetails describing the RPC.
Returns:
- An RpcMethodHandler with which the RPC may be serviced, or None to
- indicate that this object will not be servicing the RPC.
+ An RpcMethodHandler with which the RPC may be serviced if the
+ implementation chooses to service this RPC, or None otherwise.
"""
raise NotImplementedError()
@@ -870,15 +892,15 @@ class ServiceRpcHandler(six.with_metaclass(abc.ABCMeta, GenericRpcHandler)):
"""An implementation of RPC methods belonging to a service.
A service handles RPC methods with structured names of the form
- '/Service.Name/Service.MethodX', where 'Service.Name' is the value
- returned by service_name(), and 'Service.MethodX' is the service method
- name. A service can have multiple service methods names, but only a single
+ '/Service.Name/Service.Method', where 'Service.Name' is the value
+ returned by service_name(), and 'Service.Method' is the method
+ name. A service can have multiple method names, but only a single
service name.
"""
@abc.abstractmethod
def service_name(self):
- """Returns this services name.
+ """Returns this service's name.
Returns:
The service name.
@@ -900,88 +922,78 @@ class Server(six.with_metaclass(abc.ABCMeta)):
Args:
generic_rpc_handlers: An iterable of GenericRpcHandlers that will be used
- to service RPCs after this Server is started.
+ to service RPCs.
"""
raise NotImplementedError()
@abc.abstractmethod
def add_insecure_port(self, address):
- """Reserves a port for insecure RPC service once this Server becomes active.
+ """Opens an insecure port for accepting RPCs.
- This method may only be called before calling this Server's start method is
- called.
+ This method may only be called before starting the server.
Args:
address: The address for which to open a port.
+ if the port is 0, or not specified in the address, then gRPC runtime
+ will choose a port.
Returns:
- An integer port on which RPCs will be serviced after this link has been
- started. This is typically the same number as the port number contained
- in the passed address, but will likely be different if the port number
- contained in the passed address was zero.
+ integer:
+ An integer port on which server will accept RPC requests.
"""
raise NotImplementedError()
@abc.abstractmethod
def add_secure_port(self, address, server_credentials):
- """Reserves a port for secure RPC service after this Server becomes active.
+ """Opens a secure port for accepting RPCs.
- This method may only be called before calling this Server's start method is
- called.
+ This method may only be called before starting the server.
Args:
address: The address for which to open a port.
- server_credentials: A ServerCredentials.
+ if the port is 0, or not specified in the address, then gRPC runtime
+ will choose a port.
+ server_credentials: A ServerCredentials object.
Returns:
- An integer port on which RPCs will be serviced after this link has been
- started. This is typically the same number as the port number contained
- in the passed address, but will likely be different if the port number
- contained in the passed address was zero.
+ integer:
+ An integer port on which server will accept RPC requests.
"""
raise NotImplementedError()
@abc.abstractmethod
def start(self):
- """Starts this Server's service of RPCs.
+ """Starts this Server.
- This method may only be called while the server is not serving RPCs (i.e. it
- is not idempotent).
+ This method may only be called once. (i.e. it is not idempotent).
"""
raise NotImplementedError()
@abc.abstractmethod
def stop(self, grace):
- """Stops this Server's service of RPCs.
+ """Stops this Server.
- All calls to this method immediately stop service of new RPCs. When existing
- RPCs are aborted is controlled by the grace period parameter passed to this
- method.
+ This method immediately stop service of new RPCs in all cases.
+ If a grace period is specified, this method returns immediately
+ and all RPCs active at the end of the grace period are aborted.
- This method may be called at any time and is idempotent. Passing a smaller
- grace value than has been passed in a previous call will have the effect of
- stopping the Server sooner. Passing a larger grace value than has been
- passed in a previous call will not have the effect of stopping the server
- later.
+ If a grace period is not specified, then all existing RPCs are
+ teriminated immediately and the this method blocks until the last
+ RPC handler terminates.
- This method does not block for any significant length of time. If None is
- passed as the grace value, existing RPCs are immediately aborted and this
- method blocks until this Server is completely stopped.
+ This method is idempotent and may be called at any time. Passing a smaller
+ grace value in subsequentcall will have the effect of stopping the Server
+ sooner. Passing a larger grace value in subsequent call *will not* have the
+ effect of stopping the server later (i.e. the most restrictive grace
+ value is used).
Args:
- grace: A duration of time in seconds or None. If a duration of time in
- seconds, the time to allow existing RPCs to complete before being
- aborted by this Server's stopping. If None, all RPCs will be aborted
- immediately and this method will block until this Server is completely
- stopped.
+ grace: A duration of time in seconds or None.
Returns:
A threading.Event that will be set when this Server has completely
- stopped. The returned event may not be set until after the full grace
- period (if some ongoing RPC continues for the full length of the period)
- of it may be set much sooner (such as if this Server had no RPCs underway
- at the time it was stopped or if all RPCs that it had underway completed
- very early in the grace period).
+ stopped, i.e. when running RPCs either complete or are aborted and
+ all handlers have terminated.
"""
raise NotImplementedError()
@@ -995,14 +1007,13 @@ def unary_unary_rpc_method_handler(behavior,
"""Creates an RpcMethodHandler for a unary-unary RPC method.
Args:
- behavior: The implementation of an RPC method as a callable behavior taking
- a single request value and returning a single response value.
- request_deserializer: An optional request deserialization behavior.
- response_serializer: An optional response serialization behavior.
+ behavior: The implementation of an RPC that accepts one request and returns
+ one response.
+ request_deserializer: An optional behavior for request deserialization.
+ response_serializer: An optional behavior for response serialization.
Returns:
- An RpcMethodHandler for a unary-unary RPC method constructed from the given
- parameters.
+ An RpcMethodHandler object that is typically used by grpc.Server.
"""
from grpc import _utilities # pylint: disable=cyclic-import
return _utilities.RpcMethodHandler(False, False, request_deserializer,
@@ -1016,14 +1027,13 @@ def unary_stream_rpc_method_handler(behavior,
"""Creates an RpcMethodHandler for a unary-stream RPC method.
Args:
- behavior: The implementation of an RPC method as a callable behavior taking
- a single request value and returning an iterator of response values.
- request_deserializer: An optional request deserialization behavior.
- response_serializer: An optional response serialization behavior.
+ behavior: The implementation of an RPC that accepts one request and returns
+ an iterator of response values.
+ request_deserializer: An optional behavior for request deserialization.
+ response_serializer: An optional behavior for response serialization.
Returns:
- An RpcMethodHandler for a unary-stream RPC method constructed from the
- given parameters.
+ An RpcMethodHandler object that is typically used by grpc.Server.
"""
from grpc import _utilities # pylint: disable=cyclic-import
return _utilities.RpcMethodHandler(False, True, request_deserializer,
@@ -1037,14 +1047,13 @@ def stream_unary_rpc_method_handler(behavior,
"""Creates an RpcMethodHandler for a stream-unary RPC method.
Args:
- behavior: The implementation of an RPC method as a callable behavior taking
- an iterator of request values and returning a single response value.
- request_deserializer: An optional request deserialization behavior.
- response_serializer: An optional response serialization behavior.
+ behavior: The implementation of an RPC that accepts an iterator of request
+ values and returns a single response value.
+ request_deserializer: An optional behavior for request deserialization.
+ response_serializer: An optional behavior for response serialization.
Returns:
- An RpcMethodHandler for a stream-unary RPC method constructed from the
- given parameters.
+ An RpcMethodHandler object that is typically used by grpc.Server.
"""
from grpc import _utilities # pylint: disable=cyclic-import
return _utilities.RpcMethodHandler(True, False, request_deserializer,
@@ -1058,15 +1067,13 @@ def stream_stream_rpc_method_handler(behavior,
"""Creates an RpcMethodHandler for a stream-stream RPC method.
Args:
- behavior: The implementation of an RPC method as a callable behavior taking
- an iterator of request values and returning an iterator of response
- values.
- request_deserializer: An optional request deserialization behavior.
- response_serializer: An optional response serialization behavior.
+ behavior: The implementation of an RPC that accepts an iterator of request
+ values and returns an iterator of response values.
+ request_deserializer: An optional behavior for request deserialization.
+ response_serializer: An optional behavior for response serialization.
Returns:
- An RpcMethodHandler for a stream-stream RPC method constructed from the
- given parameters.
+ An RpcMethodHandler object that is typically used by grpc.Server.
"""
from grpc import _utilities # pylint: disable=cyclic-import
return _utilities.RpcMethodHandler(True, True, request_deserializer,
@@ -1075,15 +1082,16 @@ def stream_stream_rpc_method_handler(behavior,
def method_handlers_generic_handler(service, method_handlers):
- """Creates a grpc.GenericRpcHandler from RpcMethodHandlers.
+ """Creates a GenericRpcHandler from RpcMethodHandlers.
Args:
- service: A service name to be used for the given method handlers.
- method_handlers: A dictionary from method name to RpcMethodHandler
- implementing the named method.
+ service: The name of the service that is implemented by the method_handlers.
+ method_handlers: A dictionary that maps method names to corresponding
+ RpcMethodHandler.
Returns:
- A GenericRpcHandler constructed from the given parameters.
+ A GenericRpcHandler. This is typically added to the grpc.Server object
+ with add_generic_rpc_handlers() before starting the server.
"""
from grpc import _utilities # pylint: disable=cyclic-import
return _utilities.DictionaryGenericHandler(service, method_handlers)
@@ -1095,12 +1103,12 @@ def ssl_channel_credentials(root_certificates=None,
"""Creates a ChannelCredentials for use with an SSL-enabled Channel.
Args:
- root_certificates: The PEM-encoded root certificates or unset to ask for
- them to be retrieved from a default location.
- private_key: The PEM-encoded private key to use or unset if no private key
- should be used.
- certificate_chain: The PEM-encoded certificate chain to use or unset if no
- certificate chain should be used.
+ root_certificates: The PEM-encoded root certificates as a byte string,
+ or None to retrieve them from a default location chosen by gRPC runtime.
+ private_key: The PEM-encoded private key as a byte string, or None if no
+ private key should be used.
+ certificate_chain: The PEM-encoded certificate chain as a byte string
+ to use or or None if no certificate chain should be used.
Returns:
A ChannelCredentials for use with an SSL-enabled Channel.
@@ -1117,9 +1125,8 @@ def metadata_call_credentials(metadata_plugin, name=None):
"""Construct CallCredentials from an AuthMetadataPlugin.
Args:
- metadata_plugin: An AuthMetadataPlugin to use as the authentication behavior
- in the created CallCredentials.
- name: A name for the plugin.
+ metadata_plugin: An AuthMetadataPlugin to use for authentication.
+ name: An optional name for the plugin.
Returns:
A CallCredentials.
@@ -1142,7 +1149,8 @@ def access_token_call_credentials(access_token):
Args:
access_token: A string to place directly in the http request
- authorization header, ie "authorization: Bearer <access_token>".
+ authorization header, for example
+ "authorization: Bearer <access_token>".
Returns:
A CallCredentials.
@@ -1173,12 +1181,12 @@ def composite_channel_credentials(channel_credentials, *call_credentials):
"""Compose a ChannelCredentials and one or more CallCredentials objects.
Args:
- channel_credentials: A ChannelCredentials.
+ channel_credentials: A ChannelCredentials object.
*call_credentials: One or more CallCredentials objects.
Returns:
A ChannelCredentials composed of the given ChannelCredentials and
- CallCredentials objects.
+ CallCredentials objects.
"""
from grpc import _credential_composition # pylint: disable=cyclic-import
cygrpc_call_credentials = tuple(
@@ -1195,18 +1203,18 @@ def ssl_server_credentials(private_key_certificate_chain_pairs,
"""Creates a ServerCredentials for use with an SSL-enabled Server.
Args:
- private_key_certificate_chain_pairs: A nonempty sequence each element of
- which is a pair the first element of which is a PEM-encoded private key
- and the second element of which is the corresponding PEM-encoded
- certificate chain.
- root_certificates: PEM-encoded client root certificates to be used for
- verifying authenticated clients. If omitted, require_client_auth must also
- be omitted or be False.
- require_client_auth: A boolean indicating whether or not to require clients
- to be authenticated. May only be True if root_certificates is not None.
+ private_key_certificate_chain_pairs: A list of pairs of the form
+ [PEM-encoded private key, PEM-encoded certificate chain].
+ root_certificates: An optional byte string of PEM-encoded client root
+ certificates that the server will use to verify client authentication.
+ If omitted, require_client_auth must also be False.
+ require_client_auth: A boolean indicating whether or not to require
+ clients to be authenticated. May only be True if root_certificates
+ is not None.
Returns:
- A ServerCredentials for use with an SSL-enabled Server.
+ A ServerCredentials for use with an SSL-enabled Server. Typically, this
+ object is an argument to add_secure_port() method during server setup.
"""
if len(private_key_certificate_chain_pairs) == 0:
raise ValueError(
@@ -1224,18 +1232,17 @@ def ssl_server_credentials(private_key_certificate_chain_pairs,
def channel_ready_future(channel):
- """Creates a Future tracking when a Channel is ready.
+ """Creates a Future that tracks when a Channel is ready.
- Cancelling the returned Future does not tell the given Channel to abandon
- attempts it may have been making to connect; cancelling merely deactivates the
- returned Future's subscription to the given Channel's connectivity.
+ Cancelling the Future does not affect the channel's state machine.
+ It merely decouples the Future from channel state machine.
Args:
- channel: A Channel.
+ channel: A Channel object.
Returns:
- A Future that matures when the given Channel has connectivity
- ChannelConnectivity.READY.
+ A Future object that matures when the channel connectivity is
+ ChannelConnectivity.READY.
"""
from grpc import _utilities # pylint: disable=cyclic-import
return _utilities.channel_ready_future(channel)
@@ -1245,12 +1252,12 @@ def insecure_channel(target, options=None):
"""Creates an insecure Channel to a server.
Args:
- target: The target to which to connect.
- options: A sequence of string-value pairs according to which to configure
- the created channel.
+ target: The server address
+ options: An optional list of key-value pairs (channel args in gRPC runtime)
+ to configure the channel.
Returns:
- A Channel to the target through which RPCs may be conducted.
+ A Channel object.
"""
from grpc import _channel # pylint: disable=cyclic-import
return _channel.Channel(target, () if options is None else options, None)
@@ -1260,13 +1267,13 @@ def secure_channel(target, credentials, options=None):
"""Creates a secure Channel to a server.
Args:
- target: The target to which to connect.
+ target: The server address.
credentials: A ChannelCredentials instance.
- options: A sequence of string-value pairs according to which to configure
- the created channel.
+ options: An optional list of key-value pairs (channel args in gRPC runtime)
+ to configure the channel.
Returns:
- A Channel to the target through which RPCs may be conducted.
+ A Channel object.
"""
from grpc import _channel # pylint: disable=cyclic-import
return _channel.Channel(target, () if options is None else options,
@@ -1280,21 +1287,19 @@ def server(thread_pool,
"""Creates a Server with which RPCs can be serviced.
Args:
- thread_pool: A futures.ThreadPoolExecutor to be used by the returned Server
- to service RPCs.
- handlers: An optional sequence of GenericRpcHandlers to be used to service
- RPCs after the returned Server is started. These handlers need not be the
- only handlers the server will use to service RPCs; other handlers may
- later be added by calling add_generic_rpc_handlers any time before the
- returned Server is started.
- options: A sequence of string-value pairs according to which to configure
- the created server.
+ thread_pool: A futures.ThreadPoolExecutor to be used by the Server
+ to execute RPC handlers.
+ handlers: An optional list of GenericRpcHandlers used for executing RPCs.
+ More handlers may be added by calling add_generic_rpc_handlers any time
+ before the server is started.
+ options: An optional list of key-value pairs (channel args in gRPC runtime)
+ to configure the channel.
maximum_concurrent_rpcs: The maximum number of concurrent RPCs this server
- will service before returning status RESOURCE_EXHAUSTED, or None to
+ will service before returning RESOURCE_EXHAUSTED status, or None to
indicate no limit.
Returns:
- A Server with which RPCs can be serviced.
+ A Server object.
"""
from grpc import _server # pylint: disable=cyclic-import
return _server.Server(thread_pool, () if handlers is None else handlers, ()
diff --git a/src/python/grpcio_health_checking/setup.py b/src/python/grpcio_health_checking/setup.py
index 1806d311b4..f1c09de2eb 100644
--- a/src/python/grpcio_health_checking/setup.py
+++ b/src/python/grpcio_health_checking/setup.py
@@ -46,7 +46,7 @@ PACKAGE_DIRECTORIES = {
SETUP_REQUIRES = (
'grpcio-tools>={version}'.format(version=grpc_version.VERSION),)
-INSTALL_REQUIRES = ('protobuf>=3.2.0',
+INSTALL_REQUIRES = ('protobuf>=3.3.0',
'grpcio>={version}'.format(version=grpc_version.VERSION),)
COMMAND_CLASS = {
diff --git a/src/python/grpcio_reflection/setup.py b/src/python/grpcio_reflection/setup.py
index e6cf54745e..cb49c3d57e 100644
--- a/src/python/grpcio_reflection/setup.py
+++ b/src/python/grpcio_reflection/setup.py
@@ -47,7 +47,7 @@ PACKAGE_DIRECTORIES = {
SETUP_REQUIRES = (
'grpcio-tools>={version}'.format(version=grpc_version.VERSION),)
-INSTALL_REQUIRES = ('protobuf>=3.2.0',
+INSTALL_REQUIRES = ('protobuf>=3.3.0',
'grpcio>={version}'.format(version=grpc_version.VERSION),)
COMMAND_CLASS = {
diff --git a/src/python/grpcio_tests/setup.py b/src/python/grpcio_tests/setup.py
index b9f0264dae..7ee5336a7d 100644
--- a/src/python/grpcio_tests/setup.py
+++ b/src/python/grpcio_tests/setup.py
@@ -56,7 +56,7 @@ INSTALL_REQUIRES = (
'grpcio>={version}'.format(version=grpc_version.VERSION),
'grpcio-tools>={version}'.format(version=grpc_version.VERSION),
'grpcio-health-checking>={version}'.format(version=grpc_version.VERSION),
- 'oauth2client>=1.4.7', 'protobuf>=3.2.0', 'six>=1.10',)
+ 'oauth2client>=1.4.7', 'protobuf>=3.3.0', 'six>=1.10',)
COMMAND_CLASS = {
# Run `preprocess` *before* doing any packaging!
diff --git a/templates/composer.json.template b/templates/composer.json.template
index 94f0c236a9..2d4cb11919 100644
--- a/templates/composer.json.template
+++ b/templates/composer.json.template
@@ -9,7 +9,7 @@
"license": "BSD-3-Clause",
"require": {
"php": ">=5.5.0",
- "google/protobuf": "^v3.1.0"
+ "google/protobuf": "^v3.3.0"
},
"require-dev": {
"google/auth": "v0.9"
diff --git a/templates/src/php/composer.json.template b/templates/src/php/composer.json.template
index 1887ee3c82..36932cf8f6 100644
--- a/templates/src/php/composer.json.template
+++ b/templates/src/php/composer.json.template
@@ -7,7 +7,7 @@
"version": "${settings.php_version.php_composer()}",
"require": {
"php": ">=5.5.0",
- "google/protobuf": "^v3.1.0"
+ "google/protobuf": "^v3.3.0"
},
"require-dev": {
"google/auth": "v0.9"
diff --git a/templates/tools/dockerfile/gcp_api_libraries.include b/templates/tools/dockerfile/gcp_api_libraries.include
index 669b0f887c..adecb92c15 100644
--- a/templates/tools/dockerfile/gcp_api_libraries.include
+++ b/templates/tools/dockerfile/gcp_api_libraries.include
@@ -1,4 +1,3 @@
# Google Cloud platform API libraries
RUN apt-get update && apt-get install -y python-pip && apt-get clean
RUN pip install --upgrade google-api-python-client
-
diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_go1.7/Dockerfile.template
index ad8ad71b5f..b4e618daeb 100644
--- a/templates/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile.template
+++ b/templates/tools/dockerfile/interoptest/grpc_interop_go1.7/Dockerfile.template
@@ -1,6 +1,6 @@
%YAML 1.2
--- |
- # Copyright 2016, Google Inc.
+ # Copyright 2017, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,10 +29,10 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- FROM golang:latest
+ FROM golang:1.7
- <%include file="../../gcp_api_libraries.include"/>
- <%include file="../../python_deps.include"/>
<%include file="../../go_path.include"/>
+ <%include file="../../python_deps.include"/>
# Define the default command.
CMD ["bash"]
+
diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_go1.8/Dockerfile.template
index d70b751b14..437e8261b3 100644
--- a/templates/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile.template
+++ b/templates/tools/dockerfile/interoptest/grpc_interop_go1.8/Dockerfile.template
@@ -1,6 +1,6 @@
%YAML 1.2
--- |
- # Copyright 2016, Google Inc.
+ # Copyright 2017, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,12 +29,10 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- FROM debian:jessie
+ FROM golang:1.8
- <%include file="../../apt_get_basic.include"/>
+ <%include file="../../go_path.include"/>
<%include file="../../python_deps.include"/>
- <%include file="../../node_deps.include"/>
- <%include file="../../gcp_api_libraries.include"/>
- <%include file="../../run_tests_addons.include"/>
# Define the default command.
CMD ["bash"]
+
diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile.template
deleted file mode 100644
index 5d805bb4b2..0000000000
--- a/templates/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile.template
+++ /dev/null
@@ -1,42 +0,0 @@
-%YAML 1.2
---- |
- # Copyright 2015, 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.
-
- FROM debian:jessie
-
- <%include file="../../apt_get_basic.include"/>
- <%include file="../../python_deps.include"/>
- <%include file="../../ccache_setup.include"/>
- <%include file="../../cxx_deps.include"/>
- <%include file="../../gcp_api_libraries.include"/>
- <%include file="../../csharp_deps.include"/>
- # Define the default command.
- CMD ["bash"]
-
diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_cxx/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_cxx/Dockerfile.template
deleted file mode 100644
index 18f06b770c..0000000000
--- a/templates/tools/dockerfile/stress_test/grpc_interop_stress_cxx/Dockerfile.template
+++ /dev/null
@@ -1,41 +0,0 @@
-%YAML 1.2
---- |
- # Copyright 2015-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.
-
- FROM debian:jessie
-
- <%include file="../../apt_get_basic.include"/>
- <%include file="../../python_deps.include"/>
- <%include file="../../ccache_setup.include"/>
- <%include file="../../cxx_deps.include"/>
- <%include file="../../gcp_api_libraries.include"/>
- <%include file="../../clang_update.include"/>
- # Define the default command.
- CMD ["bash"]
diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile.template
deleted file mode 100644
index 2bb2f9ba1e..0000000000
--- a/templates/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile.template
+++ /dev/null
@@ -1,41 +0,0 @@
-%YAML 1.2
---- |
- # 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.
-
- FROM debian:jessie
-
- <%include file="../../apt_get_basic.include"/>
- <%include file="../../python_deps.include"/>
- <%include file="../../ccache_setup.include"/>
- <%include file="../../cxx_deps.include"/>
- <%include file="../../gcp_api_libraries.include"/>
- <%include file="../../java_deps.include"/>
- # Define the default command.
- CMD ["bash"]
diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile.template
deleted file mode 100644
index 49ba60168d..0000000000
--- a/templates/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile.template
+++ /dev/null
@@ -1,46 +0,0 @@
-%YAML 1.2
---- |
- # Copyright 2015, 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.
-
- FROM debian:jessie
-
- <%include file="../../apt_get_basic.include"/>
- <%include file="../../python_deps.include"/>
- <%include file="../../ruby_deps.include"/>
- <%include file="../../gcp_api_libraries.include"/>
- <%include file="../../php_deps.include"/>
- <%include file="../../run_tests_addons.include"/>
- # Install composer
- RUN curl -sS https://getcomposer.org/installer | php
- RUN mv composer.phar /usr/local/bin/composer
-
- # Define the default command.
- CMD ["bash"]
-
diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile.template
deleted file mode 100644
index 27e9eeec5a..0000000000
--- a/templates/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile.template
+++ /dev/null
@@ -1,45 +0,0 @@
-%YAML 1.2
---- |
- # 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.
-
- FROM debian:jessie
-
- <%include file="../../apt_get_basic.include"/>
- <%include file="../../ccache_setup.include"/>
- <%include file="../../cxx_deps.include"/>
- <%include file="../../gcp_api_libraries.include"/>
- <%include file="../../python_deps.include"/>
-
- RUN pip install coverage
- RUN pip install oauth2client
-
- # Define the default command.
- CMD ["bash"]
-
diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile.template
deleted file mode 100644
index 18199771d7..0000000000
--- a/templates/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile.template
+++ /dev/null
@@ -1,42 +0,0 @@
-%YAML 1.2
---- |
- # Copyright 2015, 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.
-
- FROM debian:jessie
-
- <%include file="../../apt_get_basic.include"/>
- <%include file="../../python_deps.include"/>
- <%include file="../../ccache_setup.include"/>
- <%include file="../../cxx_deps.include"/>
- <%include file="../../gcp_api_libraries.include"/>
- <%include file="../../ruby_deps.include"/>
- # Define the default command.
- CMD ["bash"]
-
diff --git a/templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template
index 092f04dac6..f869cf9106 100644
--- a/templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/csharp_jessie_x64/Dockerfile.template
@@ -32,6 +32,7 @@
FROM debian:jessie
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../csharp_deps.include"/>
<%include file="../../csharp_dotnetcli_deps.include"/>
diff --git a/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template
index 35b0e177fb..a42215d257 100644
--- a/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template
@@ -32,6 +32,7 @@
FROM debian:jessie
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../cxx_deps.include"/>
<%include file="../../clang_update.include"/>
diff --git a/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template b/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template
index 643b5cb65b..9df8158382 100644
--- a/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template
+++ b/templates/tools/dockerfile/test/cxx_jessie_x86/Dockerfile.template
@@ -32,6 +32,7 @@
FROM 32bit/debian:jessie
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../cxx_deps.include"/>
<%include file="../../run_tests_addons.include"/>
diff --git a/templates/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile.template
index 8a95cad649..98854ff1c4 100644
--- a/templates/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile.template
@@ -32,6 +32,7 @@
FROM ubuntu:14.04
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../cxx_deps.include"/>
<%include file="../../run_tests_addons_nocache.include"/>
diff --git a/templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template
index 42ad6c130d..3ad65e9eee 100644
--- a/templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template
@@ -32,6 +32,7 @@
FROM ubuntu:16.04
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../cxx_deps.include"/>
<%include file="../../run_tests_addons.include"/>
diff --git a/templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template
index 5c38e9a0e9..6d74f4c8d1 100644
--- a/templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template
@@ -32,6 +32,7 @@
FROM debian:wheezy
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../cxx_deps.include"/>
diff --git a/templates/tools/dockerfile/test/fuzzer/Dockerfile.template b/templates/tools/dockerfile/test/fuzzer/Dockerfile.template
index 6d7cb72f27..32a843a482 100644
--- a/templates/tools/dockerfile/test/fuzzer/Dockerfile.template
+++ b/templates/tools/dockerfile/test/fuzzer/Dockerfile.template
@@ -32,6 +32,7 @@
FROM debian:jessie
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../cxx_deps.include"/>
<%include file="../../clang_update.include"/>
diff --git a/templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template
index 93d26b5594..bf64ba210a 100644
--- a/templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template
@@ -32,6 +32,7 @@
FROM debian:jessie
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../csharp_deps.include"/>
<%include file="../../cxx_deps.include"/>
<%include file="../../node_deps.include"/>
diff --git a/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template
index ceaa9aa5ab..103b1ef848 100644
--- a/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template
@@ -32,6 +32,7 @@
FROM debian:jessie
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
# Install Electron apt dependencies
RUN apt-get update && apt-get install -y ${'\\'}
diff --git a/templates/tools/dockerfile/test/php7_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/php7_jessie_x64/Dockerfile.template
index e6a213d90d..1581002830 100644
--- a/templates/tools/dockerfile/test/php7_jessie_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/php7_jessie_x64/Dockerfile.template
@@ -32,6 +32,7 @@
FROM debian:jessie
<%include file="../../php7_deps.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../run_tests_addons.include"/>
# Define the default command.
diff --git a/templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template
index 0cfa373c90..ced93d0406 100644
--- a/templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/php_jessie_x64/Dockerfile.template
@@ -32,6 +32,7 @@
FROM debian:jessie
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../php_deps.include"/>
<%include file="../../run_tests_addons.include"/>
diff --git a/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template
index 46fb84ba83..26ff987ac2 100644
--- a/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template
@@ -32,8 +32,8 @@
FROM debian:jessie
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../run_tests_addons.include"/>
# Define the default command.
CMD ["bash"]
- \ No newline at end of file
diff --git a/templates/tools/dockerfile/test/python_pyenv_x64/Dockerfile.template b/templates/tools/dockerfile/test/python_pyenv_x64/Dockerfile.template
index f9a4dcb7b6..62d9b92400 100644
--- a/templates/tools/dockerfile/test/python_pyenv_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/python_pyenv_x64/Dockerfile.template
@@ -32,6 +32,7 @@
FROM debian:jessie
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../apt_get_pyenv.include"/>
<%include file="../../run_tests_addons.include"/>
diff --git a/templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template
index 35838bc11e..d1899853e6 100644
--- a/templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/ruby_jessie_x64/Dockerfile.template
@@ -32,6 +32,7 @@
FROM debian:jessie
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../ruby_deps.include"/>
<%include file="../../run_tests_addons.include"/>
diff --git a/templates/tools/dockerfile/test/sanity/Dockerfile.template b/templates/tools/dockerfile/test/sanity/Dockerfile.template
index 8617666b21..6943134b6a 100644
--- a/templates/tools/dockerfile/test/sanity/Dockerfile.template
+++ b/templates/tools/dockerfile/test/sanity/Dockerfile.template
@@ -32,6 +32,7 @@
FROM ubuntu:15.10
<%include file="../../apt_get_basic.include"/>
+ <%include file="../../gcp_api_libraries.include"/>
<%include file="../../python_deps.include"/>
#========================
# Sanity test dependencies
diff --git a/test/core/transport/bdp_estimator_test.c b/test/core/transport/bdp_estimator_test.c
index f55a3ca643..a6f1a55363 100644
--- a/test/core/transport/bdp_estimator_test.c
+++ b/test/core/transport/bdp_estimator_test.c
@@ -33,6 +33,7 @@
#include "src/core/lib/transport/bdp_estimator.h"
+#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
@@ -64,6 +65,8 @@ static void add_samples(grpc_bdp_estimator *estimator, int64_t *samples,
GPR_ASSERT(grpc_bdp_estimator_add_incoming_bytes(estimator, samples[i]) ==
false);
}
+ gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
+ gpr_time_from_millis(1, GPR_TIMESPAN)));
grpc_bdp_estimator_complete_ping(estimator);
}
@@ -123,24 +126,25 @@ static void test_get_estimate_random_values(size_t n) {
gpr_log(GPR_INFO, "test_get_estimate_random_values(%" PRIdPTR ")", n);
grpc_bdp_estimator est;
grpc_bdp_estimator_init(&est, "test");
- int min = INT_MAX;
- int max = 65535; // Windows rand() has limited range, make sure the ASSERT
- // passes
+ const int kMaxSample = 65535;
+ int min = kMaxSample;
+ int max = 0;
for (size_t i = 0; i < n; i++) {
- int sample = rand();
+ int sample = rand() % (kMaxSample + 1);
if (sample < min) min = sample;
if (sample > max) max = sample;
add_sample(&est, sample);
if (i >= 3) {
gpr_log(GPR_DEBUG, "est:%" PRId64 " min:%d max:%d", get_estimate(&est),
min, max);
- GPR_ASSERT(get_estimate(&est) <= 2 * next_pow_2(max));
+ GPR_ASSERT(get_estimate(&est) <= GPR_MAX(65536, 2 * next_pow_2(max)));
}
}
}
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
+ grpc_init();
test_noop();
test_get_estimate_no_samples();
test_get_estimate_1_sample();
@@ -149,5 +153,6 @@ int main(int argc, char **argv) {
for (size_t i = 3; i < 1000; i = i * 3 / 2) {
test_get_estimate_random_values(i);
}
+ grpc_shutdown();
return 0;
}
diff --git a/test/core/util/trickle_endpoint.c b/test/core/util/trickle_endpoint.c
index 58ac59711b..69386a0718 100644
--- a/test/core/util/trickle_endpoint.c
+++ b/test/core/util/trickle_endpoint.c
@@ -44,6 +44,8 @@
#include <grpc/support/useful.h>
#include "src/core/lib/slice/slice_internal.h"
+#define WRITE_BUFFER_SIZE (2 * 1024 * 1024)
+
typedef struct {
grpc_endpoint base;
double bytes_per_second;
@@ -55,6 +57,7 @@ typedef struct {
grpc_slice_buffer writing_buffer;
grpc_error *error;
bool writing;
+ grpc_closure *write_cb;
} trickle_endpoint;
static void te_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
@@ -63,10 +66,20 @@ static void te_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
grpc_endpoint_read(exec_ctx, te->wrapped, slices, cb);
}
+static void maybe_call_write_cb_locked(grpc_exec_ctx *exec_ctx,
+ trickle_endpoint *te) {
+ if (te->write_cb != NULL && (te->error != GRPC_ERROR_NONE ||
+ te->write_buffer.length <= WRITE_BUFFER_SIZE)) {
+ grpc_closure_sched(exec_ctx, te->write_cb, GRPC_ERROR_REF(te->error));
+ te->write_cb = NULL;
+ }
+}
+
static void te_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
grpc_slice_buffer *slices, grpc_closure *cb) {
trickle_endpoint *te = (trickle_endpoint *)ep;
gpr_mu_lock(&te->mu);
+ GPR_ASSERT(te->write_cb == NULL);
if (te->write_buffer.length == 0) {
te->last_write = gpr_now(GPR_CLOCK_MONOTONIC);
}
@@ -74,7 +87,8 @@ static void te_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
grpc_slice_buffer_add(&te->write_buffer,
grpc_slice_copy(slices->slices[i]));
}
- grpc_closure_sched(exec_ctx, cb, GRPC_ERROR_REF(te->error));
+ te->write_cb = cb;
+ maybe_call_write_cb_locked(exec_ctx, te);
gpr_mu_unlock(&te->mu);
}
@@ -102,6 +116,7 @@ static void te_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
if (te->error == GRPC_ERROR_NONE) {
te->error = GRPC_ERROR_REF(why);
}
+ maybe_call_write_cb_locked(exec_ctx, te);
gpr_mu_unlock(&te->mu);
grpc_endpoint_shutdown(exec_ctx, te->wrapped, why);
}
@@ -157,6 +172,7 @@ grpc_endpoint *grpc_trickle_endpoint_create(grpc_endpoint *wrap,
te->base.vtable = &vtable;
te->wrapped = wrap;
te->bytes_per_second = bytes_per_second;
+ te->write_cb = NULL;
gpr_mu_init(&te->mu);
grpc_slice_buffer_init(&te->write_buffer);
grpc_slice_buffer_init(&te->writing_buffer);
@@ -187,9 +203,18 @@ size_t grpc_trickle_endpoint_trickle(grpc_exec_ctx *exec_ctx,
grpc_endpoint_write(
exec_ctx, te->wrapped, &te->writing_buffer,
grpc_closure_create(te_finish_write, te, grpc_schedule_on_exec_ctx));
+ maybe_call_write_cb_locked(exec_ctx, te);
}
}
size_t backlog = te->write_buffer.length;
gpr_mu_unlock(&te->mu);
return backlog;
}
+
+size_t grpc_trickle_get_backlog(grpc_endpoint *ep) {
+ trickle_endpoint *te = (trickle_endpoint *)ep;
+ gpr_mu_lock(&te->mu);
+ size_t backlog = te->write_buffer.length;
+ gpr_mu_unlock(&te->mu);
+ return backlog;
+}
diff --git a/test/core/util/trickle_endpoint.h b/test/core/util/trickle_endpoint.h
index 7e8d9d91e3..e513774eb4 100644
--- a/test/core/util/trickle_endpoint.h
+++ b/test/core/util/trickle_endpoint.h
@@ -43,4 +43,6 @@ grpc_endpoint *grpc_trickle_endpoint_create(grpc_endpoint *wrap,
size_t grpc_trickle_endpoint_trickle(grpc_exec_ctx *exec_ctx,
grpc_endpoint *endpoint);
+size_t grpc_trickle_get_backlog(grpc_endpoint *endpoint);
+
#endif
diff --git a/test/cpp/codegen/compiler_test_golden b/test/cpp/codegen/compiler_test_golden
index 8e3ae32a49..eb12d371ea 100644
--- a/test/cpp/codegen/compiler_test_golden
+++ b/test/cpp/codegen/compiler_test_golden
@@ -69,6 +69,9 @@ namespace testing {
// ServiceA leading comment 1
class ServiceA final {
public:
+ static constexpr char const* service_full_name() {
+ return "grpc.testing.ServiceA";
+ }
class StubInterface {
public:
virtual ~StubInterface() {}
@@ -373,6 +376,9 @@ class ServiceA final {
// ServiceB leading comment 1
class ServiceB final {
public:
+ static constexpr char const* service_full_name() {
+ return "grpc.testing.ServiceB";
+ }
class StubInterface {
public:
virtual ~StubInterface() {}
diff --git a/test/cpp/microbenchmarks/BUILD b/test/cpp/microbenchmarks/BUILD
index cae3fa1a14..208ac6d794 100644
--- a/test/cpp/microbenchmarks/BUILD
+++ b/test/cpp/microbenchmarks/BUILD
@@ -92,7 +92,7 @@ cc_test(
cc_test(
name = "bm_fullstack_trickle",
srcs = ["bm_fullstack_trickle.cc"],
- deps = [":helpers"],
+ deps = [":helpers", "//external:gflags"],
)
cc_test(
diff --git a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
index a5cfeb4f95..6b9fa8b38d 100644
--- a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
+++ b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
@@ -34,6 +34,8 @@
/* Benchmark gRPC end2end in various configurations */
#include <benchmark/benchmark.h>
+#include <gflags/gflags.h>
+#include <fstream>
#include "src/core/lib/profiling/timers.h"
#include "src/cpp/client/create_channel_internal.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
@@ -45,16 +47,58 @@ extern "C" {
#include "test/core/util/trickle_endpoint.h"
}
+DEFINE_bool(log, false, "Log state to CSV files");
+DEFINE_int32(
+ warmup_megabytes, 1,
+ "Number of megabytes to pump before collecting flow control stats");
+DEFINE_int32(
+ warmup_iterations, 100,
+ "Number of iterations to run before collecting flow control stats");
+DEFINE_int32(warmup_max_time_seconds, 10,
+ "Maximum number of seconds to run warmup loop");
+
namespace grpc {
namespace testing {
static void* tag(intptr_t x) { return reinterpret_cast<void*>(x); }
+template <class A0>
+static void write_csv(std::ostream* out, A0&& a0) {
+ if (!out) return;
+ (*out) << a0 << "\n";
+}
+
+template <class A0, class... Arg>
+static void write_csv(std::ostream* out, A0&& a0, Arg&&... arg) {
+ if (!out) return;
+ (*out) << a0 << ",";
+ write_csv(out, std::forward<Arg>(arg)...);
+}
+
class TrickledCHTTP2 : public EndpointPairFixture {
public:
- TrickledCHTTP2(Service* service, size_t megabits_per_second)
- : EndpointPairFixture(service, MakeEndpoints(megabits_per_second),
- FixtureConfiguration()) {}
+ TrickledCHTTP2(Service* service, bool streaming, size_t req_size,
+ size_t resp_size, size_t kilobits_per_second)
+ : EndpointPairFixture(service, MakeEndpoints(kilobits_per_second),
+ FixtureConfiguration()) {
+ if (FLAGS_log) {
+ std::ostringstream fn;
+ fn << "trickle." << (streaming ? "streaming" : "unary") << "." << req_size
+ << "." << resp_size << "." << kilobits_per_second << ".csv";
+ log_.reset(new std::ofstream(fn.str().c_str()));
+ write_csv(log_.get(), "t", "iteration", "client_backlog",
+ "server_backlog", "client_t_stall", "client_s_stall",
+ "server_t_stall", "server_s_stall", "client_t_outgoing",
+ "server_t_outgoing", "client_t_incoming", "server_t_incoming",
+ "client_s_outgoing_delta", "server_s_outgoing_delta",
+ "client_s_incoming_delta", "server_s_incoming_delta",
+ "client_s_announce_window", "server_s_announce_window",
+ "client_peer_iws", "client_local_iws", "client_sent_iws",
+ "client_acked_iws", "server_peer_iws", "server_local_iws",
+ "server_sent_iws", "server_acked_iws", "client_queued_bytes",
+ "server_queued_bytes");
+ }
+ }
void AddToLabel(std::ostream& out, benchmark::State& state) {
out << " writes/iter:"
@@ -75,7 +119,58 @@ class TrickledCHTTP2 : public EndpointPairFixture {
(double)state.iterations());
}
- void Step() {
+ void Log(int64_t iteration) {
+ auto now = gpr_time_sub(gpr_now(GPR_CLOCK_MONOTONIC), start_);
+ grpc_chttp2_transport* client =
+ reinterpret_cast<grpc_chttp2_transport*>(client_transport_);
+ grpc_chttp2_transport* server =
+ reinterpret_cast<grpc_chttp2_transport*>(server_transport_);
+ grpc_chttp2_stream* client_stream =
+ client->stream_map.count == 1
+ ? static_cast<grpc_chttp2_stream*>(client->stream_map.values[0])
+ : nullptr;
+ grpc_chttp2_stream* server_stream =
+ server->stream_map.count == 1
+ ? static_cast<grpc_chttp2_stream*>(server->stream_map.values[0])
+ : nullptr;
+ write_csv(
+ log_.get(), static_cast<double>(now.tv_sec) +
+ 1e-9 * static_cast<double>(now.tv_nsec),
+ iteration, grpc_trickle_get_backlog(endpoint_pair_.client),
+ grpc_trickle_get_backlog(endpoint_pair_.server),
+ client->lists[GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT].head != nullptr,
+ client->lists[GRPC_CHTTP2_LIST_STALLED_BY_STREAM].head != nullptr,
+ server->lists[GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT].head != nullptr,
+ server->lists[GRPC_CHTTP2_LIST_STALLED_BY_STREAM].head != nullptr,
+ client->outgoing_window, server->outgoing_window,
+ client->incoming_window, server->incoming_window,
+ client_stream ? client_stream->outgoing_window_delta : -1,
+ server_stream ? server_stream->outgoing_window_delta : -1,
+ client_stream ? client_stream->incoming_window_delta : -1,
+ server_stream ? server_stream->incoming_window_delta : -1,
+ client_stream ? client_stream->announce_window : -1,
+ server_stream ? server_stream->announce_window : -1,
+ client->settings[GRPC_PEER_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE],
+ client->settings[GRPC_LOCAL_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE],
+ client->settings[GRPC_SENT_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE],
+ client->settings[GRPC_ACKED_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE],
+ server->settings[GRPC_PEER_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE],
+ server->settings[GRPC_LOCAL_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE],
+ server->settings[GRPC_SENT_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE],
+ server->settings[GRPC_ACKED_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE],
+ client_stream ? client_stream->flow_controlled_buffer.length : 0,
+ server_stream ? server_stream->flow_controlled_buffer.length : 0);
+ }
+
+ void Step(bool update_stats) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
size_t client_backlog =
grpc_trickle_endpoint_trickle(&exec_ctx, endpoint_pair_.client);
@@ -83,10 +178,12 @@ class TrickledCHTTP2 : public EndpointPairFixture {
grpc_trickle_endpoint_trickle(&exec_ctx, endpoint_pair_.server);
grpc_exec_ctx_finish(&exec_ctx);
- UpdateStats((grpc_chttp2_transport*)client_transport_, &client_stats_,
- client_backlog);
- UpdateStats((grpc_chttp2_transport*)server_transport_, &server_stats_,
- server_backlog);
+ if (update_stats) {
+ UpdateStats((grpc_chttp2_transport*)client_transport_, &client_stats_,
+ client_backlog);
+ UpdateStats((grpc_chttp2_transport*)server_transport_, &server_stats_,
+ server_backlog);
+ }
}
private:
@@ -97,6 +194,8 @@ class TrickledCHTTP2 : public EndpointPairFixture {
};
Stats client_stats_;
Stats server_stats_;
+ std::unique_ptr<std::ofstream> log_;
+ gpr_timespec start_ = gpr_now(GPR_CLOCK_MONOTONIC);
grpc_endpoint_pair MakeEndpoints(size_t kilobits) {
grpc_endpoint_pair p;
@@ -123,13 +222,15 @@ class TrickledCHTTP2 : public EndpointPairFixture {
// force library initialization
auto& force_library_initialization = Library::get();
-static void TrickleCQNext(TrickledCHTTP2* fixture, void** t, bool* ok) {
+static void TrickleCQNext(TrickledCHTTP2* fixture, void** t, bool* ok,
+ int64_t iteration) {
while (true) {
+ fixture->Log(iteration);
switch (fixture->cq()->AsyncNext(
t, ok, gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
gpr_time_from_micros(100, GPR_TIMESPAN)))) {
case CompletionQueue::TIMEOUT:
- fixture->Step();
+ fixture->Step(iteration != -1);
break;
case CompletionQueue::SHUTDOWN:
GPR_ASSERT(false);
@@ -142,8 +243,9 @@ static void TrickleCQNext(TrickledCHTTP2* fixture, void** t, bool* ok) {
static void BM_PumpStreamServerToClient_Trickle(benchmark::State& state) {
EchoTestService::AsyncService service;
- std::unique_ptr<TrickledCHTTP2> fixture(
- new TrickledCHTTP2(&service, state.range(1)));
+ std::unique_ptr<TrickledCHTTP2> fixture(new TrickledCHTTP2(
+ &service, true, state.range(0) /* req_size */,
+ state.range(0) /* resp_size */, state.range(1) /* bw in kbit/s */));
{
EchoResponse send_response;
EchoResponse recv_response;
@@ -163,18 +265,19 @@ static void BM_PumpStreamServerToClient_Trickle(benchmark::State& state) {
void* t;
bool ok;
while (need_tags) {
- TrickleCQNext(fixture.get(), &t, &ok);
+ TrickleCQNext(fixture.get(), &t, &ok, -1);
GPR_ASSERT(ok);
int i = (int)(intptr_t)t;
GPR_ASSERT(need_tags & (1 << i));
need_tags &= ~(1 << i);
}
request_rw->Read(&recv_response, tag(0));
- while (state.KeepRunning()) {
+ auto inner_loop = [&](bool in_warmup) {
GPR_TIMER_SCOPE("BenchmarkCycle", 0);
response_rw.Write(send_response, tag(1));
while (true) {
- TrickleCQNext(fixture.get(), &t, &ok);
+ TrickleCQNext(fixture.get(), &t, &ok,
+ in_warmup ? -1 : state.iterations());
if (t == tag(0)) {
request_rw->Read(&recv_response, tag(0));
} else if (t == tag(1)) {
@@ -183,11 +286,26 @@ static void BM_PumpStreamServerToClient_Trickle(benchmark::State& state) {
GPR_ASSERT(false);
}
}
+ };
+ gpr_timespec warmup_start = gpr_now(GPR_CLOCK_MONOTONIC);
+ for (int i = 0;
+ i < GPR_MAX(FLAGS_warmup_iterations, FLAGS_warmup_megabytes * 1024 *
+ 1024 / (14 + state.range(0)));
+ i++) {
+ inner_loop(true);
+ if (gpr_time_cmp(gpr_time_sub(gpr_now(GPR_CLOCK_MONOTONIC), warmup_start),
+ gpr_time_from_seconds(FLAGS_warmup_max_time_seconds,
+ GPR_TIMESPAN)) > 0) {
+ break;
+ }
+ }
+ while (state.KeepRunning()) {
+ inner_loop(false);
}
response_rw.Finish(Status::OK, tag(1));
need_tags = (1 << 0) | (1 << 1);
while (need_tags) {
- TrickleCQNext(fixture.get(), &t, &ok);
+ TrickleCQNext(fixture.get(), &t, &ok, -1);
int i = (int)(intptr_t)t;
GPR_ASSERT(need_tags & (1 << i));
need_tags &= ~(1 << i);
@@ -198,23 +316,126 @@ static void BM_PumpStreamServerToClient_Trickle(benchmark::State& state) {
state.SetBytesProcessed(state.range(0) * state.iterations());
}
-/*******************************************************************************
- * CONFIGURATIONS
- */
-
-static void TrickleArgs(benchmark::internal::Benchmark* b) {
+static void StreamingTrickleArgs(benchmark::internal::Benchmark* b) {
for (int i = 1; i <= 128 * 1024 * 1024; i *= 8) {
- for (int j = 1; j <= 128 * 1024 * 1024; j *= 8) {
+ for (int j = 64; j <= 128 * 1024 * 1024; j *= 8) {
double expected_time =
static_cast<double>(14 + i) / (125.0 * static_cast<double>(j));
- if (expected_time > 0.01) continue;
+ if (expected_time > 2.0) continue;
b->Args({i, j});
}
}
}
+BENCHMARK(BM_PumpStreamServerToClient_Trickle)->Apply(StreamingTrickleArgs);
+
+static void BM_PumpUnbalancedUnary_Trickle(benchmark::State& state) {
+ EchoTestService::AsyncService service;
+ std::unique_ptr<TrickledCHTTP2> fixture(new TrickledCHTTP2(
+ &service, true, state.range(0) /* req_size */,
+ state.range(1) /* resp_size */, state.range(2) /* bw in kbit/s */));
+ EchoRequest send_request;
+ EchoResponse send_response;
+ EchoResponse recv_response;
+ if (state.range(0) > 0) {
+ send_request.set_message(std::string(state.range(0), 'a'));
+ }
+ if (state.range(1) > 0) {
+ send_response.set_message(std::string(state.range(1), 'a'));
+ }
+ Status recv_status;
+ struct ServerEnv {
+ ServerContext ctx;
+ EchoRequest recv_request;
+ grpc::ServerAsyncResponseWriter<EchoResponse> response_writer;
+ ServerEnv() : response_writer(&ctx) {}
+ };
+ uint8_t server_env_buffer[2 * sizeof(ServerEnv)];
+ ServerEnv* server_env[2] = {
+ reinterpret_cast<ServerEnv*>(server_env_buffer),
+ reinterpret_cast<ServerEnv*>(server_env_buffer + sizeof(ServerEnv))};
+ new (server_env[0]) ServerEnv;
+ new (server_env[1]) ServerEnv;
+ service.RequestEcho(&server_env[0]->ctx, &server_env[0]->recv_request,
+ &server_env[0]->response_writer, fixture->cq(),
+ fixture->cq(), tag(0));
+ service.RequestEcho(&server_env[1]->ctx, &server_env[1]->recv_request,
+ &server_env[1]->response_writer, fixture->cq(),
+ fixture->cq(), tag(1));
+ std::unique_ptr<EchoTestService::Stub> stub(
+ EchoTestService::NewStub(fixture->channel()));
+ auto inner_loop = [&](bool in_warmup) {
+ GPR_TIMER_SCOPE("BenchmarkCycle", 0);
+ recv_response.Clear();
+ ClientContext cli_ctx;
+ std::unique_ptr<ClientAsyncResponseReader<EchoResponse>> response_reader(
+ stub->AsyncEcho(&cli_ctx, send_request, fixture->cq()));
+ void* t;
+ bool ok;
+ TrickleCQNext(fixture.get(), &t, &ok, state.iterations());
+ GPR_ASSERT(ok);
+ GPR_ASSERT(t == tag(0) || t == tag(1));
+ intptr_t slot = reinterpret_cast<intptr_t>(t);
+ ServerEnv* senv = server_env[slot];
+ senv->response_writer.Finish(send_response, Status::OK, tag(3));
+ response_reader->Finish(&recv_response, &recv_status, tag(4));
+ for (int i = (1 << 3) | (1 << 4); i != 0;) {
+ TrickleCQNext(fixture.get(), &t, &ok, state.iterations());
+ GPR_ASSERT(ok);
+ int tagnum = (int)reinterpret_cast<intptr_t>(t);
+ GPR_ASSERT(i & (1 << tagnum));
+ i -= 1 << tagnum;
+ }
+ GPR_ASSERT(recv_status.ok());
+
+ senv->~ServerEnv();
+ senv = new (senv) ServerEnv();
+ service.RequestEcho(&senv->ctx, &senv->recv_request, &senv->response_writer,
+ fixture->cq(), fixture->cq(), tag(slot));
+ };
+ gpr_timespec warmup_start = gpr_now(GPR_CLOCK_MONOTONIC);
+ for (int i = 0;
+ i < GPR_MAX(FLAGS_warmup_iterations, FLAGS_warmup_megabytes * 1024 *
+ 1024 / (14 + state.range(0)));
+ i++) {
+ inner_loop(true);
+ if (gpr_time_cmp(gpr_time_sub(gpr_now(GPR_CLOCK_MONOTONIC), warmup_start),
+ gpr_time_from_seconds(FLAGS_warmup_max_time_seconds,
+ GPR_TIMESPAN)) > 0) {
+ break;
+ }
+ }
+ while (state.KeepRunning()) {
+ inner_loop(false);
+ }
+ fixture->Finish(state);
+ fixture.reset();
+ server_env[0]->~ServerEnv();
+ server_env[1]->~ServerEnv();
+ state.SetBytesProcessed(state.range(0) * state.iterations() +
+ state.range(1) * state.iterations());
+}
-BENCHMARK(BM_PumpStreamServerToClient_Trickle)->Apply(TrickleArgs);
+static void UnaryTrickleArgs(benchmark::internal::Benchmark* b) {
+ const int cli_1024k = 1024 * 1024;
+ const int cli_32M = 32 * 1024 * 1024;
+ const int svr_256k = 256 * 1024;
+ const int svr_4M = 4 * 1024 * 1024;
+ const int svr_64M = 64 * 1024 * 1024;
+ for (int bw = 64; bw <= 128 * 1024 * 1024; bw *= 16) {
+ b->Args({bw, cli_1024k, svr_256k});
+ b->Args({bw, cli_1024k, svr_4M});
+ b->Args({bw, cli_1024k, svr_64M});
+ b->Args({bw, cli_32M, svr_256k});
+ b->Args({bw, cli_32M, svr_4M});
+ b->Args({bw, cli_32M, svr_64M});
+ }
+}
+BENCHMARK(BM_PumpUnbalancedUnary_Trickle)->Apply(UnaryTrickleArgs);
}
}
-BENCHMARK_MAIN();
+int main(int argc, char** argv) {
+ ::benchmark::Initialize(&argc, argv);
+ ::google::ParseCommandLineFlags(&argc, &argv, false);
+ ::benchmark::RunSpecifiedBenchmarks();
+}
diff --git a/test/cpp/performance/writes_per_rpc_test.cc b/test/cpp/performance/writes_per_rpc_test.cc
index 7a914c1547..12d8268330 100644
--- a/test/cpp/performance/writes_per_rpc_test.cc
+++ b/test/cpp/performance/writes_per_rpc_test.cc
@@ -254,8 +254,8 @@ TEST(WritesPerRpcTest, UnaryPingPong) {
EXPECT_LT(UnaryPingPong(0, 0), 2.05);
EXPECT_LT(UnaryPingPong(1, 0), 2.05);
EXPECT_LT(UnaryPingPong(0, 1), 2.05);
- EXPECT_LT(UnaryPingPong(4096, 0), 2.2);
- EXPECT_LT(UnaryPingPong(0, 4096), 2.2);
+ EXPECT_LT(UnaryPingPong(4096, 0), 2.5);
+ EXPECT_LT(UnaryPingPong(0, 4096), 2.5);
}
} // namespace testing
diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h
index 25a19a5a74..c3197eb622 100644
--- a/test/cpp/qps/client.h
+++ b/test/cpp/qps/client.h
@@ -443,11 +443,8 @@ class ClientImpl : public Client {
create_stub_;
};
-std::unique_ptr<Client> CreateSynchronousUnaryClient(const ClientConfig& args);
-std::unique_ptr<Client> CreateSynchronousStreamingClient(
- const ClientConfig& args);
-std::unique_ptr<Client> CreateAsyncUnaryClient(const ClientConfig& args);
-std::unique_ptr<Client> CreateAsyncStreamingClient(const ClientConfig& args);
+std::unique_ptr<Client> CreateSynchronousClient(const ClientConfig& args);
+std::unique_ptr<Client> CreateAsyncClient(const ClientConfig& args);
std::unique_ptr<Client> CreateGenericAsyncStreamingClient(
const ClientConfig& args);
diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc
index 29a79e7343..01856f714a 100644
--- a/test/cpp/qps/client_async.cc
+++ b/test/cpp/qps/client_async.cc
@@ -313,9 +313,9 @@ class AsyncUnaryClient final
};
template <class RequestType, class ResponseType>
-class ClientRpcContextStreamingImpl : public ClientRpcContext {
+class ClientRpcContextStreamingPingPongImpl : public ClientRpcContext {
public:
- ClientRpcContextStreamingImpl(
+ ClientRpcContextStreamingPingPongImpl(
BenchmarkService::Stub* stub, const RequestType& req,
std::function<gpr_timespec()> next_issue,
std::function<std::unique_ptr<
@@ -333,7 +333,7 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext {
callback_(on_done),
next_issue_(next_issue),
start_req_(start_req) {}
- ~ClientRpcContextStreamingImpl() override {}
+ ~ClientRpcContextStreamingPingPongImpl() override {}
void Start(CompletionQueue* cq, const ClientConfig& config) override {
StartInternal(cq, config.messages_per_stream());
}
@@ -394,8 +394,8 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext {
}
}
void StartNewClone(CompletionQueue* cq) override {
- auto* clone = new ClientRpcContextStreamingImpl(stub_, req_, next_issue_,
- start_req_, callback_);
+ auto* clone = new ClientRpcContextStreamingPingPongImpl(
+ stub_, req_, next_issue_, start_req_, callback_);
clone->StartInternal(cq, messages_per_stream_);
}
@@ -434,23 +434,23 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext {
void StartInternal(CompletionQueue* cq, int messages_per_stream) {
cq_ = cq;
- next_state_ = State::STREAM_IDLE;
- stream_ = start_req_(stub_, &context_, cq, ClientRpcContext::tag(this));
messages_per_stream_ = messages_per_stream;
messages_issued_ = 0;
+ next_state_ = State::STREAM_IDLE;
+ stream_ = start_req_(stub_, &context_, cq, ClientRpcContext::tag(this));
}
};
-class AsyncStreamingClient final
+class AsyncStreamingPingPongClient final
: public AsyncClient<BenchmarkService::Stub, SimpleRequest> {
public:
- explicit AsyncStreamingClient(const ClientConfig& config)
+ explicit AsyncStreamingPingPongClient(const ClientConfig& config)
: AsyncClient<BenchmarkService::Stub, SimpleRequest>(
config, SetupCtx, BenchmarkStubCreator) {
StartThreads(num_async_threads_);
}
- ~AsyncStreamingClient() override {}
+ ~AsyncStreamingPingPongClient() override {}
private:
static void CheckDone(grpc::Status s, SimpleResponse* response) {}
@@ -464,9 +464,250 @@ class AsyncStreamingClient final
static ClientRpcContext* SetupCtx(BenchmarkService::Stub* stub,
std::function<gpr_timespec()> next_issue,
const SimpleRequest& req) {
- return new ClientRpcContextStreamingImpl<SimpleRequest, SimpleResponse>(
- stub, req, next_issue, AsyncStreamingClient::StartReq,
- AsyncStreamingClient::CheckDone);
+ return new ClientRpcContextStreamingPingPongImpl<SimpleRequest,
+ SimpleResponse>(
+ stub, req, next_issue, AsyncStreamingPingPongClient::StartReq,
+ AsyncStreamingPingPongClient::CheckDone);
+ }
+};
+
+template <class RequestType, class ResponseType>
+class ClientRpcContextStreamingFromClientImpl : public ClientRpcContext {
+ public:
+ ClientRpcContextStreamingFromClientImpl(
+ BenchmarkService::Stub* stub, const RequestType& req,
+ std::function<gpr_timespec()> next_issue,
+ std::function<std::unique_ptr<grpc::ClientAsyncWriter<RequestType>>(
+ BenchmarkService::Stub*, grpc::ClientContext*, ResponseType*,
+ CompletionQueue*, void*)>
+ start_req,
+ std::function<void(grpc::Status, ResponseType*)> on_done)
+ : context_(),
+ stub_(stub),
+ cq_(nullptr),
+ req_(req),
+ response_(),
+ next_state_(State::INVALID),
+ callback_(on_done),
+ next_issue_(next_issue),
+ start_req_(start_req) {}
+ ~ClientRpcContextStreamingFromClientImpl() override {}
+ void Start(CompletionQueue* cq, const ClientConfig& config) override {
+ StartInternal(cq);
+ }
+ bool RunNextState(bool ok, HistogramEntry* entry) override {
+ while (true) {
+ switch (next_state_) {
+ case State::STREAM_IDLE:
+ if (!next_issue_) { // ready to issue
+ next_state_ = State::READY_TO_WRITE;
+ } else {
+ next_state_ = State::WAIT;
+ }
+ break; // loop around, don't return
+ case State::WAIT:
+ alarm_.reset(
+ new Alarm(cq_, next_issue_(), ClientRpcContext::tag(this)));
+ next_state_ = State::READY_TO_WRITE;
+ return true;
+ case State::READY_TO_WRITE:
+ if (!ok) {
+ return false;
+ }
+ start_ = UsageTimer::Now();
+ next_state_ = State::WRITE_DONE;
+ stream_->Write(req_, ClientRpcContext::tag(this));
+ return true;
+ case State::WRITE_DONE:
+ if (!ok) {
+ return false;
+ }
+ entry->set_value((UsageTimer::Now() - start_) * 1e9);
+ next_state_ = State::STREAM_IDLE;
+ break; // loop around
+ default:
+ GPR_ASSERT(false);
+ return false;
+ }
+ }
+ }
+ void StartNewClone(CompletionQueue* cq) override {
+ auto* clone = new ClientRpcContextStreamingFromClientImpl(
+ stub_, req_, next_issue_, start_req_, callback_);
+ clone->StartInternal(cq);
+ }
+
+ private:
+ grpc::ClientContext context_;
+ BenchmarkService::Stub* stub_;
+ CompletionQueue* cq_;
+ std::unique_ptr<Alarm> alarm_;
+ RequestType req_;
+ ResponseType response_;
+ enum State {
+ INVALID,
+ STREAM_IDLE,
+ WAIT,
+ READY_TO_WRITE,
+ WRITE_DONE,
+ };
+ State next_state_;
+ std::function<void(grpc::Status, ResponseType*)> callback_;
+ std::function<gpr_timespec()> next_issue_;
+ std::function<std::unique_ptr<grpc::ClientAsyncWriter<RequestType>>(
+ BenchmarkService::Stub*, grpc::ClientContext*, ResponseType*,
+ CompletionQueue*, void*)>
+ start_req_;
+ grpc::Status status_;
+ double start_;
+ std::unique_ptr<grpc::ClientAsyncWriter<RequestType>> stream_;
+
+ void StartInternal(CompletionQueue* cq) {
+ cq_ = cq;
+ stream_ = start_req_(stub_, &context_, &response_, cq,
+ ClientRpcContext::tag(this));
+ next_state_ = State::STREAM_IDLE;
+ }
+};
+
+class AsyncStreamingFromClientClient final
+ : public AsyncClient<BenchmarkService::Stub, SimpleRequest> {
+ public:
+ explicit AsyncStreamingFromClientClient(const ClientConfig& config)
+ : AsyncClient<BenchmarkService::Stub, SimpleRequest>(
+ config, SetupCtx, BenchmarkStubCreator) {
+ StartThreads(num_async_threads_);
+ }
+
+ ~AsyncStreamingFromClientClient() override {}
+
+ private:
+ static void CheckDone(grpc::Status s, SimpleResponse* response) {}
+ static std::unique_ptr<grpc::ClientAsyncWriter<SimpleRequest>> StartReq(
+ BenchmarkService::Stub* stub, grpc::ClientContext* ctx,
+ SimpleResponse* resp, CompletionQueue* cq, void* tag) {
+ auto stream = stub->AsyncStreamingFromClient(ctx, resp, cq, tag);
+ return stream;
+ };
+ static ClientRpcContext* SetupCtx(BenchmarkService::Stub* stub,
+ std::function<gpr_timespec()> next_issue,
+ const SimpleRequest& req) {
+ return new ClientRpcContextStreamingFromClientImpl<SimpleRequest,
+ SimpleResponse>(
+ stub, req, next_issue, AsyncStreamingFromClientClient::StartReq,
+ AsyncStreamingFromClientClient::CheckDone);
+ }
+};
+
+template <class RequestType, class ResponseType>
+class ClientRpcContextStreamingFromServerImpl : public ClientRpcContext {
+ public:
+ ClientRpcContextStreamingFromServerImpl(
+ BenchmarkService::Stub* stub, const RequestType& req,
+ std::function<gpr_timespec()> next_issue,
+ std::function<std::unique_ptr<grpc::ClientAsyncReader<ResponseType>>(
+ BenchmarkService::Stub*, grpc::ClientContext*, const RequestType&,
+ CompletionQueue*, void*)>
+ start_req,
+ std::function<void(grpc::Status, ResponseType*)> on_done)
+ : context_(),
+ stub_(stub),
+ cq_(nullptr),
+ req_(req),
+ response_(),
+ next_state_(State::INVALID),
+ callback_(on_done),
+ next_issue_(next_issue),
+ start_req_(start_req) {}
+ ~ClientRpcContextStreamingFromServerImpl() override {}
+ void Start(CompletionQueue* cq, const ClientConfig& config) override {
+ StartInternal(cq);
+ }
+ bool RunNextState(bool ok, HistogramEntry* entry) override {
+ while (true) {
+ switch (next_state_) {
+ case State::STREAM_IDLE:
+ if (!ok) {
+ return false;
+ }
+ start_ = UsageTimer::Now();
+ next_state_ = State::READ_DONE;
+ stream_->Read(&response_, ClientRpcContext::tag(this));
+ return true;
+ case State::READ_DONE:
+ if (!ok) {
+ return false;
+ }
+ entry->set_value((UsageTimer::Now() - start_) * 1e9);
+ callback_(status_, &response_);
+ next_state_ = State::STREAM_IDLE;
+ break; // loop around
+ default:
+ GPR_ASSERT(false);
+ return false;
+ }
+ }
+ }
+ void StartNewClone(CompletionQueue* cq) override {
+ auto* clone = new ClientRpcContextStreamingFromServerImpl(
+ stub_, req_, next_issue_, start_req_, callback_);
+ clone->StartInternal(cq);
+ }
+
+ private:
+ grpc::ClientContext context_;
+ BenchmarkService::Stub* stub_;
+ CompletionQueue* cq_;
+ std::unique_ptr<Alarm> alarm_;
+ RequestType req_;
+ ResponseType response_;
+ enum State { INVALID, STREAM_IDLE, READ_DONE };
+ State next_state_;
+ std::function<void(grpc::Status, ResponseType*)> callback_;
+ std::function<gpr_timespec()> next_issue_;
+ std::function<std::unique_ptr<grpc::ClientAsyncReader<ResponseType>>(
+ BenchmarkService::Stub*, grpc::ClientContext*, const RequestType&,
+ CompletionQueue*, void*)>
+ start_req_;
+ grpc::Status status_;
+ double start_;
+ std::unique_ptr<grpc::ClientAsyncReader<ResponseType>> stream_;
+
+ void StartInternal(CompletionQueue* cq) {
+ // TODO(vjpai): Add support to rate-pace this
+ cq_ = cq;
+ next_state_ = State::STREAM_IDLE;
+ stream_ =
+ start_req_(stub_, &context_, req_, cq, ClientRpcContext::tag(this));
+ }
+};
+
+class AsyncStreamingFromServerClient final
+ : public AsyncClient<BenchmarkService::Stub, SimpleRequest> {
+ public:
+ explicit AsyncStreamingFromServerClient(const ClientConfig& config)
+ : AsyncClient<BenchmarkService::Stub, SimpleRequest>(
+ config, SetupCtx, BenchmarkStubCreator) {
+ StartThreads(num_async_threads_);
+ }
+
+ ~AsyncStreamingFromServerClient() override {}
+
+ private:
+ static void CheckDone(grpc::Status s, SimpleResponse* response) {}
+ static std::unique_ptr<grpc::ClientAsyncReader<SimpleResponse>> StartReq(
+ BenchmarkService::Stub* stub, grpc::ClientContext* ctx,
+ const SimpleRequest& req, CompletionQueue* cq, void* tag) {
+ auto stream = stub->AsyncStreamingFromServer(ctx, req, cq, tag);
+ return stream;
+ };
+ static ClientRpcContext* SetupCtx(BenchmarkService::Stub* stub,
+ std::function<gpr_timespec()> next_issue,
+ const SimpleRequest& req) {
+ return new ClientRpcContextStreamingFromServerImpl<SimpleRequest,
+ SimpleResponse>(
+ stub, req, next_issue, AsyncStreamingFromServerClient::StartReq,
+ AsyncStreamingFromServerClient::CheckDone);
}
};
@@ -591,11 +832,11 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext {
cq_ = cq;
const grpc::string kMethodName(
"/grpc.testing.BenchmarkService/StreamingCall");
+ messages_per_stream_ = messages_per_stream;
+ messages_issued_ = 0;
next_state_ = State::STREAM_IDLE;
stream_ = start_req_(stub_, &context_, kMethodName, cq,
ClientRpcContext::tag(this));
- messages_per_stream_ = messages_per_stream;
- messages_issued_ = 0;
}
};
@@ -632,11 +873,26 @@ class GenericAsyncStreamingClient final
}
};
-std::unique_ptr<Client> CreateAsyncUnaryClient(const ClientConfig& args) {
- return std::unique_ptr<Client>(new AsyncUnaryClient(args));
-}
-std::unique_ptr<Client> CreateAsyncStreamingClient(const ClientConfig& args) {
- return std::unique_ptr<Client>(new AsyncStreamingClient(args));
+std::unique_ptr<Client> CreateAsyncClient(const ClientConfig& config) {
+ switch (config.rpc_type()) {
+ case UNARY:
+ return std::unique_ptr<Client>(new AsyncUnaryClient(config));
+ case STREAMING:
+ return std::unique_ptr<Client>(new AsyncStreamingPingPongClient(config));
+ case STREAMING_FROM_CLIENT:
+ return std::unique_ptr<Client>(
+ new AsyncStreamingFromClientClient(config));
+ case STREAMING_FROM_SERVER:
+ return std::unique_ptr<Client>(
+ new AsyncStreamingFromServerClient(config));
+ case STREAMING_BOTH_WAYS:
+ // TODO(vjpai): Implement this
+ assert(false);
+ return nullptr;
+ default:
+ assert(false);
+ return nullptr;
+ }
}
std::unique_ptr<Client> CreateGenericAsyncStreamingClient(
const ClientConfig& args) {
diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc
index f8ce2cccbe..9075033bd4 100644
--- a/test/cpp/qps/client_sync.cc
+++ b/test/cpp/qps/client_sync.cc
@@ -137,7 +137,8 @@ class SynchronousUnaryClient final : public SynchronousClient {
}
};
-class SynchronousStreamingClient final : public SynchronousClient {
+template <class StreamType>
+class SynchronousStreamingClient : public SynchronousClient {
public:
SynchronousStreamingClient(const ClientConfig& config)
: SynchronousClient(config),
@@ -145,30 +146,69 @@ class SynchronousStreamingClient final : public SynchronousClient {
stream_(num_threads_),
messages_per_stream_(config.messages_per_stream()),
messages_issued_(num_threads_) {
+ StartThreads(num_threads_);
+ }
+ virtual ~SynchronousStreamingClient() {
+ std::vector<std::thread> cleanup_threads;
+ for (size_t i = 0; i < num_threads_; i++) {
+ cleanup_threads.emplace_back([this, i]() {
+ auto stream = &stream_[i];
+ if (*stream) {
+ // forcibly cancel the streams, then finish
+ context_[i].TryCancel();
+ (*stream)->Finish();
+ // don't log any error message on !ok since this was canceled
+ }
+ });
+ }
+ for (auto& th : cleanup_threads) {
+ th.join();
+ }
+ }
+
+ protected:
+ std::vector<grpc::ClientContext> context_;
+ std::vector<std::unique_ptr<StreamType>> stream_;
+ const int messages_per_stream_;
+ std::vector<int> messages_issued_;
+
+ void FinishStream(HistogramEntry* entry, size_t thread_idx) {
+ Status s = stream_[thread_idx]->Finish();
+ // don't set the value since the stream is failed and shouldn't be timed
+ entry->set_status(s.error_code());
+ if (!s.ok()) {
+ gpr_log(GPR_ERROR, "Stream %" PRIuPTR " received an error %s", thread_idx,
+ s.error_message().c_str());
+ }
+ context_[thread_idx].~ClientContext();
+ new (&context_[thread_idx]) ClientContext();
+ }
+};
+
+class SynchronousStreamingPingPongClient final
+ : public SynchronousStreamingClient<
+ grpc::ClientReaderWriter<SimpleRequest, SimpleResponse>> {
+ public:
+ SynchronousStreamingPingPongClient(const ClientConfig& config)
+ : SynchronousStreamingClient(config) {
for (size_t thread_idx = 0; thread_idx < num_threads_; thread_idx++) {
auto* stub = channels_[thread_idx % channels_.size()].get_stub();
stream_[thread_idx] = stub->StreamingCall(&context_[thread_idx]);
messages_issued_[thread_idx] = 0;
}
- StartThreads(num_threads_);
}
- ~SynchronousStreamingClient() {
+ ~SynchronousStreamingPingPongClient() {
std::vector<std::thread> cleanup_threads;
for (size_t i = 0; i < num_threads_; i++) {
cleanup_threads.emplace_back([this, i]() {
auto stream = &stream_[i];
if (*stream) {
(*stream)->WritesDone();
- Status s = (*stream)->Finish();
- if (!s.ok()) {
- gpr_log(GPR_ERROR, "Stream %" PRIuPTR " received an error %s", i,
- s.error_message().c_str());
- }
}
});
}
- for (size_t i = 0; i < num_threads_; i++) {
- cleanup_threads[i].join();
+ for (auto& th : cleanup_threads) {
+ th.join();
}
}
@@ -176,7 +216,7 @@ class SynchronousStreamingClient final : public SynchronousClient {
if (!WaitToIssue(thread_idx)) {
return true;
}
- GPR_TIMER_SCOPE("SynchronousStreamingClient::ThreadFunc", 0);
+ GPR_TIMER_SCOPE("SynchronousStreamingPingPongClient::ThreadFunc", 0);
double start = UsageTimer::Now();
if (stream_[thread_idx]->Write(request_) &&
stream_[thread_idx]->Read(&responses_[thread_idx])) {
@@ -192,40 +232,148 @@ class SynchronousStreamingClient final : public SynchronousClient {
}
}
stream_[thread_idx]->WritesDone();
- Status s = stream_[thread_idx]->Finish();
- // don't set the value since this is either a failure (shouldn't be timed)
- // or a stream-end (already has been timed)
- entry->set_status(s.error_code());
- if (!s.ok()) {
- gpr_log(GPR_ERROR, "Stream %" PRIuPTR " received an error %s", thread_idx,
- s.error_message().c_str());
- }
+ FinishStream(entry, thread_idx);
auto* stub = channels_[thread_idx % channels_.size()].get_stub();
- context_[thread_idx].~ClientContext();
- new (&context_[thread_idx]) ClientContext();
stream_[thread_idx] = stub->StreamingCall(&context_[thread_idx]);
messages_issued_[thread_idx] = 0;
return true;
}
+};
+
+class SynchronousStreamingFromClientClient final
+ : public SynchronousStreamingClient<grpc::ClientWriter<SimpleRequest>> {
+ public:
+ SynchronousStreamingFromClientClient(const ClientConfig& config)
+ : SynchronousStreamingClient(config), last_issue_(num_threads_) {
+ for (size_t thread_idx = 0; thread_idx < num_threads_; thread_idx++) {
+ auto* stub = channels_[thread_idx % channels_.size()].get_stub();
+ stream_[thread_idx] = stub->StreamingFromClient(&context_[thread_idx],
+ &responses_[thread_idx]);
+ last_issue_[thread_idx] = UsageTimer::Now();
+ }
+ }
+ ~SynchronousStreamingFromClientClient() {
+ std::vector<std::thread> cleanup_threads;
+ for (size_t i = 0; i < num_threads_; i++) {
+ cleanup_threads.emplace_back([this, i]() {
+ auto stream = &stream_[i];
+ if (*stream) {
+ (*stream)->WritesDone();
+ }
+ });
+ }
+ for (auto& th : cleanup_threads) {
+ th.join();
+ }
+ }
+
+ bool ThreadFunc(HistogramEntry* entry, size_t thread_idx) override {
+ // Figure out how to make histogram sensible if this is rate-paced
+ if (!WaitToIssue(thread_idx)) {
+ return true;
+ }
+ GPR_TIMER_SCOPE("SynchronousStreamingFromClientClient::ThreadFunc", 0);
+ if (stream_[thread_idx]->Write(request_)) {
+ double now = UsageTimer::Now();
+ entry->set_value((now - last_issue_[thread_idx]) * 1e9);
+ last_issue_[thread_idx] = now;
+ return true;
+ }
+ stream_[thread_idx]->WritesDone();
+ FinishStream(entry, thread_idx);
+ auto* stub = channels_[thread_idx % channels_.size()].get_stub();
+ stream_[thread_idx] = stub->StreamingFromClient(&context_[thread_idx],
+ &responses_[thread_idx]);
+ return true;
+ }
private:
- // These are both conceptually std::vector but cannot be for old compilers
- // that expect contained classes to support copy constructors
- std::vector<grpc::ClientContext> context_;
- std::vector<
- std::unique_ptr<grpc::ClientReaderWriter<SimpleRequest, SimpleResponse>>>
- stream_;
- const int messages_per_stream_;
- std::vector<int> messages_issued_;
+ std::vector<double> last_issue_;
};
-std::unique_ptr<Client> CreateSynchronousUnaryClient(
- const ClientConfig& config) {
- return std::unique_ptr<Client>(new SynchronousUnaryClient(config));
-}
-std::unique_ptr<Client> CreateSynchronousStreamingClient(
- const ClientConfig& config) {
- return std::unique_ptr<Client>(new SynchronousStreamingClient(config));
+class SynchronousStreamingFromServerClient final
+ : public SynchronousStreamingClient<grpc::ClientReader<SimpleResponse>> {
+ public:
+ SynchronousStreamingFromServerClient(const ClientConfig& config)
+ : SynchronousStreamingClient(config), last_recv_(num_threads_) {
+ for (size_t thread_idx = 0; thread_idx < num_threads_; thread_idx++) {
+ auto* stub = channels_[thread_idx % channels_.size()].get_stub();
+ stream_[thread_idx] =
+ stub->StreamingFromServer(&context_[thread_idx], request_);
+ last_recv_[thread_idx] = UsageTimer::Now();
+ }
+ }
+ bool ThreadFunc(HistogramEntry* entry, size_t thread_idx) override {
+ GPR_TIMER_SCOPE("SynchronousStreamingFromServerClient::ThreadFunc", 0);
+ if (stream_[thread_idx]->Read(&responses_[thread_idx])) {
+ double now = UsageTimer::Now();
+ entry->set_value((now - last_recv_[thread_idx]) * 1e9);
+ last_recv_[thread_idx] = now;
+ return true;
+ }
+ FinishStream(entry, thread_idx);
+ auto* stub = channels_[thread_idx % channels_.size()].get_stub();
+ stream_[thread_idx] =
+ stub->StreamingFromServer(&context_[thread_idx], request_);
+ return true;
+ }
+
+ private:
+ std::vector<double> last_recv_;
+};
+
+class SynchronousStreamingBothWaysClient final
+ : public SynchronousStreamingClient<
+ grpc::ClientReaderWriter<SimpleRequest, SimpleResponse>> {
+ public:
+ SynchronousStreamingBothWaysClient(const ClientConfig& config)
+ : SynchronousStreamingClient(config) {
+ for (size_t thread_idx = 0; thread_idx < num_threads_; thread_idx++) {
+ auto* stub = channels_[thread_idx % channels_.size()].get_stub();
+ stream_[thread_idx] = stub->StreamingBothWays(&context_[thread_idx]);
+ }
+ }
+ ~SynchronousStreamingBothWaysClient() {
+ std::vector<std::thread> cleanup_threads;
+ for (size_t i = 0; i < num_threads_; i++) {
+ cleanup_threads.emplace_back([this, i]() {
+ auto stream = &stream_[i];
+ if (*stream) {
+ (*stream)->WritesDone();
+ }
+ });
+ }
+ for (auto& th : cleanup_threads) {
+ th.join();
+ }
+ }
+
+ bool ThreadFunc(HistogramEntry* entry, size_t thread_idx) override {
+ // TODO (vjpai): Do this
+ return true;
+ }
+};
+
+std::unique_ptr<Client> CreateSynchronousClient(const ClientConfig& config) {
+ switch (config.rpc_type()) {
+ case UNARY:
+ return std::unique_ptr<Client>(new SynchronousUnaryClient(config));
+ case STREAMING:
+ return std::unique_ptr<Client>(
+ new SynchronousStreamingPingPongClient(config));
+ case STREAMING_FROM_CLIENT:
+ return std::unique_ptr<Client>(
+ new SynchronousStreamingFromClientClient(config));
+ case STREAMING_FROM_SERVER:
+ return std::unique_ptr<Client>(
+ new SynchronousStreamingFromServerClient(config));
+ case STREAMING_BOTH_WAYS:
+ return std::unique_ptr<Client>(
+ new SynchronousStreamingBothWaysClient(config));
+ default:
+ assert(false);
+ return nullptr;
+ }
}
} // namespace testing
diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc
index d437920e68..92408974bd 100644
--- a/test/cpp/qps/qps_worker.cc
+++ b/test/cpp/qps/qps_worker.cc
@@ -68,15 +68,11 @@ static std::unique_ptr<Client> CreateClient(const ClientConfig& config) {
switch (config.client_type()) {
case ClientType::SYNC_CLIENT:
- return (config.rpc_type() == RpcType::UNARY)
- ? CreateSynchronousUnaryClient(config)
- : CreateSynchronousStreamingClient(config);
+ return CreateSynchronousClient(config);
case ClientType::ASYNC_CLIENT:
- return (config.rpc_type() == RpcType::UNARY)
- ? CreateAsyncUnaryClient(config)
- : (config.payload_config().has_bytebuf_params()
- ? CreateGenericAsyncStreamingClient(config)
- : CreateAsyncStreamingClient(config));
+ return config.payload_config().has_bytebuf_params()
+ ? CreateGenericAsyncStreamingClient(config)
+ : CreateAsyncClient(config);
default:
abort();
}
diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc
index b499b82091..84f1579c2f 100644
--- a/test/cpp/qps/server_async.cc
+++ b/test/cpp/qps/server_async.cc
@@ -71,6 +71,18 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
ServerAsyncReaderWriter<ResponseType, RequestType> *,
CompletionQueue *, ServerCompletionQueue *, void *)>
request_streaming_function,
+ std::function<void(ServiceType *, ServerContextType *,
+ ServerAsyncReader<ResponseType, RequestType> *,
+ CompletionQueue *, ServerCompletionQueue *, void *)>
+ request_streaming_from_client_function,
+ std::function<void(ServiceType *, ServerContextType *, RequestType *,
+ ServerAsyncWriter<ResponseType> *, CompletionQueue *,
+ ServerCompletionQueue *, void *)>
+ request_streaming_from_server_function,
+ std::function<void(ServiceType *, ServerContextType *,
+ ServerAsyncReaderWriter<ResponseType, RequestType> *,
+ CompletionQueue *, ServerCompletionQueue *, void *)>
+ request_streaming_both_ways_function,
std::function<grpc::Status(const PayloadConfig &, const RequestType *,
ResponseType *)>
process_rpc)
@@ -107,7 +119,7 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
std::bind(process_rpc, config.payload_config(), std::placeholders::_1,
std::placeholders::_2);
- for (int i = 0; i < 15000; i++) {
+ for (int i = 0; i < 5000; i++) {
for (int j = 0; j < num_threads; j++) {
if (request_unary_function) {
auto request_unary = std::bind(
@@ -125,6 +137,26 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
contexts_.emplace_back(new ServerRpcContextStreamingImpl(
request_streaming, process_rpc_bound));
}
+ if (request_streaming_from_client_function) {
+ auto request_streaming_from_client = std::bind(
+ request_streaming_from_client_function, &async_service_,
+ std::placeholders::_1, std::placeholders::_2, srv_cqs_[j].get(),
+ srv_cqs_[j].get(), std::placeholders::_3);
+ contexts_.emplace_back(new ServerRpcContextStreamingFromClientImpl(
+ request_streaming_from_client, process_rpc_bound));
+ }
+ if (request_streaming_from_server_function) {
+ auto request_streaming_from_server =
+ std::bind(request_streaming_from_server_function, &async_service_,
+ std::placeholders::_1, std::placeholders::_2,
+ std::placeholders::_3, srv_cqs_[j].get(),
+ srv_cqs_[j].get(), std::placeholders::_4);
+ contexts_.emplace_back(new ServerRpcContextStreamingFromServerImpl(
+ request_streaming_from_server, process_rpc_bound));
+ }
+ if (request_streaming_both_ways_function) {
+ // TODO(vjpai): Add this code
+ }
}
}
@@ -289,8 +321,8 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
if (!ok) {
return false;
}
- stream_.Read(&req_, AsyncQpsServerTest::tag(this));
next_state_ = &ServerRpcContextStreamingImpl::read_done;
+ stream_.Read(&req_, AsyncQpsServerTest::tag(this));
return true;
}
@@ -300,23 +332,23 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
// Call the RPC processing function
grpc::Status status = invoke_method_(&req_, &response_);
// initiate the write
- stream_.Write(response_, AsyncQpsServerTest::tag(this));
next_state_ = &ServerRpcContextStreamingImpl::write_done;
+ stream_.Write(response_, AsyncQpsServerTest::tag(this));
} else { // client has sent writes done
// finish the stream
- stream_.Finish(Status::OK, AsyncQpsServerTest::tag(this));
next_state_ = &ServerRpcContextStreamingImpl::finish_done;
+ stream_.Finish(Status::OK, AsyncQpsServerTest::tag(this));
}
return true;
}
bool write_done(bool ok) {
// now go back and get another streaming read!
if (ok) {
- stream_.Read(&req_, AsyncQpsServerTest::tag(this));
next_state_ = &ServerRpcContextStreamingImpl::read_done;
+ stream_.Read(&req_, AsyncQpsServerTest::tag(this));
} else {
- stream_.Finish(Status::OK, AsyncQpsServerTest::tag(this));
next_state_ = &ServerRpcContextStreamingImpl::finish_done;
+ stream_.Finish(Status::OK, AsyncQpsServerTest::tag(this));
}
return true;
}
@@ -335,6 +367,146 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
grpc::ServerAsyncReaderWriter<ResponseType, RequestType> stream_;
};
+ class ServerRpcContextStreamingFromClientImpl final
+ : public ServerRpcContext {
+ public:
+ ServerRpcContextStreamingFromClientImpl(
+ std::function<void(ServerContextType *,
+ grpc::ServerAsyncReader<ResponseType, RequestType> *,
+ void *)>
+ request_method,
+ std::function<grpc::Status(const RequestType *, ResponseType *)>
+ invoke_method)
+ : srv_ctx_(new ServerContextType),
+ next_state_(&ServerRpcContextStreamingFromClientImpl::request_done),
+ request_method_(request_method),
+ invoke_method_(invoke_method),
+ stream_(srv_ctx_.get()) {
+ request_method_(srv_ctx_.get(), &stream_, AsyncQpsServerTest::tag(this));
+ }
+ ~ServerRpcContextStreamingFromClientImpl() override {}
+ bool RunNextState(bool ok) override { return (this->*next_state_)(ok); }
+ void Reset() override {
+ srv_ctx_.reset(new ServerContextType);
+ req_ = RequestType();
+ stream_ =
+ grpc::ServerAsyncReader<ResponseType, RequestType>(srv_ctx_.get());
+
+ // Then request the method
+ next_state_ = &ServerRpcContextStreamingFromClientImpl::request_done;
+ request_method_(srv_ctx_.get(), &stream_, AsyncQpsServerTest::tag(this));
+ }
+
+ private:
+ bool request_done(bool ok) {
+ if (!ok) {
+ return false;
+ }
+ next_state_ = &ServerRpcContextStreamingFromClientImpl::read_done;
+ stream_.Read(&req_, AsyncQpsServerTest::tag(this));
+ return true;
+ }
+
+ bool read_done(bool ok) {
+ if (ok) {
+ // In this case, just do another read
+ // next_state_ is unchanged
+ stream_.Read(&req_, AsyncQpsServerTest::tag(this));
+ return true;
+ } else { // client has sent writes done
+ // invoke the method
+ // Call the RPC processing function
+ grpc::Status status = invoke_method_(&req_, &response_);
+ // finish the stream
+ next_state_ = &ServerRpcContextStreamingFromClientImpl::finish_done;
+ stream_.Finish(response_, Status::OK, AsyncQpsServerTest::tag(this));
+ }
+ return true;
+ }
+ bool finish_done(bool ok) { return false; /* reset the context */ }
+
+ std::unique_ptr<ServerContextType> srv_ctx_;
+ RequestType req_;
+ ResponseType response_;
+ bool (ServerRpcContextStreamingFromClientImpl::*next_state_)(bool);
+ std::function<void(ServerContextType *,
+ grpc::ServerAsyncReader<ResponseType, RequestType> *,
+ void *)>
+ request_method_;
+ std::function<grpc::Status(const RequestType *, ResponseType *)>
+ invoke_method_;
+ grpc::ServerAsyncReader<ResponseType, RequestType> stream_;
+ };
+
+ class ServerRpcContextStreamingFromServerImpl final
+ : public ServerRpcContext {
+ public:
+ ServerRpcContextStreamingFromServerImpl(
+ std::function<void(ServerContextType *, RequestType *,
+ grpc::ServerAsyncWriter<ResponseType> *, void *)>
+ request_method,
+ std::function<grpc::Status(const RequestType *, ResponseType *)>
+ invoke_method)
+ : srv_ctx_(new ServerContextType),
+ next_state_(&ServerRpcContextStreamingFromServerImpl::request_done),
+ request_method_(request_method),
+ invoke_method_(invoke_method),
+ stream_(srv_ctx_.get()) {
+ request_method_(srv_ctx_.get(), &req_, &stream_,
+ AsyncQpsServerTest::tag(this));
+ }
+ ~ServerRpcContextStreamingFromServerImpl() override {}
+ bool RunNextState(bool ok) override { return (this->*next_state_)(ok); }
+ void Reset() override {
+ srv_ctx_.reset(new ServerContextType);
+ req_ = RequestType();
+ stream_ = grpc::ServerAsyncWriter<ResponseType>(srv_ctx_.get());
+
+ // Then request the method
+ next_state_ = &ServerRpcContextStreamingFromServerImpl::request_done;
+ request_method_(srv_ctx_.get(), &req_, &stream_,
+ AsyncQpsServerTest::tag(this));
+ }
+
+ private:
+ bool request_done(bool ok) {
+ if (!ok) {
+ return false;
+ }
+ // invoke the method
+ // Call the RPC processing function
+ grpc::Status status = invoke_method_(&req_, &response_);
+
+ next_state_ = &ServerRpcContextStreamingFromServerImpl::write_done;
+ stream_.Write(response_, AsyncQpsServerTest::tag(this));
+ return true;
+ }
+
+ bool write_done(bool ok) {
+ if (ok) {
+ // Do another write!
+ // next_state_ is unchanged
+ stream_.Write(response_, AsyncQpsServerTest::tag(this));
+ } else { // must be done so let's finish
+ next_state_ = &ServerRpcContextStreamingFromServerImpl::finish_done;
+ stream_.Finish(Status::OK, AsyncQpsServerTest::tag(this));
+ }
+ return true;
+ }
+ bool finish_done(bool ok) { return false; /* reset the context */ }
+
+ std::unique_ptr<ServerContextType> srv_ctx_;
+ RequestType req_;
+ ResponseType response_;
+ bool (ServerRpcContextStreamingFromServerImpl::*next_state_)(bool);
+ std::function<void(ServerContextType *, RequestType *,
+ grpc::ServerAsyncWriter<ResponseType> *, void *)>
+ request_method_;
+ std::function<grpc::Status(const RequestType *, ResponseType *)>
+ invoke_method_;
+ grpc::ServerAsyncWriter<ResponseType> stream_;
+ };
+
std::vector<std::thread> threads_;
std::unique_ptr<grpc::Server> server_;
std::vector<std::unique_ptr<grpc::ServerCompletionQueue>> srv_cqs_;
@@ -390,6 +562,9 @@ std::unique_ptr<Server> CreateAsyncServer(const ServerConfig &config) {
config, RegisterBenchmarkService,
&BenchmarkService::AsyncService::RequestUnaryCall,
&BenchmarkService::AsyncService::RequestStreamingCall,
+ &BenchmarkService::AsyncService::RequestStreamingFromClient,
+ &BenchmarkService::AsyncService::RequestStreamingFromServer,
+ &BenchmarkService::AsyncService::RequestStreamingBothWays,
ProcessSimpleRPC));
}
std::unique_ptr<Server> CreateAsyncGenericServer(const ServerConfig &config) {
@@ -397,7 +572,8 @@ std::unique_ptr<Server> CreateAsyncGenericServer(const ServerConfig &config) {
new AsyncQpsServerTest<ByteBuffer, ByteBuffer, grpc::AsyncGenericService,
grpc::GenericServerContext>(
config, RegisterGenericService, nullptr,
- &grpc::AsyncGenericService::RequestCall, ProcessGenericRPC));
+ &grpc::AsyncGenericService::RequestCall, nullptr, nullptr, nullptr,
+ ProcessGenericRPC));
}
} // namespace testing
diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc
index f79284d225..f04465e261 100644
--- a/test/cpp/qps/server_sync.cc
+++ b/test/cpp/qps/server_sync.cc
@@ -31,6 +31,9 @@
*
*/
+#include <atomic>
+#include <thread>
+
#include <grpc++/resource_quota.h>
#include <grpc++/security/server_credentials.h>
#include <grpc++/server.h>
@@ -52,12 +55,9 @@ class BenchmarkServiceImpl final : public BenchmarkService::Service {
public:
Status UnaryCall(ServerContext* context, const SimpleRequest* request,
SimpleResponse* response) override {
- if (request->response_size() > 0) {
- if (!Server::SetPayload(request->response_type(),
- request->response_size(),
- response->mutable_payload())) {
- return Status(grpc::StatusCode::INTERNAL, "Error creating payload.");
- }
+ auto s = SetResponse(request, response);
+ if (!s.ok()) {
+ return s;
}
return Status::OK;
}
@@ -67,12 +67,9 @@ class BenchmarkServiceImpl final : public BenchmarkService::Service {
SimpleRequest request;
while (stream->Read(&request)) {
SimpleResponse response;
- if (request.response_size() > 0) {
- if (!Server::SetPayload(request.response_type(),
- request.response_size(),
- response.mutable_payload())) {
- return Status(grpc::StatusCode::INTERNAL, "Error creating payload.");
- }
+ auto s = SetResponse(&request, &response);
+ if (!s.ok()) {
+ return s;
}
if (!stream->Write(response)) {
return Status(StatusCode::INTERNAL, "Server couldn't respond");
@@ -80,6 +77,96 @@ class BenchmarkServiceImpl final : public BenchmarkService::Service {
}
return Status::OK;
}
+ Status StreamingFromClient(ServerContext* context,
+ ServerReader<SimpleRequest>* stream,
+ SimpleResponse* response) override {
+ auto s = ClientPull(context, stream, response);
+ if (!s.ok()) {
+ return s;
+ }
+ return Status::OK;
+ }
+ Status StreamingFromServer(ServerContext* context,
+ const SimpleRequest* request,
+ ServerWriter<SimpleResponse>* stream) override {
+ SimpleResponse response;
+ auto s = SetResponse(request, &response);
+ if (!s.ok()) {
+ return s;
+ }
+ return ServerPush(context, stream, response, nullptr);
+ }
+ Status StreamingBothWays(
+ ServerContext* context,
+ ServerReaderWriter<SimpleResponse, SimpleRequest>* stream) override {
+ // Read the first client message to setup server response
+ SimpleRequest request;
+ if (!stream->Read(&request)) {
+ return Status::OK;
+ }
+ SimpleResponse response;
+ auto s = SetResponse(&request, &response);
+ if (!s.ok()) {
+ return s;
+ }
+ std::atomic_bool done;
+ Status sp;
+ std::thread t([context, stream, &response, &done, &sp]() {
+ sp = ServerPush(context, stream, response, [&done]() {
+ return done.load(std::memory_order_relaxed);
+ });
+ });
+ SimpleResponse dummy;
+ auto cp = ClientPull(context, stream, &dummy);
+ done.store(true, std::memory_order_relaxed); // can be lazy
+ t.join();
+ if (!cp.ok()) {
+ return cp;
+ }
+ if (!sp.ok()) {
+ return sp;
+ }
+ return Status::OK;
+ }
+
+ private:
+ static Status ClientPull(ServerContext* context,
+ ReaderInterface<SimpleRequest>* stream,
+ SimpleResponse* response) {
+ SimpleRequest request;
+ while (stream->Read(&request)) {
+ }
+ if (request.response_size() > 0) {
+ if (!Server::SetPayload(request.response_type(), request.response_size(),
+ response->mutable_payload())) {
+ return Status(grpc::StatusCode::INTERNAL, "Error creating payload.");
+ }
+ }
+ return Status::OK;
+ }
+ static Status ServerPush(ServerContext* context,
+ WriterInterface<SimpleResponse>* stream,
+ const SimpleResponse& response,
+ std::function<bool()> done) {
+ while ((done == nullptr) || !done()) {
+ // TODO(vjpai): Add potential for rate-pacing on this
+ if (!stream->Write(response)) {
+ return Status(StatusCode::INTERNAL, "Server couldn't push");
+ }
+ }
+ return Status::OK;
+ }
+ static Status SetResponse(const SimpleRequest* request,
+ SimpleResponse* response) {
+ if (request->response_size() > 0) {
+ if (!Server::SetPayload(request->response_type(),
+ request->response_size(),
+ response->mutable_payload())) {
+ return Status(grpc::StatusCode::INTERNAL, "Error creating payload.");
+ }
+ }
+ return Status::OK;
+ }
};
class SynchronousServer final : public grpc::testing::Server {
diff --git a/third_party/protobuf b/third_party/protobuf
-Subproject 593e917c176b5bc5aafa57bf9f6030d749d91cd
+Subproject a6189acd18b00611c1dc7042299ad75486f08a1
diff --git a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py
index c2aa6198b3..8a251f876a 100644
--- a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py
+++ b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py
@@ -29,8 +29,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# AUTO-GENERATED BY make_grpcio_tools.py!
-CC_FILES=['google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/php/php_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/well_known_types_embed.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension_lite.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc', 'google/protobuf/compiler/js/embed.cc']
-PROTO_FILES=['google/protobuf/wrappers.proto', 'google/protobuf/type.proto', 'google/protobuf/timestamp.proto', 'google/protobuf/struct.proto', 'google/protobuf/source_context.proto', 'google/protobuf/field_mask.proto', 'google/protobuf/empty.proto', 'google/protobuf/duration.proto', 'google/protobuf/descriptor.proto', 'google/protobuf/compiler/plugin.proto', 'google/protobuf/api.proto', 'google/protobuf/any.proto']
+CC_FILES=['google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/profile.pb.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/php/php_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/well_known_types_embed.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension_lite.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/util/delimited_message_util.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc', 'google/protobuf/compiler/js/embed.cc']
+PROTO_FILES=['google/protobuf/wrappers.proto', 'google/protobuf/type.proto', 'google/protobuf/timestamp.proto', 'google/protobuf/struct.proto', 'google/protobuf/source_context.proto', 'google/protobuf/field_mask.proto', 'google/protobuf/empty.proto', 'google/protobuf/duration.proto', 'google/protobuf/descriptor.proto', 'google/protobuf/compiler/profile.proto', 'google/protobuf/compiler/plugin.proto', 'google/protobuf/api.proto', 'google/protobuf/any.proto']
CC_INCLUDE='third_party/protobuf/src'
PROTO_INCLUDE='third_party/protobuf/src'
diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py
index 211d442f17..43b60b142f 100644
--- a/tools/distrib/python/grpcio_tools/setup.py
+++ b/tools/distrib/python/grpcio_tools/setup.py
@@ -211,7 +211,7 @@ setuptools.setup(
ext_modules=extension_modules(),
packages=setuptools.find_packages('.'),
install_requires=[
- 'protobuf>=3.2.0',
+ 'protobuf>=3.3.0',
'grpcio>={version}'.format(version=grpc_version.VERSION),
],
package_data=package_data(),
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_go1.7/Dockerfile
index c099f339ae..0a62f1c2c0 100644
--- a/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_go1.7/Dockerfile
@@ -1,4 +1,4 @@
-# Copyright 2016, Google Inc.
+# Copyright 2017, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,12 +27,10 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-FROM golang:latest
-
-# Google Cloud platform API libraries
-RUN apt-get update && apt-get install -y python-pip && apt-get clean
-RUN pip install --upgrade google-api-python-client
+FROM golang:1.7
+# Using login shell removes Go from path, so we add it.
+RUN ln -s /usr/local/go/bin/go /usr/local/bin
#====================
# Python dependencies
@@ -49,8 +47,5 @@ RUN pip install pip --upgrade
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
-# Using login shell removes Go from path, so we add it.
-RUN ln -s /usr/local/go/bin/go /usr/local/bin
-
# Define the default command.
CMD ["bash"]
diff --git a/tools/run_tests/stress_test/cleanup_docker_images.sh b/tools/dockerfile/interoptest/grpc_interop_go1.8/Dockerfile
index e424fcfd99..abf38b817a 100755..100644
--- a/tools/run_tests/stress_test/cleanup_docker_images.sh
+++ b/tools/dockerfile/interoptest/grpc_interop_go1.8/Dockerfile
@@ -1,4 +1,3 @@
-#!/bin/bash
# Copyright 2017, Google Inc.
# All rights reserved.
#
@@ -27,5 +26,26 @@
# 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.
-for img in `docker images | grep \<none\> | awk '{print $3 }'` ; do docker rmi -f $img; done
+FROM golang:1.8
+
+# Using login shell removes Go from path, so we add it.
+RUN ln -s /usr/local/go/bin/go /usr/local/bin
+
+#====================
+# Python dependencies
+
+# Install dependencies
+
+RUN apt-get update && apt-get install -y \
+ python-all-dev \
+ python3-all-dev \
+ python-pip
+
+# Install Python packages from PyPI
+RUN pip install pip --upgrade
+RUN pip install virtualenv
+RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
+
+# Define the default command.
+CMD ["bash"]
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile
deleted file mode 100644
index 12d8d09184..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 2015, 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.
-
-FROM debian:jessie
-
-# Install Git and basic packages.
-RUN apt-get update && apt-get install -y \
- autoconf \
- autotools-dev \
- build-essential \
- bzip2 \
- ccache \
- curl \
- gcc \
- gcc-multilib \
- git \
- golang \
- gyp \
- lcov \
- libc6 \
- libc6-dbg \
- libc6-dev \
- libgtest-dev \
- libtool \
- make \
- perl \
- strace \
- python-dev \
- python-setuptools \
- python-yaml \
- telnet \
- unzip \
- wget \
- zip && apt-get clean
-
-#================
-# Build profiling
-RUN apt-get update && apt-get install -y time && apt-get clean
-
-#====================
-# Python dependencies
-
-# Install dependencies
-
-RUN apt-get update && apt-get install -y \
- python-all-dev \
- python3-all-dev \
- python-pip
-
-# Install Python packages from PyPI
-RUN pip install pip --upgrade
-RUN pip install virtualenv
-RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
-
-# Prepare ccache
-RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
-RUN ln -s /usr/bin/ccache /usr/local/bin/g++
-RUN ln -s /usr/bin/ccache /usr/local/bin/cc
-RUN ln -s /usr/bin/ccache /usr/local/bin/c++
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
-
-#=================
-# C++ dependencies
-RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean
-
-# Google Cloud platform API libraries
-RUN apt-get update && apt-get install -y python-pip && apt-get clean
-RUN pip install --upgrade google-api-python-client
-
-
-#================
-# C# dependencies
-
-# Update to a newer version of mono
-RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
-RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list
-RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list
-RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list
-
-# Install dependencies
-RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \
- mono-devel \
- ca-certificates-mono \
- nuget \
- && apt-get clean
-
-RUN nuget update -self
-
-# Define the default command.
-CMD ["bash"]
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_csharp/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_csharp/build_interop_stress.sh
deleted file mode 100755
index 345196894e..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_csharp/build_interop_stress.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-# Copyright 2015, 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.
-#
-# Builds C# interop server and client in a base image.
-set -e
-
-mkdir -p /var/local/git
-git clone /var/local/jenkins/grpc /var/local/git/grpc
-# clone gRPC submodules, use data from locally cloned submodules where possible
-(cd /var/local/jenkins/grpc/ && git submodule foreach 'cd /var/local/git/grpc \
-&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \
-${name}')
-
-# Copy service account keys if available
-cp -r /var/local/jenkins/service_account $HOME || true
-
-cd /var/local/git/grpc
-
-# Build C++ metrics client (to query the metrics from csharp stress client)
-make metrics_client -j
-
-# Build C# interop client & server
-tools/run_tests/run_tests.py -l csharp -c dbg --build_only
-
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_cxx/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_cxx/Dockerfile
deleted file mode 100644
index d0f66d9955..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_cxx/Dockerfile
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 2015-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.
-
-FROM debian:jessie
-
-# Install Git and basic packages.
-RUN apt-get update && apt-get install -y \
- autoconf \
- autotools-dev \
- build-essential \
- bzip2 \
- ccache \
- curl \
- gcc \
- gcc-multilib \
- git \
- golang \
- gyp \
- lcov \
- libc6 \
- libc6-dbg \
- libc6-dev \
- libgtest-dev \
- libtool \
- make \
- perl \
- strace \
- python-dev \
- python-setuptools \
- python-yaml \
- telnet \
- unzip \
- wget \
- zip && apt-get clean
-
-#================
-# Build profiling
-RUN apt-get update && apt-get install -y time && apt-get clean
-
-#====================
-# Python dependencies
-
-# Install dependencies
-
-RUN apt-get update && apt-get install -y \
- python-all-dev \
- python3-all-dev \
- python-pip
-
-# Install Python packages from PyPI
-RUN pip install pip --upgrade
-RUN pip install virtualenv
-RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
-
-# Prepare ccache
-RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
-RUN ln -s /usr/bin/ccache /usr/local/bin/g++
-RUN ln -s /usr/bin/ccache /usr/local/bin/cc
-RUN ln -s /usr/bin/ccache /usr/local/bin/c++
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
-
-#=================
-# C++ dependencies
-RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean
-
-# Google Cloud platform API libraries
-RUN apt-get update && apt-get install -y python-pip && apt-get clean
-RUN pip install --upgrade google-api-python-client
-
-
-#=================
-# Update clang to a version with improved tsan and fuzzing capabilities
-
-RUN apt-get update && apt-get -y install python cmake && apt-get clean
-
-RUN git clone -n -b release_38 http://llvm.org/git/llvm.git && \
- cd llvm && git checkout ad57503 && cd ..
-RUN git clone -n -b release_38 http://llvm.org/git/clang.git && \
- cd clang && git checkout ad2c56e && cd ..
-RUN git clone -n -b release_38 http://llvm.org/git/compiler-rt.git && \
- cd compiler-rt && git checkout 3176922 && cd ..
-RUN git clone -n -b release_38 \
- http://llvm.org/git/clang-tools-extra.git && cd clang-tools-extra && \
- git checkout c288525 && cd ..
-RUN git clone -n -b release_38 http://llvm.org/git/libcxx.git && \
- cd libcxx && git checkout fda3549 && cd ..
-RUN git clone -n -b release_38 http://llvm.org/git/libcxxabi.git && \
- cd libcxxabi && git checkout 8d4e51d && cd ..
-
-RUN mv clang llvm/tools
-RUN mv compiler-rt llvm/projects
-RUN mv clang-tools-extra llvm/tools/clang/tools
-RUN mv libcxx llvm/projects
-RUN mv libcxxabi llvm/projects
-
-RUN mkdir llvm-build
-RUN cd llvm-build && cmake \
- -DCMAKE_BUILD_TYPE:STRING=Release \
- -DCMAKE_INSTALL_PREFIX:STRING=/usr \
- -DLLVM_TARGETS_TO_BUILD:STRING=X86 \
- ../llvm
-RUN make -C llvm-build -j 12 && make -C llvm-build install && rm -rf llvm-build
-
-# Define the default command.
-CMD ["bash"]
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_cxx/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_cxx/build_interop_stress.sh
deleted file mode 100755
index 92d1f80fe6..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_cxx/build_interop_stress.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-# Copyright 2015, 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.
-#
-# Builds C++ interop server and client in a base image.
-set -e
-
-mkdir -p /var/local/git
-git clone /var/local/jenkins/grpc /var/local/git/grpc
-# clone gRPC submodules, use data from locally cloned submodules where possible
-(cd /var/local/jenkins/grpc/ && git submodule foreach 'cd /var/local/git/grpc \
-&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \
-${name}')
-
-# copy service account keys if available
-cp -r /var/local/jenkins/service_account $HOME || true
-
-cd /var/local/git/grpc
-
-make install-certs
-
-BUILD_TYPE=${BUILD_TYPE:=opt}
-
-# build C++ interop stress client, interop client and server
-make CONFIG=$BUILD_TYPE stress_test metrics_client interop_client interop_server
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_go/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_go/build_interop_stress.sh
deleted file mode 100755
index 9e4769cf33..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_go/build_interop_stress.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-# Copyright 2015, 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.
-#
-# Builds Go interop server, Stress client and metrics client in a base image.
-set -e
-
-# Clone just the grpc-go source code without any dependencies.
-# We are cloning from a local git repo that contains the right revision
-# to test instead of using "go get" to download from Github directly.
-git clone --recursive /var/local/jenkins/grpc-go src/google.golang.org/grpc
-
-# Clone the 'grpc' repo. We just need this for the wrapper scripts under
-# grpc/tools/gcp/stress_tests
-git clone /var/local/jenkins/grpc /var/local/git/grpc
-# clone gRPC submodules, use data from locally cloned submodules where possible
-(cd /var/local/jenkins/grpc/ && git submodule foreach 'cd /var/local/git/grpc \
-&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \
-${name}')
-
-# copy service account keys if available
-cp -r /var/local/jenkins/service_account $HOME || true
-
-# Get dependencies from GitHub
-# NOTE: once grpc-go dependencies change, this needs to be updated manually
-# but we don't expect this to happen any time soon.
-go get github.com/golang/protobuf/proto
-go get golang.org/x/net/context
-go get golang.org/x/net/trace
-go get golang.org/x/oauth2
-go get google.golang.org/cloud
-
-# Build the interop server, stress client and stress metrics client
-(cd src/google.golang.org/grpc/interop/server && go install)
-(cd src/google.golang.org/grpc/stress/client && go install)
-(cd src/google.golang.org/grpc/stress/metrics_client && go install)
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile
deleted file mode 100644
index 229ea469c4..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile
+++ /dev/null
@@ -1,117 +0,0 @@
-# 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.
-
-FROM debian:jessie
-
-# Install Git and basic packages.
-RUN apt-get update && apt-get install -y \
- autoconf \
- autotools-dev \
- build-essential \
- bzip2 \
- ccache \
- curl \
- gcc \
- gcc-multilib \
- git \
- golang \
- gyp \
- lcov \
- libc6 \
- libc6-dbg \
- libc6-dev \
- libgtest-dev \
- libtool \
- make \
- perl \
- strace \
- python-dev \
- python-setuptools \
- python-yaml \
- telnet \
- unzip \
- wget \
- zip && apt-get clean
-
-#================
-# Build profiling
-RUN apt-get update && apt-get install -y time && apt-get clean
-
-#====================
-# Python dependencies
-
-# Install dependencies
-
-RUN apt-get update && apt-get install -y \
- python-all-dev \
- python3-all-dev \
- python-pip
-
-# Install Python packages from PyPI
-RUN pip install pip --upgrade
-RUN pip install virtualenv
-RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
-
-# Prepare ccache
-RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
-RUN ln -s /usr/bin/ccache /usr/local/bin/g++
-RUN ln -s /usr/bin/ccache /usr/local/bin/cc
-RUN ln -s /usr/bin/ccache /usr/local/bin/c++
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
-
-#=================
-# C++ dependencies
-RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean
-
-# Google Cloud platform API libraries
-RUN apt-get update && apt-get install -y python-pip && apt-get clean
-RUN pip install --upgrade google-api-python-client
-
-
-# Install JDK 8 and Git
-#
-RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
- echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
- echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
-
-RUN apt-get update && apt-get -y install \
- git \
- libapr1 \
- oracle-java8-installer \
- && \
- apt-get clean && rm -r /var/cache/oracle-jdk8-installer/
-
-ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
-ENV PATH $PATH:$JAVA_HOME/bin
-
-
-# Define the default command.
-CMD ["bash"]
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_java/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_java/build_interop_stress.sh
deleted file mode 100755
index 0194860d10..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_java/build_interop_stress.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-# Copyright 2015, 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.
-#
-# Builds C++ interop server and client in a base image.
-set -e
-
-mkdir -p /var/local/git
-# grpc-java repo
-git clone --recursive --depth 1 /var/local/jenkins/grpc-java /var/local/git/grpc-java
-
-# grpc repo (for metrics client and for the stress test wrapper scripts)
-git clone /var/local/jenkins/grpc /var/local/git/grpc
-# clone gRPC submodules, use data from locally cloned submodules where possible
-(cd /var/local/jenkins/grpc/ && git submodule foreach 'cd /var/local/git/grpc \
-&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \
-${name}')
-
-# Copy service account keys if available
-cp -r /var/local/jenkins/service_account $HOME || true
-
-# First build the metrics client in grpc repo
-cd /var/local/git/grpc
-make metrics_client
-
-# Build all interop test targets (which includes interop server and stress test
-# client) in grpc-java repo
-cd /var/local/git/grpc-java
-./gradlew :grpc-interop-testing:installDist -PskipCodegen=true
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile
deleted file mode 100644
index 5fd0bc0eb2..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile
+++ /dev/null
@@ -1,109 +0,0 @@
-# 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.
-
-FROM debian:jessie
-
-# Install Git and basic packages.
-RUN apt-get update && apt-get install -y \
- autoconf \
- autotools-dev \
- build-essential \
- bzip2 \
- ccache \
- curl \
- gcc \
- gcc-multilib \
- git \
- golang \
- gyp \
- lcov \
- libc6 \
- libc6-dbg \
- libc6-dev \
- libgtest-dev \
- libtool \
- make \
- perl \
- strace \
- python-dev \
- python-setuptools \
- python-yaml \
- telnet \
- unzip \
- wget \
- zip && apt-get clean
-
-#================
-# Build profiling
-RUN apt-get update && apt-get install -y time && apt-get clean
-
-#====================
-# Python dependencies
-
-# Install dependencies
-
-RUN apt-get update && apt-get install -y \
- python-all-dev \
- python3-all-dev \
- python-pip
-
-# Install Python packages from PyPI
-RUN pip install pip --upgrade
-RUN pip install virtualenv
-RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
-
-#==================
-# Node dependencies
-
-# Install nvm
-RUN touch .profile
-RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
-# Install all versions of node that we want to test
-RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache"
-RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache"
-RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache"
-RUN /bin/bash -l -c "nvm alias default 4"
-# Google Cloud platform API libraries
-RUN apt-get update && apt-get install -y python-pip && apt-get clean
-RUN pip install --upgrade google-api-python-client
-
-
-# Prepare ccache
-RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
-RUN ln -s /usr/bin/ccache /usr/local/bin/g++
-RUN ln -s /usr/bin/ccache /usr/local/bin/cc
-RUN ln -s /usr/bin/ccache /usr/local/bin/c++
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
-
-
-RUN mkdir /var/local/jenkins
-
-# Define the default command.
-CMD ["bash"]
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_node/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_node/build_interop_stress.sh
deleted file mode 100755
index 4116f842ff..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_node/build_interop_stress.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-# Copyright 2015, 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.
-#
-# Builds Node interop server and client in a base image.
-set -e
-
-mkdir -p /var/local/git
-git clone /var/local/jenkins/grpc /var/local/git/grpc
-# clone gRPC submodules, use data from locally cloned submodules where possible
-(cd /var/local/jenkins/grpc/ && git submodule foreach 'cd /var/local/git/grpc \
-&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \
-${name}')
-
-# copy service account keys if available
-cp -r /var/local/jenkins/service_account $HOME || true
-
-cd /var/local/git/grpc
-
-# build Node interop client & server
-npm install -g node-gyp
-npm install --unsafe-perm --build-from-source
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile
deleted file mode 100644
index b5198b4652..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 2015, 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.
-
-FROM debian:jessie
-
-# Install Git and basic packages.
-RUN apt-get update && apt-get install -y \
- autoconf \
- autotools-dev \
- build-essential \
- bzip2 \
- ccache \
- curl \
- gcc \
- gcc-multilib \
- git \
- golang \
- gyp \
- lcov \
- libc6 \
- libc6-dbg \
- libc6-dev \
- libgtest-dev \
- libtool \
- make \
- perl \
- strace \
- python-dev \
- python-setuptools \
- python-yaml \
- telnet \
- unzip \
- wget \
- zip && apt-get clean
-
-#================
-# Build profiling
-RUN apt-get update && apt-get install -y time && apt-get clean
-
-#====================
-# Python dependencies
-
-# Install dependencies
-
-RUN apt-get update && apt-get install -y \
- python-all-dev \
- python3-all-dev \
- python-pip
-
-# Install Python packages from PyPI
-RUN pip install pip --upgrade
-RUN pip install virtualenv
-RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
-
-#==================
-# Ruby dependencies
-
-# Install rvm
-RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
-RUN \curl -sSL https://get.rvm.io | bash -s stable
-
-# Install Ruby 2.1
-RUN /bin/bash -l -c "rvm install ruby-2.1"
-RUN /bin/bash -l -c "rvm use --default ruby-2.1"
-RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
-RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
-RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
-RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
-
-# Google Cloud platform API libraries
-RUN apt-get update && apt-get install -y python-pip && apt-get clean
-RUN pip install --upgrade google-api-python-client
-
-
-#=================
-# PHP dependencies
-
-# Install dependencies
-
-RUN apt-get update && apt-get install -y \
- git php5 php5-dev phpunit unzip
-
-# Prepare ccache
-RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
-RUN ln -s /usr/bin/ccache /usr/local/bin/g++
-RUN ln -s /usr/bin/ccache /usr/local/bin/cc
-RUN ln -s /usr/bin/ccache /usr/local/bin/c++
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
-
-
-RUN mkdir /var/local/jenkins
-
-# Install composer
-RUN curl -sS https://getcomposer.org/installer | php
-RUN mv composer.phar /usr/local/bin/composer
-
-# Define the default command.
-CMD ["bash"]
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_php/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_php/build_interop_stress.sh
deleted file mode 100755
index e3cca085a4..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_php/build_interop_stress.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-# Copyright 2015, 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.
-#
-# Builds PHP interop server and client in a base image.
-set -ex
-
-mkdir -p /var/local/git
-git clone /var/local/jenkins/grpc /var/local/git/grpc
-# clone gRPC submodules, use data from locally cloned submodules where possible
-(cd /var/local/jenkins/grpc/ && git submodule foreach 'cd /var/local/git/grpc \
-&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \
-${name}')
-
-# copy service account keys if available
-cp -r /var/local/jenkins/service_account $HOME || true
-
-cd /var/local/git/grpc
-
-make install-certs
-
-# gRPC core and protobuf need to be installed
-make install
-
-(cd src/php/ext/grpc && phpize && ./configure && make)
-
-(cd third_party/protobuf && make install)
-
-(cd src/php && php -d extension=ext/grpc/modules/grpc.so /usr/local/bin/composer install)
-
-(cd src/php && ./bin/generate_proto_php.sh)
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile
deleted file mode 100644
index 8e1de51f33..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile
+++ /dev/null
@@ -1,103 +0,0 @@
-# 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.
-
-FROM debian:jessie
-
-# Install Git and basic packages.
-RUN apt-get update && apt-get install -y \
- autoconf \
- autotools-dev \
- build-essential \
- bzip2 \
- ccache \
- curl \
- gcc \
- gcc-multilib \
- git \
- golang \
- gyp \
- lcov \
- libc6 \
- libc6-dbg \
- libc6-dev \
- libgtest-dev \
- libtool \
- make \
- perl \
- strace \
- python-dev \
- python-setuptools \
- python-yaml \
- telnet \
- unzip \
- wget \
- zip && apt-get clean
-
-#================
-# Build profiling
-RUN apt-get update && apt-get install -y time && apt-get clean
-
-# Prepare ccache
-RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
-RUN ln -s /usr/bin/ccache /usr/local/bin/g++
-RUN ln -s /usr/bin/ccache /usr/local/bin/cc
-RUN ln -s /usr/bin/ccache /usr/local/bin/c++
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
-
-#=================
-# C++ dependencies
-RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean
-
-# Google Cloud platform API libraries
-RUN apt-get update && apt-get install -y python-pip && apt-get clean
-RUN pip install --upgrade google-api-python-client
-
-
-#====================
-# Python dependencies
-
-# Install dependencies
-
-RUN apt-get update && apt-get install -y \
- python-all-dev \
- python3-all-dev \
- python-pip
-
-# Install Python packages from PyPI
-RUN pip install pip --upgrade
-RUN pip install virtualenv
-RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
-
-
-RUN pip install coverage
-RUN pip install oauth2client
-
-# Define the default command.
-CMD ["bash"]
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_python/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_python/build_interop_stress.sh
deleted file mode 100755
index 1c7dc2bd57..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_python/build_interop_stress.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-# 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.
-#
-# Builds Python interop server and client in a base image.
-set -e
-
-mkdir -p /var/local/git
-git clone /var/local/jenkins/grpc /var/local/git/grpc
-# clone gRPC submodules, use data from locally cloned submodules where possible
-(cd /var/local/jenkins/grpc/ && git submodule foreach 'cd /var/local/git/grpc \
-&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \
-${name}')
-
-# copy service account keys if available
-cp -r /var/local/jenkins/service_account $HOME || true
-
-cd /var/local/git/grpc
-tools/run_tests/run_tests.py -l python -c opt --build_only
-
-# Build c++ interop client
-make metrics_client -j
-
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile
deleted file mode 100644
index 9d291aac58..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 2015, 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.
-
-FROM debian:jessie
-
-# Install Git and basic packages.
-RUN apt-get update && apt-get install -y \
- autoconf \
- autotools-dev \
- build-essential \
- bzip2 \
- ccache \
- curl \
- gcc \
- gcc-multilib \
- git \
- golang \
- gyp \
- lcov \
- libc6 \
- libc6-dbg \
- libc6-dev \
- libgtest-dev \
- libtool \
- make \
- perl \
- strace \
- python-dev \
- python-setuptools \
- python-yaml \
- telnet \
- unzip \
- wget \
- zip && apt-get clean
-
-#================
-# Build profiling
-RUN apt-get update && apt-get install -y time && apt-get clean
-
-#====================
-# Python dependencies
-
-# Install dependencies
-
-RUN apt-get update && apt-get install -y \
- python-all-dev \
- python3-all-dev \
- python-pip
-
-# Install Python packages from PyPI
-RUN pip install pip --upgrade
-RUN pip install virtualenv
-RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
-
-# Prepare ccache
-RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
-RUN ln -s /usr/bin/ccache /usr/local/bin/g++
-RUN ln -s /usr/bin/ccache /usr/local/bin/cc
-RUN ln -s /usr/bin/ccache /usr/local/bin/c++
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang
-RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
-
-#=================
-# C++ dependencies
-RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean
-
-# Google Cloud platform API libraries
-RUN apt-get update && apt-get install -y python-pip && apt-get clean
-RUN pip install --upgrade google-api-python-client
-
-
-#==================
-# Ruby dependencies
-
-# Install rvm
-RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
-RUN \curl -sSL https://get.rvm.io | bash -s stable
-
-# Install Ruby 2.1
-RUN /bin/bash -l -c "rvm install ruby-2.1"
-RUN /bin/bash -l -c "rvm use --default ruby-2.1"
-RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
-RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
-RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
-RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
-
-# Define the default command.
-CMD ["bash"]
diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_ruby/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_ruby/build_interop_stress.sh
deleted file mode 100755
index 019f0a44e4..0000000000
--- a/tools/dockerfile/stress_test/grpc_interop_stress_ruby/build_interop_stress.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/bash
-# Copyright 2015, 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.
-#
-# Builds Ruby interop server and client in a base image.
-set -e
-
-mkdir -p /var/local/git
-git clone /var/local/jenkins/grpc /var/local/git/grpc
-# clone gRPC submodules, use data from locally cloned submodules where possible
-(cd /var/local/jenkins/grpc/ && git submodule foreach 'cd /var/local/git/grpc \
-&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \
-${name}')
-
-# Copy service account keys if available
-cp -r /var/local/jenkins/service_account $HOME || true
-
-cd /var/local/git/grpc
-rvm --default use ruby-2.1
-
-# Build Ruby interop client and server
-(cd src/ruby && gem update bundler && bundle && rake compile)
-
-# Build c++ metrics client to query the metrics from ruby stress client
-make metrics_client -j
-
diff --git a/tools/dockerfile/test/csharp_jessie_x64/Dockerfile b/tools/dockerfile/test/csharp_jessie_x64/Dockerfile
index f9e709dccb..0b21a22226 100644
--- a/tools/dockerfile/test/csharp_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/csharp_jessie_x64/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile
index 4bb97c7aa9..d9dc272a1b 100644
--- a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/dockerfile/test/cxx_jessie_x86/Dockerfile b/tools/dockerfile/test/cxx_jessie_x86/Dockerfile
index c4b710b5df..11ef52d1c0 100644
--- a/tools/dockerfile/test/cxx_jessie_x86/Dockerfile
+++ b/tools/dockerfile/test/cxx_jessie_x86/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile b/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile
index bd742dff34..41d3b2b520 100644
--- a/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile
+++ b/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile b/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile
index bc46b3055a..23d6fb8c41 100644
--- a/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile
+++ b/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile b/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile
index f7d7f542c1..1848e5e5c8 100644
--- a/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile
+++ b/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/dockerfile/test/fuzzer/Dockerfile b/tools/dockerfile/test/fuzzer/Dockerfile
index b398b70b64..4200ba0b26 100644
--- a/tools/dockerfile/test/fuzzer/Dockerfile
+++ b/tools/dockerfile/test/fuzzer/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile
index c1cce0a141..9b50d85e2f 100644
--- a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#================
# C# dependencies
diff --git a/tools/dockerfile/test/node_jessie_x64/Dockerfile b/tools/dockerfile/test/node_jessie_x64/Dockerfile
index 4595aa6bea..deef892952 100644
--- a/tools/dockerfile/test/node_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/node_jessie_x64/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
# Install Electron apt dependencies
RUN apt-get update && apt-get install -y \
diff --git a/tools/dockerfile/test/php7_jessie_x64/Dockerfile b/tools/dockerfile/test/php7_jessie_x64/Dockerfile
index 0e2c103afd..6057c2d6eb 100644
--- a/tools/dockerfile/test/php7_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/php7_jessie_x64/Dockerfile
@@ -75,6 +75,10 @@ RUN cd /var/local/git/php-src \
&& make \
&& make install
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/dockerfile/test/php_jessie_x64/Dockerfile b/tools/dockerfile/test/php_jessie_x64/Dockerfile
index c6f3dde39a..1510c3649c 100644
--- a/tools/dockerfile/test/php_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/php_jessie_x64/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/dockerfile/test/python_jessie_x64/Dockerfile b/tools/dockerfile/test/python_jessie_x64/Dockerfile
index 94c17078d3..cc69f4b5cd 100644
--- a/tools/dockerfile/test/python_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/python_jessie_x64/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/dockerfile/test/python_pyenv_x64/Dockerfile b/tools/dockerfile/test/python_pyenv_x64/Dockerfile
index 435a9fdc97..a105d334da 100644
--- a/tools/dockerfile/test/python_pyenv_x64/Dockerfile
+++ b/tools/dockerfile/test/python_pyenv_x64/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/dockerfile/test/ruby_jessie_x64/Dockerfile b/tools/dockerfile/test/ruby_jessie_x64/Dockerfile
index 679c8ff47a..0a5c9a633d 100644
--- a/tools/dockerfile/test/ruby_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/ruby_jessie_x64/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile
index 0da2a1914a..76923303ea 100644
--- a/tools/dockerfile/test/sanity/Dockerfile
+++ b/tools/dockerfile/test/sanity/Dockerfile
@@ -63,6 +63,10 @@ RUN apt-get update && apt-get install -y \
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
+# Google Cloud platform API libraries
+RUN apt-get update && apt-get install -y python-pip && apt-get clean
+RUN pip install --upgrade google-api-python-client
+
#====================
# Python dependencies
diff --git a/tools/gce/linux_worker_init.sh b/tools/gce/linux_worker_init.sh
index d552343bde..f795980aa8 100755
--- a/tools/gce/linux_worker_init.sh
+++ b/tools/gce/linux_worker_init.sh
@@ -61,6 +61,10 @@ sudo usermod -aG docker jenkins
# see https://github.com/grpc/grpc/issues/4988
printf "{\n\t\"storage-driver\": \"overlay\"\n}" | sudo tee /etc/docker/daemon.json
+# Install pip and Google API library to enable using GCP services
+sudo apt-get install -y python-pip
+sudo pip install google-api-python-client
+
# Install RVM
# TODO(jtattermusch): why is RVM needed?
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
diff --git a/tools/gcp/stress_test/run_client.py b/tools/gcp/stress_test/run_client.py
deleted file mode 100755
index 51ada6820d..0000000000
--- a/tools/gcp/stress_test/run_client.py
+++ /dev/null
@@ -1,206 +0,0 @@
-#!/usr/bin/env python2.7
-# Copyright 2015-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.
-
-import datetime
-import os
-import re
-import resource
-import select
-import subprocess
-import sys
-import time
-
-from stress_test_utils import EventType
-from stress_test_utils import BigQueryHelper
-
-
-# TODO (sree): Write a python grpc client to directly query the metrics instead
-# of calling metrics_client
-def _get_qps(metrics_cmd):
- qps = 0
- try:
- # Note: gpr_log() writes even non-error messages to stderr stream. So it is
- # important that we set stderr=subprocess.STDOUT
- p = subprocess.Popen(args=metrics_cmd,
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- retcode = p.wait()
- (out_str, err_str) = p.communicate()
- if retcode != 0:
- print 'Error in reading metrics information'
- print 'Output: ', out_str
- else:
- # The overall qps is printed at the end of the line
- m = re.search('\d+$', out_str)
- qps = int(m.group()) if m else 0
- except Exception as ex:
- print 'Exception while reading metrics information: ' + str(ex)
- return qps
-
-
-def run_client():
- """This is a wrapper around the stress test client and performs the following:
- 1) Create the following two tables in Big Query:
- (i) Summary table: To record events like the test started, completed
- successfully or failed
- (ii) Qps table: To periodically record the QPS sent by this client
- 2) Start the stress test client and add a row in the Big Query summary
- table
- 3) Once every few seconds (as specificed by the poll_interval_secs) poll
- the status of the stress test client process and perform the
- following:
- 3.1) If the process is still running, get the current qps by invoking
- the metrics client program and add a row in the Big Query
- Qps table. Sleep for a duration specified by poll_interval_secs
- 3.2) If the process exited successfully, add a row in the Big Query
- Summary table and exit
- 3.3) If the process failed, add a row in Big Query summary table and
- wait forever.
- NOTE: This script typically runs inside a GKE pod which means
- that the pod gets destroyed when the script exits. However, in
- case the stress test client fails, we would not want the pod to
- be destroyed (since we might want to connect to the pod for
- examining logs). This is the reason why the script waits forever
- in case of failures
- """
- # Set the 'core file' size to 'unlimited' so that 'core' files are generated
- # if the client crashes (Note: This is not relevant for Java and Go clients)
- resource.setrlimit(resource.RLIMIT_CORE,
- (resource.RLIM_INFINITY, resource.RLIM_INFINITY))
-
- env = dict(os.environ)
- image_type = env['STRESS_TEST_IMAGE_TYPE']
- stress_client_cmd = env['STRESS_TEST_CMD'].split()
- args_str = env['STRESS_TEST_ARGS_STR']
- metrics_client_cmd = env['METRICS_CLIENT_CMD'].split()
- metrics_client_args_str = env['METRICS_CLIENT_ARGS_STR']
- run_id = env['RUN_ID']
- pod_name = env['POD_NAME']
- logfile_name = env.get('LOGFILE_NAME')
- poll_interval_secs = float(env['POLL_INTERVAL_SECS'])
- project_id = env['GCP_PROJECT_ID']
- dataset_id = env['DATASET_ID']
- summary_table_id = env['SUMMARY_TABLE_ID']
- qps_table_id = env['QPS_TABLE_ID']
- # The following parameter is to inform us whether the stress client runs
- # forever until forcefully stopped or will it naturally stop after sometime.
- # This way, we know that the stress client process should not terminate (even
- # if it does with a success exit code) and flag the termination as a failure
- will_run_forever = env.get('WILL_RUN_FOREVER', '1')
-
- bq_helper = BigQueryHelper(run_id, image_type, pod_name, project_id,
- dataset_id, summary_table_id, qps_table_id)
- bq_helper.initialize()
-
- # Create BigQuery Dataset and Tables: Summary Table and Metrics Table
- if not bq_helper.setup_tables():
- print 'Error in creating BigQuery tables'
- return
-
- start_time = datetime.datetime.now()
-
- logfile = None
- details = 'Logging to stdout'
- if logfile_name is not None:
- print 'Opening logfile: %s ...' % logfile_name
- details = 'Logfile: %s' % logfile_name
- logfile = open(logfile_name, 'w')
-
- metrics_cmd = metrics_client_cmd + [x
- for x in metrics_client_args_str.split()]
- stress_cmd = stress_client_cmd + [x for x in args_str.split()]
-
- details = '%s, Metrics command: %s, Stress client command: %s' % (
- details, str(metrics_cmd), str(stress_cmd))
- # Update status that the test is starting (in the status table)
- bq_helper.insert_summary_row(EventType.STARTING, details)
-
- print 'Launching process %s ...' % stress_cmd
- stress_p = subprocess.Popen(args=stress_cmd,
- stdout=logfile,
- stderr=subprocess.STDOUT)
-
- qps_history = [1, 1, 1] # Maintain the last 3 qps readings
- qps_history_idx = 0 # Index into the qps_history list
-
- is_running_status_written = False
- is_error = False
- while True:
- # Check if stress_client is still running. If so, collect metrics and upload
- # to BigQuery status table
- # If stress_p.poll() is not None, it means that the stress client terminated
- if stress_p.poll() is not None:
- end_time = datetime.datetime.now().isoformat()
- event_type = EventType.SUCCESS
- details = 'End time: %s' % end_time
- if will_run_forever == '1' or stress_p.returncode != 0:
- event_type = EventType.FAILURE
- details = 'Return code = %d. End time: %s' % (stress_p.returncode,
- end_time)
- is_error = True
- bq_helper.insert_summary_row(event_type, details)
- print details
- break
-
- if not is_running_status_written:
- bq_helper.insert_summary_row(EventType.RUNNING, '')
- is_running_status_written = True
-
- # Stress client still running. Get metrics
- qps = _get_qps(metrics_cmd)
- qps_recorded_at = datetime.datetime.now().isoformat()
- print 'qps: %d at %s' % (qps, qps_recorded_at)
-
- # If QPS has been zero for the last 3 iterations, flag it as error and exit
- qps_history[qps_history_idx] = qps
- qps_history_idx = (qps_history_idx + 1) % len(qps_history)
- if sum(qps_history) == 0:
- details = 'QPS has been zero for the last %d seconds - as of : %s' % (
- poll_interval_secs * 3, qps_recorded_at)
- is_error = True
- bq_helper.insert_summary_row(EventType.FAILURE, details)
- print details
- break
-
- # Upload qps metrics to BiqQuery
- bq_helper.insert_qps_row(qps, qps_recorded_at)
-
- time.sleep(poll_interval_secs)
-
- if is_error:
- print 'Waiting indefinitely..'
- select.select([], [], [])
-
- print 'Completed'
- return
-
-
-if __name__ == '__main__':
- run_client()
diff --git a/tools/gcp/stress_test/run_node.sh b/tools/gcp/stress_test/run_node.sh
deleted file mode 100755
index 4a4da6fc8b..0000000000
--- a/tools/gcp/stress_test/run_node.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-# Copyright 2015-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.
-
-# This is a wrapper script that was created to help run_server.py and
-# run_client.py to launch 'node js' stress clients and stress servers
-source ~/.nvm/nvm.sh
-
-set -ex
-
-$@
diff --git a/tools/gcp/stress_test/run_ruby.sh b/tools/gcp/stress_test/run_ruby.sh
deleted file mode 100755
index 80d0567447..0000000000
--- a/tools/gcp/stress_test/run_ruby.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-# Copyright 2015-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.
-
-# This is a wrapper script that was created to help run_server.py and
-# run_client.py to launch 'node js' stress clients and stress servers
-source /etc/profile.d/rvm.sh
-
-set -ex
-
-$@
diff --git a/tools/gcp/stress_test/run_server.py b/tools/gcp/stress_test/run_server.py
deleted file mode 100755
index 8f47e42ef3..0000000000
--- a/tools/gcp/stress_test/run_server.py
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/usr/bin/env python2.7
-# Copyright 2015-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.
-
-import datetime
-import os
-import resource
-import select
-import subprocess
-import sys
-import time
-
-from stress_test_utils import BigQueryHelper
-from stress_test_utils import EventType
-
-
-def run_server():
- """This is a wrapper around the interop server and performs the following:
- 1) Create a 'Summary table' in Big Query to record events like the server
- started, completed successfully or failed. NOTE: This also creates
- another table called the QPS table which is currently NOT needed on the
- server (it is needed on the stress test clients)
- 2) Start the server process and add a row in Big Query summary table
- 3) Wait for the server process to terminate. The server process does not
- terminate unless there is an error.
- If the server process terminated with a failure, add a row in Big Query
- and wait forever.
- NOTE: This script typically runs inside a GKE pod which means that the
- pod gets destroyed when the script exits. However, in case the server
- process fails, we would not want the pod to be destroyed (since we
- might want to connect to the pod for examining logs). This is the
- reason why the script waits forever in case of failures.
- """
- # Set the 'core file' size to 'unlimited' so that 'core' files are generated
- # if the server crashes (Note: This is not relevant for Java and Go servers)
- resource.setrlimit(resource.RLIMIT_CORE,
- (resource.RLIM_INFINITY, resource.RLIM_INFINITY))
-
- # Read the parameters from environment variables
- env = dict(os.environ)
-
- run_id = env['RUN_ID'] # The unique run id for this test
- image_type = env['STRESS_TEST_IMAGE_TYPE']
- stress_server_cmd = env['STRESS_TEST_CMD'].split()
- args_str = env['STRESS_TEST_ARGS_STR']
- pod_name = env['POD_NAME']
- project_id = env['GCP_PROJECT_ID']
- dataset_id = env['DATASET_ID']
- summary_table_id = env['SUMMARY_TABLE_ID']
- qps_table_id = env['QPS_TABLE_ID']
- # The following parameter is to inform us whether the server runs forever
- # until forcefully stopped or will it naturally stop after sometime.
- # This way, we know that the process should not terminate (even if it does
- # with a success exit code) and flag any termination as a failure.
- will_run_forever = env.get('WILL_RUN_FOREVER', '1')
-
- logfile_name = env.get('LOGFILE_NAME')
-
- print('pod_name: %s, project_id: %s, run_id: %s, dataset_id: %s, '
- 'summary_table_id: %s, qps_table_id: %s') % (pod_name, project_id,
- run_id, dataset_id,
- summary_table_id,
- qps_table_id)
-
- bq_helper = BigQueryHelper(run_id, image_type, pod_name, project_id,
- dataset_id, summary_table_id, qps_table_id)
- bq_helper.initialize()
-
- # Create BigQuery Dataset and Tables: Summary Table and Metrics Table
- if not bq_helper.setup_tables():
- print 'Error in creating BigQuery tables'
- return
-
- start_time = datetime.datetime.now()
-
- logfile = None
- details = 'Logging to stdout'
- if logfile_name is not None:
- print 'Opening log file: ', logfile_name
- logfile = open(logfile_name, 'w')
- details = 'Logfile: %s' % logfile_name
-
- stress_cmd = stress_server_cmd + [x for x in args_str.split()]
-
- details = '%s, Stress server command: %s' % (details, str(stress_cmd))
- # Update status that the test is starting (in the status table)
- bq_helper.insert_summary_row(EventType.STARTING, details)
-
- print 'Launching process %s ...' % stress_cmd
- stress_p = subprocess.Popen(args=stress_cmd,
- stdout=logfile,
- stderr=subprocess.STDOUT)
-
- # Update the status to running if subprocess.Popen launched the server
- if stress_p.poll() is None:
- bq_helper.insert_summary_row(EventType.RUNNING, '')
-
- # Wait for the server process to terminate
- returncode = stress_p.wait()
-
- if will_run_forever == '1' or returncode != 0:
- end_time = datetime.datetime.now().isoformat()
- event_type = EventType.FAILURE
- details = 'Returncode: %d; End time: %s' % (returncode, end_time)
- bq_helper.insert_summary_row(event_type, details)
- print 'Waiting indefinitely..'
- select.select([], [], [])
- return returncode
-
-
-if __name__ == '__main__':
- run_server()
diff --git a/tools/gcp/stress_test/stress_test_utils.py b/tools/gcp/stress_test/stress_test_utils.py
deleted file mode 100755
index be50af3184..0000000000
--- a/tools/gcp/stress_test/stress_test_utils.py
+++ /dev/null
@@ -1,217 +0,0 @@
-#!/usr/bin/env python2.7
-# Copyright 2015, 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.
-
-import datetime
-import json
-import os
-import re
-import select
-import subprocess
-import sys
-import time
-
-# Import big_query_utils module
-bq_utils_dir = os.path.abspath(os.path.join(
- os.path.dirname(__file__), '../utils'))
-sys.path.append(bq_utils_dir)
-import big_query_utils as bq_utils
-
-
-class EventType:
- STARTING = 'STARTING'
- RUNNING = 'RUNNING'
- SUCCESS = 'SUCCESS'
- FAILURE = 'FAILURE'
-
-
-class BigQueryHelper:
- """Helper class for the stress test wrappers to interact with BigQuery.
- """
-
- def __init__(self, run_id, image_type, pod_name, project_id, dataset_id,
- summary_table_id, qps_table_id):
- self.run_id = run_id
- self.image_type = image_type
- self.pod_name = pod_name
- self.project_id = project_id
- self.dataset_id = dataset_id
- self.summary_table_id = summary_table_id
- self.qps_table_id = qps_table_id
-
- def initialize(self):
- self.bq = bq_utils.create_big_query()
-
- def setup_tables(self):
- return bq_utils.create_dataset(self.bq, self.project_id, self.dataset_id) \
- and self.__create_summary_table() \
- and self.__create_qps_table()
-
- def insert_summary_row(self, event_type, details):
- row_values_dict = {
- 'run_id': self.run_id,
- 'image_type': self.image_type,
- 'pod_name': self.pod_name,
- 'event_date': datetime.datetime.now().isoformat(),
- 'event_type': event_type,
- 'details': details
- }
- # row_unique_id is something that uniquely identifies the row (BigQuery uses
- # it for duplicate detection).
- row_unique_id = '%s_%s_%s' % (self.run_id, self.pod_name, event_type)
- row = bq_utils.make_row(row_unique_id, row_values_dict)
- return bq_utils.insert_rows(self.bq, self.project_id, self.dataset_id,
- self.summary_table_id, [row])
-
- def insert_qps_row(self, qps, recorded_at):
- row_values_dict = {
- 'run_id': self.run_id,
- 'pod_name': self.pod_name,
- 'recorded_at': recorded_at,
- 'qps': qps
- }
-
- # row_unique_id is something that uniquely identifies the row (BigQuery uses
- # it for duplicate detection).
- row_unique_id = '%s_%s_%s' % (self.run_id, self.pod_name, recorded_at)
- row = bq_utils.make_row(row_unique_id, row_values_dict)
- return bq_utils.insert_rows(self.bq, self.project_id, self.dataset_id,
- self.qps_table_id, [row])
-
- def check_if_any_tests_failed(self, num_query_retries=3, timeout_msec=30000):
- query = ('SELECT event_type FROM %s.%s WHERE run_id = \'%s\' AND '
- 'event_type="%s"') % (self.dataset_id, self.summary_table_id,
- self.run_id, EventType.FAILURE)
- page = None
- try:
- query_job = bq_utils.sync_query_job(self.bq, self.project_id, query)
- job_id = query_job['jobReference']['jobId']
- project_id = query_job['jobReference']['projectId']
- page = self.bq.jobs().getQueryResults(
- projectId=project_id,
- jobId=job_id,
- timeoutMs=timeout_msec).execute(num_retries=num_query_retries)
-
- if not page['jobComplete']:
- print('TIMEOUT ERROR: The query %s timed out. Current timeout value is'
- ' %d msec. Returning False (i.e assuming there are no failures)'
- ) % (query, timeout_msec)
- return False
-
- num_failures = int(page['totalRows'])
- print 'num rows: ', num_failures
- return num_failures > 0
- except:
- print 'Exception in check_if_any_tests_failed(). Info: ', sys.exc_info()
- print 'Query: ', query
-
- def print_summary_records(self, num_query_retries=3):
- line = '-' * 120
- print line
- print 'Summary records'
- print 'Run Id: ', self.run_id
- print 'Dataset Id: ', self.dataset_id
- print line
- query = ('SELECT pod_name, image_type, event_type, event_date, details'
- ' FROM %s.%s WHERE run_id = \'%s\' ORDER by event_date;') % (
- self.dataset_id, self.summary_table_id, self.run_id)
- query_job = bq_utils.sync_query_job(self.bq, self.project_id, query)
-
- print '{:<25} {:<12} {:<12} {:<30} {}'.format('Pod name', 'Image type',
- 'Event type', 'Date',
- 'Details')
- print line
- page_token = None
- while True:
- page = self.bq.jobs().getQueryResults(
- pageToken=page_token,
- **query_job['jobReference']).execute(num_retries=num_query_retries)
- rows = page.get('rows', [])
- for row in rows:
- print '{:<25} {:<12} {:<12} {:<30} {}'.format(row['f'][0]['v'],
- row['f'][1]['v'],
- row['f'][2]['v'],
- row['f'][3]['v'],
- row['f'][4]['v'])
- page_token = page.get('pageToken')
- if not page_token:
- break
-
- def print_qps_records(self, num_query_retries=3):
- line = '-' * 80
- print line
- print 'QPS Summary'
- print 'Run Id: ', self.run_id
- print 'Dataset Id: ', self.dataset_id
- print line
- query = (
- 'SELECT pod_name, recorded_at, qps FROM %s.%s WHERE run_id = \'%s\' '
- 'ORDER by recorded_at;') % (self.dataset_id, self.qps_table_id,
- self.run_id)
- query_job = bq_utils.sync_query_job(self.bq, self.project_id, query)
- print '{:<25} {:30} {}'.format('Pod name', 'Recorded at', 'Qps')
- print line
- page_token = None
- while True:
- page = self.bq.jobs().getQueryResults(
- pageToken=page_token,
- **query_job['jobReference']).execute(num_retries=num_query_retries)
- rows = page.get('rows', [])
- for row in rows:
- print '{:<25} {:30} {}'.format(row['f'][0]['v'], row['f'][1]['v'],
- row['f'][2]['v'])
- page_token = page.get('pageToken')
- if not page_token:
- break
-
- def __create_summary_table(self):
- summary_table_schema = [
- ('run_id', 'STRING', 'Test run id'),
- ('image_type', 'STRING', 'Client or Server?'),
- ('pod_name', 'STRING', 'GKE pod hosting this image'),
- ('event_date', 'STRING', 'The date of this event'),
- ('event_type', 'STRING', 'STARTING/RUNNING/SUCCESS/FAILURE'),
- ('details', 'STRING', 'Any other relevant details')
- ]
- desc = ('The table that contains STARTING/RUNNING/SUCCESS/FAILURE events '
- 'for the stress test clients and servers')
- return bq_utils.create_table(self.bq, self.project_id, self.dataset_id,
- self.summary_table_id, summary_table_schema,
- desc)
-
- def __create_qps_table(self):
- qps_table_schema = [
- ('run_id', 'STRING', 'Test run id'),
- ('pod_name', 'STRING', 'GKE pod hosting this image'),
- ('recorded_at', 'STRING', 'Metrics recorded at time'),
- ('qps', 'INTEGER', 'Queries per second')
- ]
- desc = 'The table that cointains the qps recorded at various intervals'
- return bq_utils.create_table(self.bq, self.project_id, self.dataset_id,
- self.qps_table_id, qps_table_schema, desc)
diff --git a/tools/gcp/utils/kubernetes_api.py b/tools/gcp/utils/kubernetes_api.py
deleted file mode 100755
index a8a4aad69b..0000000000
--- a/tools/gcp/utils/kubernetes_api.py
+++ /dev/null
@@ -1,269 +0,0 @@
-#!/usr/bin/env python2.7
-# Copyright 2015, 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.
-
-import requests
-import json
-
-_REQUEST_TIMEOUT_SECS = 10
-
-
-def _make_pod_config(pod_name, image_name, container_port_list, cmd_list,
- arg_list, env_dict):
- """Creates a string containing the Pod defintion as required by the Kubernetes API"""
- body = {
- 'kind': 'Pod',
- 'apiVersion': 'v1',
- 'metadata': {
- 'name': pod_name,
- 'labels': {'name': pod_name}
- },
- 'spec': {
- 'containers': [
- {
- 'name': pod_name,
- 'image': image_name,
- 'ports': [{'containerPort': port,
- 'protocol': 'TCP'}
- for port in container_port_list],
- 'imagePullPolicy': 'Always'
- }
- ]
- }
- }
-
- env_list = [{'name': k, 'value': v} for (k, v) in env_dict.iteritems()]
- if len(env_list) > 0:
- body['spec']['containers'][0]['env'] = env_list
-
- # Add the 'Command' and 'Args' attributes if they are passed.
- # Note:
- # - 'Command' overrides the ENTRYPOINT in the Docker Image
- # - 'Args' override the CMD in Docker image (yes, it is confusing!)
- if len(cmd_list) > 0:
- body['spec']['containers'][0]['command'] = cmd_list
- if len(arg_list) > 0:
- body['spec']['containers'][0]['args'] = arg_list
- return json.dumps(body)
-
-
-def _make_service_config(service_name, pod_name, service_port_list,
- container_port_list, is_headless):
- """Creates a string containing the Service definition as required by the Kubernetes API.
-
- NOTE:
- This creates either a Headless Service or 'LoadBalancer' service depending on
- the is_headless parameter. For Headless services, there is no 'type' attribute
- and the 'clusterIP' attribute is set to 'None'. Also, if the service is
- Headless, Kubernetes creates DNS entries for Pods - i.e creates DNS A-records
- mapping the service's name to the Pods' IPs
- """
- if len(container_port_list) != len(service_port_list):
- print(
- 'ERROR: container_port_list and service_port_list must be of same size')
- return ''
- body = {
- 'kind': 'Service',
- 'apiVersion': 'v1',
- 'metadata': {
- 'name': service_name,
- 'labels': {
- 'name': service_name
- }
- },
- 'spec': {
- 'ports': [],
- 'selector': {
- 'name': pod_name
- }
- }
- }
- # Populate the 'ports' list in the 'spec' section. This maps service ports
- # (port numbers that are exposed by Kubernetes) to container ports (i.e port
- # numbers that are exposed by your Docker image)
- for idx in range(len(container_port_list)):
- port_entry = {
- 'port': service_port_list[idx],
- 'targetPort': container_port_list[idx],
- 'protocol': 'TCP'
- }
- body['spec']['ports'].append(port_entry)
-
- # Make this either a LoadBalancer service or a headless service depending on
- # the is_headless parameter
- if is_headless:
- body['spec']['clusterIP'] = 'None'
- else:
- body['spec']['type'] = 'LoadBalancer'
- return json.dumps(body)
-
-
-def _print_connection_error(msg):
- print('ERROR: Connection failed. Did you remember to run Kubenetes proxy on '
- 'localhost (i.e kubectl proxy --port=<proxy_port>) ?. Error: %s' % msg)
-
-
-def _do_post(post_url, api_name, request_body):
- """Helper to do HTTP POST.
-
- Note:
- 1) On success, Kubernetes returns a success code of 201(CREATED) not 200(OK)
- 2) A response code of 509(CONFLICT) is interpreted as a success code (since
- the error is most likely due to the resource already existing). This makes
- _do_post() idempotent which is semantically desirable.
- """
- is_success = True
- try:
- r = requests.post(post_url,
- data=request_body,
- timeout=_REQUEST_TIMEOUT_SECS)
- if r.status_code == requests.codes.conflict:
- print('WARN: Looks like the resource already exists. Api: %s, url: %s' %
- (api_name, post_url))
- elif r.status_code != requests.codes.created:
- print('ERROR: %s API returned error. HTTP response: (%d) %s' %
- (api_name, r.status_code, r.text))
- is_success = False
- except (requests.exceptions.Timeout,
- requests.exceptions.ConnectionError) as e:
- is_success = False
- _print_connection_error(str(e))
- return is_success
-
-
-def _do_delete(del_url, api_name):
- """Helper to do HTTP DELETE.
-
- Note: A response code of 404(NOT_FOUND) is treated as success to keep
- _do_delete() idempotent.
- """
- is_success = True
- try:
- r = requests.delete(del_url, timeout=_REQUEST_TIMEOUT_SECS)
- if r.status_code == requests.codes.not_found:
- print('WARN: The resource does not exist. Api: %s, url: %s' %
- (api_name, del_url))
- elif r.status_code != requests.codes.ok:
- print('ERROR: %s API returned error. HTTP response: %s' %
- (api_name, r.text))
- is_success = False
- except (requests.exceptions.Timeout,
- requests.exceptions.ConnectionError) as e:
- is_success = False
- _print_connection_error(str(e))
- return is_success
-
-
-def create_service(kube_host, kube_port, namespace, service_name, pod_name,
- service_port_list, container_port_list, is_headless):
- """Creates either a Headless Service or a LoadBalancer Service depending
- on the is_headless parameter.
- """
- post_url = 'http://%s:%d/api/v1/namespaces/%s/services' % (
- kube_host, kube_port, namespace)
- request_body = _make_service_config(service_name, pod_name, service_port_list,
- container_port_list, is_headless)
- return _do_post(post_url, 'Create Service', request_body)
-
-
-def create_pod(kube_host, kube_port, namespace, pod_name, image_name,
- container_port_list, cmd_list, arg_list, env_dict):
- """Creates a Kubernetes Pod.
-
- Note that it is generally NOT considered a good practice to directly create
- Pods. Typically, the recommendation is to create 'Controllers' to create and
- manage Pods' lifecycle. Currently Kubernetes only supports 'Replication
- Controller' which creates a configurable number of 'identical Replicas' of
- Pods and automatically restarts any Pods in case of failures (for eg: Machine
- failures in Kubernetes). This makes it less flexible for our test use cases
- where we might want slightly different set of args to each Pod. Hence we
- directly create Pods and not care much about Kubernetes failures since those
- are very rare.
- """
- post_url = 'http://%s:%d/api/v1/namespaces/%s/pods' % (kube_host, kube_port,
- namespace)
- request_body = _make_pod_config(pod_name, image_name, container_port_list,
- cmd_list, arg_list, env_dict)
- return _do_post(post_url, 'Create Pod', request_body)
-
-
-def delete_service(kube_host, kube_port, namespace, service_name):
- del_url = 'http://%s:%d/api/v1/namespaces/%s/services/%s' % (
- kube_host, kube_port, namespace, service_name)
- return _do_delete(del_url, 'Delete Service')
-
-
-def delete_pod(kube_host, kube_port, namespace, pod_name):
- del_url = 'http://%s:%d/api/v1/namespaces/%s/pods/%s' % (kube_host, kube_port,
- namespace, pod_name)
- return _do_delete(del_url, 'Delete Pod')
-
-
-def create_pod_and_service(kube_host, kube_port, namespace, pod_name,
- image_name, container_port_list, cmd_list, arg_list,
- env_dict, is_headless_service):
- """A helper function that creates a pod and a service (if pod creation was successful)."""
- is_success = create_pod(kube_host, kube_port, namespace, pod_name, image_name,
- container_port_list, cmd_list, arg_list, env_dict)
- if not is_success:
- print 'Error in creating Pod'
- return False
-
- is_success = create_service(
- kube_host,
- kube_port,
- namespace,
- pod_name, # Use pod_name for service
- pod_name,
- container_port_list, # Service port list same as container port list
- container_port_list,
- is_headless_service)
- if not is_success:
- print 'Error in creating Service'
- return False
-
- print 'Successfully created the pod/service %s' % pod_name
- return True
-
-
-def delete_pod_and_service(kube_host, kube_port, namespace, pod_name):
- """ A helper function that calls delete_pod and delete_service """
- is_success = delete_pod(kube_host, kube_port, namespace, pod_name)
- if not is_success:
- print 'Error in deleting pod %s' % pod_name
- return False
-
- # Note: service name assumed to the the same as pod name
- is_success = delete_service(kube_host, kube_port, namespace, pod_name)
- if not is_success:
- print 'Error in deleting service %s' % pod_name
- return False
-
- print 'Successfully deleted the Pod/Service: %s' % pod_name
- return True
diff --git a/tools/jenkins/run_interop_stress.sh b/tools/jenkins/run_interop_stress.sh
deleted file mode 100755
index 22d81db8bc..0000000000
--- a/tools/jenkins/run_interop_stress.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2015, 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.
-#
-# This script is invoked by Jenkins and runs interop test suite.
-set -ex
-
-# Enter the gRPC repo root
-cd $(dirname $0)/../..
-
-tools/run_tests/run_stress_tests.py -l all -s all -j 12 $@ || true
diff --git a/tools/profiling/microbenchmarks/bm_diff.py b/tools/profiling/microbenchmarks/bm_diff.py
index b2d6f46047..299abb5fdb 100755
--- a/tools/profiling/microbenchmarks/bm_diff.py
+++ b/tools/profiling/microbenchmarks/bm_diff.py
@@ -56,6 +56,10 @@ _INTERESTING = (
'writes_per_iteration',
'atm_cas_per_iteration',
'atm_add_per_iteration',
+ 'cli_transport_stalls_per_iteration',
+ 'cli_stream_stalls_per_iteration',
+ 'svr_transport_stalls_per_iteration',
+ 'svr_stream_stalls_per_iteration'
'nows_per_iteration',
)
diff --git a/tools/run_tests/README.md b/tools/run_tests/README.md
index 05d33fd6b1..60f20747cd 100644
--- a/tools/run_tests/README.md
+++ b/tools/run_tests/README.md
@@ -33,7 +33,7 @@ the script also supports orchestrating test runs with client and server running
to BigQuery.
###### Example
-`tools/run_tests/run_peformance_tests.py -l c++ node`
+`tools/run_tests/run_performance_tests.py -l c++ node`
###### Useful options
- `--regex` use regex to select particular scenarios to run.
diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py
index 04702bacca..c90da066c3 100644
--- a/tools/run_tests/artifacts/artifact_targets.py
+++ b/tools/run_tests/artifacts/artifact_targets.py
@@ -202,6 +202,7 @@ class CSharpExtArtifact:
'EMBED_OPENSSL': 'true',
'EMBED_ZLIB': 'true',
'CFLAGS': '-DGPR_BACKWARDS_COMPATIBILITY_MODE',
+ 'CXXFLAGS': '-DGPR_BACKWARDS_COMPATIBILITY_MODE',
'LDFLAGS': ''}
if self.platform == 'linux':
return create_docker_jobspec(self.name,
@@ -211,6 +212,7 @@ class CSharpExtArtifact:
else:
archflag = _ARCH_FLAG_MAP[self.arch]
environ['CFLAGS'] += ' %s %s' % (archflag, _MACOS_COMPAT_FLAG)
+ environ['CXXFLAGS'] += ' %s %s' % (archflag, _MACOS_COMPAT_FLAG)
environ['LDFLAGS'] += ' %s' % archflag
return create_jobspec(self.name,
['tools/run_tests/artifacts/build_artifact_csharp.sh'],
diff --git a/tools/run_tests/dockerize/build_docker_and_run_tests.sh b/tools/run_tests/dockerize/build_docker_and_run_tests.sh
index f10916d192..731bb02d21 100755
--- a/tools/run_tests/dockerize/build_docker_and_run_tests.sh
+++ b/tools/run_tests/dockerize/build_docker_and_run_tests.sh
@@ -79,7 +79,10 @@ docker run \
-e HOST_GIT_ROOT=$git_root \
-e LOCAL_GIT_ROOT=$docker_instance_git_root \
-e "BUILD_ID=$BUILD_ID" \
+ -e "BUILD_URL=$BUILD_URL" \
+ -e "JOB_BASE_NAME=$JOB_BASE_NAME" \
-i $TTY_FLAG \
+ -v ~/.config/gcloud:/root/.config/gcloud \
-v "$git_root:$docker_instance_git_root" \
-v /tmp/ccache:/tmp/ccache \
-v /tmp/npm-cache:/tmp/npm-cache \
diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json
index e46b0d1d86..a004e8d945 100644
--- a/tools/run_tests/generated/tests.json
+++ b/tools/run_tests/generated/tests.json
@@ -41438,7 +41438,7 @@
{
"args": [
"--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"boringssl": true,
"ci_platforms": [
@@ -41867,6 +41867,206 @@
{
"args": [
"--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_client_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_ping_pong_secure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_client_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1024,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_qps_unconstrained_secure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_client_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_ping_pong_secure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_client_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": "capacity",
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_qps_unconstrained_secure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_server_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_ping_pong_secure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_server_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1024,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_qps_unconstrained_secure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_server_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_ping_pong_secure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_server_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": "capacity",
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_qps_unconstrained_secure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"boringssl": true,
@@ -42017,7 +42217,7 @@
{
"args": [
"--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"boringssl": true,
"ci_platforms": [
@@ -42446,6 +42646,206 @@
{
"args": [
"--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_client_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_ping_pong_insecure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_client_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1024,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_qps_unconstrained_insecure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_client_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_ping_pong_insecure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_client_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": "capacity",
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_qps_unconstrained_insecure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_server_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_ping_pong_insecure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_server_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1024,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_qps_unconstrained_insecure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_server_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_ping_pong_insecure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_server_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": "capacity",
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "tsan",
+ "asan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_qps_unconstrained_insecure",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"boringssl": true,
@@ -42674,7 +43074,7 @@
{
"args": [
"--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"boringssl": true,
"ci_platforms": [
@@ -43324,6 +43724,310 @@
{
"args": [
"--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_client_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_ping_pong_secure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_client_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 64,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_qps_unconstrained_secure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_client_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_ping_pong_secure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_client_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": "capacity",
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_qps_unconstrained_secure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_server_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_ping_pong_secure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_server_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 64,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_qps_unconstrained_secure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_server_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_ping_pong_secure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_server_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": "capacity",
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_qps_unconstrained_secure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"boringssl": true,
@@ -43552,7 +44256,7 @@
{
"args": [
"--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"boringssl": true,
"ci_platforms": [
@@ -44201,6 +44905,310 @@
},
{
"args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_client_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_ping_pong_insecure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_client_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 64,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_qps_unconstrained_insecure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_client_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_ping_pong_insecure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_client_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": "capacity",
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_qps_unconstrained_insecure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_server_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_ping_pong_insecure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_from_server_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 64,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_qps_unconstrained_insecure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_server_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_ping_pong_insecure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_server_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": "capacity",
+ "defaults": "boringssl",
+ "exclude_configs": [
+ "asan-noleaks",
+ "asan-trace-cmp",
+ "basicprof",
+ "c++-compat",
+ "counters",
+ "dbg",
+ "gcov",
+ "helgrind",
+ "lto",
+ "memcheck",
+ "msan",
+ "mutrace",
+ "opt",
+ "stapprof",
+ "ubsan"
+ ],
+ "excluded_poll_engines": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_qps_unconstrained_insecure_low_thread_count",
+ "timeout_seconds": 360
+ },
+ {
+ "args": [
"test/core/end2end/fuzzers/api_fuzzer_corpus/00.bin"
],
"ci_platforms": [
diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py
index 08411bf9a4..8ed675ecc3 100644
--- a/tools/run_tests/performance/scenario_config.py
+++ b/tools/run_tests/performance/scenario_config.py
@@ -53,6 +53,7 @@ HISTOGRAM_PARAMS = {
# actual target will be slightly higher)
OUTSTANDING_REQUESTS={
'async': 6400,
+ 'async-1core': 800,
'sync': 1000
}
@@ -265,7 +266,7 @@ class CXXLanguage:
rpc_type='STREAMING',
client_type='ASYNC_CLIENT',
server_type='ASYNC_GENERIC_SERVER',
- unconstrained_client='async', use_generic_payload=True,
+ unconstrained_client='async-1core', use_generic_payload=True,
async_server_threads=1,
secure=secure)
@@ -310,7 +311,7 @@ class CXXLanguage:
secure=secure,
categories=smoketest_categories + [SCALABLE])
- for rpc_type in ['unary', 'streaming']:
+ for rpc_type in ['unary', 'streaming', 'streaming_from_client', 'streaming_from_server']:
for synchronicity in ['sync', 'async']:
yield _ping_pong_scenario(
'cpp_protobuf_%s_%s_ping_pong_%s' % (synchronicity, rpc_type, secstr),
@@ -752,7 +753,7 @@ class JavaLanguage:
yield _ping_pong_scenario(
'java_generic_async_streaming_qps_one_server_core_%s' % secstr, rpc_type='STREAMING',
client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
- unconstrained_client='async', use_generic_payload=True,
+ unconstrained_client='async-1core', use_generic_payload=True,
async_server_threads=1,
secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS)
diff --git a/tools/run_tests/python_utils/jobset.py b/tools/run_tests/python_utils/jobset.py
index d01e82a76b..4e97128d46 100755
--- a/tools/run_tests/python_utils/jobset.py
+++ b/tools/run_tests/python_utils/jobset.py
@@ -222,7 +222,8 @@ class JobResult(object):
self.num_failures = 0
self.retries = 0
self.message = ''
-
+ self.cpu_estimated = 1
+ self.cpu_measured = 0
class Job(object):
"""Manages one job."""
@@ -312,7 +313,9 @@ class Job(object):
sys = float(m.group(3))
if real > 0.5:
cores = (user + sys) / real
- measurement = '; cpu_cost=%.01f; estimated=%.01f' % (cores, self._spec.cpu_cost)
+ self.result.cpu_measured = float('%.01f' % cores)
+ self.result.cpu_estimated = float('%.01f' % self._spec.cpu_cost)
+ measurement = '; cpu_cost=%.01f; estimated=%.01f' % (self.result.cpu_measured, self.result.cpu_estimated)
if not self._quiet_success:
message('PASSED', '%s [time=%.1fsec; retries=%d:%d%s]' % (
self._spec.shortname, elapsed, self._retries, self._timeout_retries, measurement),
diff --git a/tools/run_tests/python_utils/port_server.py b/tools/run_tests/python_utils/port_server.py
index e96ee0b08c..9860b92808 100755
--- a/tools/run_tests/python_utils/port_server.py
+++ b/tools/run_tests/python_utils/port_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2.7
# Copyright 2015, Google Inc.
# All rights reserved.
#
@@ -30,8 +30,6 @@
"""Manage TCP ports for unit tests; started by run_tests.py"""
-from __future__ import print_function
-
import argparse
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
import hashlib
@@ -39,18 +37,20 @@ import os
import socket
import sys
import time
+import random
from SocketServer import ThreadingMixIn
import threading
+import platform
# increment this number whenever making a change to ensure that
# the changes are picked up by running CI servers
# note that all changes must be backwards compatible
-_MY_VERSION = 14
+_MY_VERSION = 20
if len(sys.argv) == 2 and sys.argv[1] == 'dump_version':
- print(_MY_VERSION)
+ print _MY_VERSION
sys.exit(0)
@@ -66,16 +66,42 @@ if args.logfile is not None:
sys.stderr = open(args.logfile, 'w')
sys.stdout = sys.stderr
-print('port server running on port %d' % args.port)
+print 'port server running on port %d' % args.port
pool = []
in_use = {}
mu = threading.Lock()
+def can_connect(port):
+ # this test is only really useful on unices where SO_REUSE_PORT is available
+ # so on Windows, where this test is expensive, skip it
+ if platform.system() == 'Windows': return False
+ s = socket.socket()
+ try:
+ s.connect(('localhost', port))
+ return True
+ except socket.error, e:
+ return False
+ finally:
+ s.close()
+
+def can_bind(port, proto):
+ s = socket.socket(proto, socket.SOCK_STREAM)
+ s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+ try:
+ s.bind(('localhost', port))
+ return True
+ except socket.error, e:
+ return False
+ finally:
+ s.close()
+
def refill_pool(max_timeout, req):
"""Scan for ports not marked for being in use"""
- for i in range(1025, 32766):
+ chk = list(range(1025, 32766))
+ random.shuffle(chk)
+ for i in chk:
if len(pool) > 100: break
if i in in_use:
age = time.time() - in_use[i]
@@ -83,16 +109,9 @@ def refill_pool(max_timeout, req):
continue
req.log_message("kill old request %d" % i)
del in_use[i]
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
- try:
- s.bind(('localhost', i))
+ if can_bind(i, socket.AF_INET) and can_bind(i, socket.AF_INET6) and not can_connect(i):
req.log_message("found available port %d" % i)
pool.append(i)
- except:
- pass # we really don't care about failures
- finally:
- s.close()
def allocate_port(req):
@@ -120,7 +139,7 @@ keep_running = True
class Handler(BaseHTTPRequestHandler):
-
+
def setup(self):
# If the client is unreachable for 5 seconds, close the connection
self.timeout = 5
@@ -128,6 +147,7 @@ class Handler(BaseHTTPRequestHandler):
def do_GET(self):
global keep_running
+ global mu
if self.path == '/get':
# allocate a new port, it will stay bound for ten minutes and until
# it's unused
@@ -142,12 +162,15 @@ class Handler(BaseHTTPRequestHandler):
self.send_header('Content-Type', 'text/plain')
self.end_headers()
p = int(self.path[6:])
+ mu.acquire()
if p in in_use:
del in_use[p]
pool.append(p)
- self.log_message('drop known port %d' % p)
+ k = 'known'
else:
- self.log_message('drop unknown port %d' % p)
+ k = 'unknown'
+ mu.release()
+ self.log_message('drop %s port %d' % (k, p))
elif self.path == '/version_number':
# fetch a version string and the current process pid
self.send_response(200)
@@ -161,8 +184,11 @@ class Handler(BaseHTTPRequestHandler):
self.send_response(200)
self.send_header('Content-Type', 'text/plain')
self.end_headers()
+ mu.acquire()
now = time.time()
- self.wfile.write(yaml.dump({'pool': pool, 'in_use': dict((k, now - v) for k, v in in_use.items())}))
+ out = yaml.dump({'pool': pool, 'in_use': dict((k, now - v) for k, v in in_use.items())})
+ mu.release()
+ self.wfile.write(out)
elif self.path == '/quitquitquit':
self.send_response(200)
self.end_headers()
@@ -171,6 +197,4 @@ class Handler(BaseHTTPRequestHandler):
class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
"""Handle requests in a separate thread"""
-
ThreadedHTTPServer(('', args.port), Handler).serve_forever()
-
diff --git a/tools/run_tests/python_utils/report_utils.py b/tools/run_tests/python_utils/report_utils.py
index c7c0ceea92..b8dd67e060 100644
--- a/tools/run_tests/python_utils/report_utils.py
+++ b/tools/run_tests/python_utils/report_utils.py
@@ -64,19 +64,24 @@ def render_junit_xml_report(resultset, xml_report, suite_package='grpc',
root = ET.Element('testsuites')
testsuite = ET.SubElement(root, 'testsuite', id='1', package=suite_package,
name=suite_name)
+ failure_count = 0
+ error_count = 0
for shortname, results in six.iteritems(resultset):
for result in results:
xml_test = ET.SubElement(testsuite, 'testcase', name=shortname)
if result.elapsed_time:
xml_test.set('time', str(result.elapsed_time))
- ET.SubElement(xml_test, 'system-out').text = _filter_msg(result.message,
- 'XML')
+ filtered_msg = _filter_msg(result.message, 'XML')
if result.state == 'FAILED':
- ET.SubElement(xml_test, 'failure', message='Failure')
+ ET.SubElement(xml_test, 'failure', message='Failure').text = filtered_msg
+ failure_count += 1
elif result.state == 'TIMEOUT':
- ET.SubElement(xml_test, 'error', message='Timeout')
+ ET.SubElement(xml_test, 'error', message='Timeout').text = filtered_msg
+ error_count += 1
elif result.state == 'SKIPPED':
ET.SubElement(xml_test, 'skipped', message='Skipped')
+ testsuite.set('failures', str(failure_count))
+ testsuite.set('errors', str(error_count))
# ensure the report directory exists
report_dir = os.path.dirname(os.path.abspath(xml_report))
if not os.path.exists(report_dir):
@@ -84,6 +89,7 @@ def render_junit_xml_report(resultset, xml_report, suite_package='grpc',
tree = ET.ElementTree(root)
tree.write(xml_report, encoding='UTF-8')
+
def render_interop_html_report(
client_langs, server_langs, test_cases, auth_test_cases, http2_cases,
http2_server_cases, resultset,
diff --git a/tools/run_tests/python_utils/start_port_server.py b/tools/run_tests/python_utils/start_port_server.py
index deb7354438..4acc964c7b 100644
--- a/tools/run_tests/python_utils/start_port_server.py
+++ b/tools/run_tests/python_utils/start_port_server.py
@@ -27,9 +27,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from __future__ import print_function
-
-from six.moves import urllib
+import urllib
import jobset
import logging
import os
@@ -50,9 +48,9 @@ def start_port_server():
# otherwise, leave it up
try:
version = int(
- urllib.request.urlopen(
- 'http://localhost:%d/version_number' % _PORT_SERVER_PORT,
- timeout=10).read())
+ urllib.urlopen(
+ 'http://localhost:%d/version_number' %
+ _PORT_SERVER_PORT).read())
logging.info('detected port server running version %d', version)
running = True
except Exception as e:
@@ -69,8 +67,8 @@ def start_port_server():
running = (version >= current_version)
if not running:
logging.info('port_server version mismatch: killing the old one')
- urllib.request.urlopen('http://localhost:%d/quitquitquit' %
- _PORT_SERVER_PORT).read()
+ urllib.urlopen('http://localhost:%d/quitquitquit' %
+ _PORT_SERVER_PORT).read()
time.sleep(1)
if not running:
fd, logfile = tempfile.mkstemp()
@@ -109,9 +107,8 @@ def start_port_server():
# try one final time: maybe another build managed to start one
time.sleep(1)
try:
- urllib.request.urlopen(
- 'http://localhost:%d/get' % _PORT_SERVER_PORT,
- timeout=1).read()
+ urllib.urlopen(
+ 'http://localhost:%d/get' % _PORT_SERVER_PORT).read()
logging.info(
'last ditch attempt to contact port server succeeded')
break
@@ -119,18 +116,18 @@ def start_port_server():
logging.exception(
'final attempt to contact port server failed')
port_log = open(logfile, 'r').read()
- print(port_log)
+ print port_log
sys.exit(1)
try:
port_server_url = 'http://localhost:%d/get' % _PORT_SERVER_PORT
- urllib.request.urlopen(port_server_url, timeout=1).read()
+ urllib.urlopen(port_server_url).read()
logging.info('port server is up and ready')
break
except socket.timeout:
logging.exception('while waiting for port_server')
time.sleep(1)
waits += 1
- except urllib.error.URLError:
+ except IOError:
logging.exception('while waiting for port_server')
time.sleep(1)
waits += 1
diff --git a/tools/run_tests/python_utils/upload_test_results.py b/tools/run_tests/python_utils/upload_test_results.py
new file mode 100644
index 0000000000..d076d1e5a2
--- /dev/null
+++ b/tools/run_tests/python_utils/upload_test_results.py
@@ -0,0 +1,113 @@
+#!/usr/bin/env python
+# Copyright 2017, 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.
+
+"""Helper to upload Jenkins test results to BQ"""
+
+from __future__ import print_function
+
+import os
+import six
+import sys
+import time
+import uuid
+
+gcp_utils_dir = os.path.abspath(os.path.join(
+ os.path.dirname(__file__), '../../gcp/utils'))
+sys.path.append(gcp_utils_dir)
+import big_query_utils
+
+_DATASET_ID = 'jenkins_test_results'
+_DESCRIPTION = 'Test results from master job run on Jenkins'
+_PROJECT_ID = 'grpc-testing'
+_RESULTS_SCHEMA = [
+ ('job_name', 'STRING', 'Name of Jenkins job'),
+ ('build_id', 'INTEGER', 'Build ID of Jenkins job'),
+ ('build_url', 'STRING', 'URL of Jenkins job'),
+ ('test_name', 'STRING', 'Individual test name'),
+ ('language', 'STRING', 'Language of test'),
+ ('platform', 'STRING', 'Platform used for test'),
+ ('config', 'STRING', 'Config used for test'),
+ ('compiler', 'STRING', 'Compiler used for test'),
+ ('iomgr_platform', 'STRING', 'Iomgr used for test'),
+ ('result', 'STRING', 'Test result: PASSED, TIMEOUT, FAILED, or SKIPPED'),
+ ('timestamp', 'TIMESTAMP', 'Timestamp of test run'),
+ ('elapsed_time', 'FLOAT', 'How long test took to run'),
+ ('cpu_estimated', 'FLOAT', 'Estimated CPU usage of test'),
+ ('cpu_measured', 'FLOAT', 'Actual CPU usage of test'),
+]
+
+
+def _get_build_metadata(test_results):
+ """Add Jenkins build metadata to test_results based on environment variables set by Jenkins."""
+ build_id = os.getenv('BUILD_ID')
+ build_url = os.getenv('BUILD_URL')
+ job_name = os.getenv('JOB_BASE_NAME')
+
+ if build_id:
+ test_results['build_id'] = build_id
+ if build_url:
+ test_results['build_url'] = build_url
+ if job_name:
+ test_results['job_name'] = job_name
+
+def upload_results_to_bq(resultset, bq_table, args, platform):
+ """Upload test results to a BQ table.
+
+ Args:
+ resultset: dictionary generated by jobset.run
+ bq_table: string name of table to create/upload results to in BQ
+ args: args in run_tests.py, generated by argparse
+ platform: string name of platform tests were run on
+ """
+ bq = big_query_utils.create_big_query()
+ big_query_utils.create_table(bq, _PROJECT_ID, _DATASET_ID, bq_table, _RESULTS_SCHEMA, _DESCRIPTION)
+
+ for shortname, results in six.iteritems(resultset):
+ for result in results:
+ test_results = {}
+ _get_build_metadata(test_results)
+ test_results['compiler'] = args.compiler
+ test_results['config'] = args.config
+ test_results['cpu_estimated'] = result.cpu_estimated
+ test_results['cpu_measured'] = result.cpu_measured
+ test_results['elapsed_time'] = '%.2f' % result.elapsed_time
+ test_results['iomgr_platform'] = args.iomgr_platform
+ # args.language is a list, but will always have one element in the contexts
+ # this function is used.
+ test_results['language'] = args.language[0]
+ test_results['platform'] = platform
+ test_results['result'] = result.state
+ test_results['test_name'] = shortname
+ test_results['timestamp'] = time.strftime('%Y-%m-%d %H:%M:%S')
+
+ row = big_query_utils.make_row(str(uuid.uuid4()), test_results)
+ if not big_query_utils.insert_rows(bq, _PROJECT_ID, _DATASET_ID, bq_table, [row]):
+ print('Error uploading result to bigquery.')
+ sys.exit(1)
diff --git a/tools/run_tests/run_stress_tests.py b/tools/run_tests/run_stress_tests.py
deleted file mode 100755
index 4eea02118e..0000000000
--- a/tools/run_tests/run_stress_tests.py
+++ /dev/null
@@ -1,331 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2015, 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.
-"""Run stress test in C++"""
-
-from __future__ import print_function
-
-import argparse
-import atexit
-import itertools
-import json
-import multiprocessing
-import os
-import re
-import subprocess
-import sys
-import tempfile
-import time
-import uuid
-import six
-
-import python_utils.dockerjob as dockerjob
-import python_utils.jobset as jobset
-
-# Docker doesn't clean up after itself, so we do it on exit.
-atexit.register(lambda: subprocess.call(['stty', 'echo']))
-
-ROOT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..'))
-os.chdir(ROOT)
-
-_DEFAULT_SERVER_PORT = 8080
-_DEFAULT_METRICS_PORT = 8081
-_DEFAULT_TEST_CASES = 'empty_unary:20,large_unary:20,client_streaming:20,server_streaming:20,empty_stream:20'
-_DEFAULT_NUM_CHANNELS_PER_SERVER = 5
-_DEFAULT_NUM_STUBS_PER_CHANNEL = 10
-
-# 15 mins default
-_DEFAULT_TEST_DURATION_SECS = 900
-
-class CXXLanguage:
-
- def __init__(self):
- self.client_cwd = None
- self.server_cwd = None
- self.safename = 'cxx'
-
- def client_cmd(self, args):
- return ['bins/opt/stress_test'] + args
-
- def server_cmd(self, args):
- return ['bins/opt/interop_server'] + args
-
- def global_env(self):
- return {}
-
- def __str__(self):
- return 'c++'
-
-
-_LANGUAGES = {'c++': CXXLanguage(),}
-
-# languages supported as cloud_to_cloud servers
-_SERVERS = ['c++']
-
-DOCKER_WORKDIR_ROOT = '/var/local/git/grpc'
-
-
-def docker_run_cmdline(cmdline, image, docker_args=[], cwd=None, environ=None):
- """Wraps given cmdline array to create 'docker run' cmdline from it."""
- docker_cmdline = ['docker', 'run', '-i', '--rm=true']
-
- # turn environ into -e docker args
- if environ:
- for k, v in environ.items():
- docker_cmdline += ['-e', '%s=%s' % (k, v)]
-
- # set working directory
- workdir = DOCKER_WORKDIR_ROOT
- if cwd:
- workdir = os.path.join(workdir, cwd)
- docker_cmdline += ['-w', workdir]
-
- docker_cmdline += docker_args + [image] + cmdline
- return docker_cmdline
-
-
-def bash_login_cmdline(cmdline):
- """Creates bash -l -c cmdline from args list."""
- # Use login shell:
- # * rvm and nvm require it
- # * makes error messages clearer if executables are missing
- return ['bash', '-l', '-c', ' '.join(cmdline)]
-
-
-def _job_kill_handler(job):
- if job._spec.container_name:
- dockerjob.docker_kill(job._spec.container_name)
- # When the job times out and we decide to kill it,
- # we need to wait a before restarting the job
- # to prevent "container name already in use" error.
- # TODO(jtattermusch): figure out a cleaner way to to this.
- time.sleep(2)
-
-
-def cloud_to_cloud_jobspec(language,
- test_cases,
- server_addresses,
- test_duration_secs,
- num_channels_per_server,
- num_stubs_per_channel,
- metrics_port,
- docker_image=None):
- """Creates jobspec for cloud-to-cloud interop test"""
- cmdline = bash_login_cmdline(language.client_cmd([
- '--test_cases=%s' % test_cases, '--server_addresses=%s' %
- server_addresses, '--test_duration_secs=%s' % test_duration_secs,
- '--num_stubs_per_channel=%s' % num_stubs_per_channel,
- '--num_channels_per_server=%s' % num_channels_per_server,
- '--metrics_port=%s' % metrics_port
- ]))
- print(cmdline)
- cwd = language.client_cwd
- environ = language.global_env()
- if docker_image:
- container_name = dockerjob.random_name('interop_client_%s' %
- language.safename)
- cmdline = docker_run_cmdline(
- cmdline,
- image=docker_image,
- environ=environ,
- cwd=cwd,
- docker_args=['--net=host', '--name', container_name])
- cwd = None
-
- test_job = jobset.JobSpec(cmdline=cmdline,
- cwd=cwd,
- environ=environ,
- shortname='cloud_to_cloud:%s:%s_server:stress_test' % (
- language, server_name),
- timeout_seconds=test_duration_secs * 2,
- flake_retries=0,
- timeout_retries=0,
- kill_handler=_job_kill_handler)
- test_job.container_name = container_name
- return test_job
-
-
-def server_jobspec(language, docker_image, test_duration_secs):
- """Create jobspec for running a server"""
- container_name = dockerjob.random_name('interop_server_%s' %
- language.safename)
- cmdline = bash_login_cmdline(language.server_cmd(['--port=%s' %
- _DEFAULT_SERVER_PORT]))
- environ = language.global_env()
- docker_cmdline = docker_run_cmdline(
- cmdline,
- image=docker_image,
- cwd=language.server_cwd,
- environ=environ,
- docker_args=['-p', str(_DEFAULT_SERVER_PORT), '--name', container_name])
-
- server_job = jobset.JobSpec(cmdline=docker_cmdline,
- environ=environ,
- shortname='interop_server_%s' % language,
- timeout_seconds=test_duration_secs * 3)
- server_job.container_name = container_name
- return server_job
-
-
-def build_interop_stress_image_jobspec(language, tag=None):
- """Creates jobspec for building stress test docker image for a language"""
- if not tag:
- tag = 'grpc_interop_stress_%s:%s' % (language.safename, uuid.uuid4())
- env = {'INTEROP_IMAGE': tag,
- 'BASE_NAME': 'grpc_interop_stress_%s' % language.safename}
- build_job = jobset.JobSpec(cmdline=['tools/run_tests/dockerize/build_interop_stress_image.sh'],
- environ=env,
- shortname='build_docker_%s' % (language),
- timeout_seconds=30 * 60)
- build_job.tag = tag
- return build_job
-
-argp = argparse.ArgumentParser(description='Run stress tests.')
-argp.add_argument('-l',
- '--language',
- choices=['all'] + sorted(_LANGUAGES),
- nargs='+',
- default=['all'],
- help='Clients to run.')
-argp.add_argument('-j', '--jobs', default=multiprocessing.cpu_count(), type=int)
-argp.add_argument(
- '-s',
- '--server',
- choices=['all'] + sorted(_SERVERS),
- action='append',
- help='Run cloud_to_cloud servers in a separate docker ' + 'image.',
- default=[])
-argp.add_argument(
- '--override_server',
- action='append',
- type=lambda kv: kv.split('='),
- help=
- 'Use servername=HOST:PORT to explicitly specify a server. E.g. '
- 'csharp=localhost:50000',
- default=[])
-argp.add_argument('--test_duration_secs',
- help='The duration of the test in seconds',
- default=_DEFAULT_TEST_DURATION_SECS)
-
-args = argp.parse_args()
-
-servers = set(
- s
- for s in itertools.chain.from_iterable(_SERVERS if x == 'all' else [x]
- for x in args.server))
-
-languages = set(_LANGUAGES[l] for l in itertools.chain.from_iterable(
- six.iterkeys(_LANGUAGES) if x == 'all' else [x] for x in args.language))
-
-docker_images = {}
-# languages for which to build docker images
-languages_to_build = set(
- _LANGUAGES[k]
- for k in set([str(l) for l in languages] + [s for s in servers]))
-build_jobs = []
-for l in languages_to_build:
- job = build_interop_stress_image_jobspec(l)
- docker_images[str(l)] = job.tag
- build_jobs.append(job)
-
-if build_jobs:
- jobset.message('START', 'Building interop docker images.', do_newline=True)
- num_failures, _ = jobset.run(build_jobs,
- newline_on_success=True,
- maxjobs=args.jobs)
- if num_failures == 0:
- jobset.message('SUCCESS',
- 'All docker images built successfully.',
- do_newline=True)
- else:
- jobset.message('FAILED',
- 'Failed to build interop docker images.',
- do_newline=True)
- for image in six.itervalues(docker_images):
- dockerjob.remove_image(image, skip_nonexistent=True)
- sys.exit(1)
-
-# Start interop servers.
-server_jobs = {}
-server_addresses = {}
-try:
- for s in servers:
- lang = str(s)
- spec = server_jobspec(_LANGUAGES[lang], docker_images.get(lang), args.test_duration_secs)
- job = dockerjob.DockerJob(spec)
- server_jobs[lang] = job
- server_addresses[lang] = ('localhost',
- job.mapped_port(_DEFAULT_SERVER_PORT))
-
- jobs = []
-
- for server in args.override_server:
- server_name = server[0]
- (server_host, server_port) = server[1].split(':')
- server_addresses[server_name] = (server_host, server_port)
-
- for server_name, server_address in server_addresses.items():
- (server_host, server_port) = server_address
- for language in languages:
- test_job = cloud_to_cloud_jobspec(
- language,
- _DEFAULT_TEST_CASES,
- ('%s:%s' % (server_host, server_port)),
- args.test_duration_secs,
- _DEFAULT_NUM_CHANNELS_PER_SERVER,
- _DEFAULT_NUM_STUBS_PER_CHANNEL,
- _DEFAULT_METRICS_PORT,
- docker_image=docker_images.get(str(language)))
- jobs.append(test_job)
-
- if not jobs:
- print('No jobs to run.')
- for image in six.itervalues(docker_images):
- dockerjob.remove_image(image, skip_nonexistent=True)
- sys.exit(1)
-
- num_failures, resultset = jobset.run(jobs,
- newline_on_success=True,
- maxjobs=args.jobs)
- if num_failures:
- jobset.message('FAILED', 'Some tests failed', do_newline=True)
- else:
- jobset.message('SUCCESS', 'All tests passed', do_newline=True)
-
-finally:
- # Check if servers are still running.
- for server, job in server_jobs.items():
- if not job.is_running():
- print('Server "%s" has exited prematurely.' % server)
-
- dockerjob.finish_jobs([j for j in six.itervalues(server_jobs)])
-
- for image in six.itervalues(docker_images):
- print('Removing docker image %s' % image)
- dockerjob.remove_image(image)
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 62e92c3d1d..22891c5c98 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -60,7 +60,10 @@ import python_utils.jobset as jobset
import python_utils.report_utils as report_utils
import python_utils.watch_dirs as watch_dirs
import python_utils.start_port_server as start_port_server
-
+try:
+ from python_utils.upload_test_results import upload_results_to_bq
+except (ImportError):
+ pass # It's ok to not import because this is only necessary to upload results to BQ.
_ROOT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..'))
os.chdir(_ROOT)
@@ -1185,7 +1188,7 @@ argp.add_argument('--build_only',
default=False,
action='store_const',
const=True,
- help='Perform all the build steps but dont run any tests.')
+ help='Perform all the build steps but don\'t run any tests.')
argp.add_argument('--measure_cpu_costs', default=False, action='store_const', const=True,
help='Measure the cpu costs of tests')
argp.add_argument('--update_submodules', default=[], nargs='*',
@@ -1200,11 +1203,16 @@ argp.add_argument('--quiet_success',
default=False,
action='store_const',
const=True,
- help='Dont print anything when a test passes. Passing tests also will not be reported in XML report. ' +
+ help='Don\'t print anything when a test passes. Passing tests also will not be reported in XML report. ' +
'Useful when running many iterations of each test (argument -n).')
argp.add_argument('--force_default_poller', default=False, action='store_const', const=True,
- help='Dont try to iterate over many polling strategies when they exist')
+ help='Don\'t try to iterate over many polling strategies when they exist')
argp.add_argument('--max_time', default=-1, type=int, help='Maximum test runtime in seconds')
+argp.add_argument('--bq_result_table',
+ default='',
+ type=str,
+ nargs='?',
+ help='Upload test results to a specified BQ table.')
args = argp.parse_args()
if args.force_default_poller:
@@ -1503,6 +1511,8 @@ def _build_and_run(
finally:
for antagonist in antagonists:
antagonist.kill()
+ if args.bq_result_table and resultset:
+ upload_results_to_bq(resultset, args.bq_result_table, args, platform_string())
if xml_report and resultset:
report_utils.render_junit_xml_report(resultset, xml_report,
suite_name=args.report_suite_name)
diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py
index f45bb194a1..884d626469 100755
--- a/tools/run_tests/run_tests_matrix.py
+++ b/tools/run_tests/run_tests_matrix.py
@@ -169,7 +169,7 @@ def _create_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS):
# sanitizers
test_jobs += _generate_jobs(languages=['c'],
- configs=['msan', 'asan', 'tsan'],
+ configs=['msan', 'asan', 'tsan', 'ubsan'],
platforms=['linux'],
labels=['sanitizers'],
extra_args=extra_args,
@@ -208,7 +208,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
extra_args=extra_args,
inner_jobs=inner_jobs)
- for compiler in ['gcc4.8', 'gcc5.3',
+ for compiler in ['gcc4.8', 'gcc5.3', 'gcc_musl',
'clang3.5', 'clang3.6', 'clang3.7']:
test_jobs += _generate_jobs(languages=['c++'],
configs=['dbg'],
@@ -267,6 +267,15 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
extra_args=extra_args,
inner_jobs=inner_jobs)
+ test_jobs += _generate_jobs(languages=['python'],
+ configs=['dbg'],
+ platforms=['linux'],
+ arch='default',
+ compiler='python_alpine',
+ labels=['portability'],
+ extra_args=extra_args,
+ inner_jobs=inner_jobs)
+
test_jobs += _generate_jobs(languages=['csharp'],
configs=['dbg'],
platforms=['linux'],
@@ -387,6 +396,11 @@ if __name__ == "__main__":
const=True,
help='Put reports into subdirectories to improve presentation of '
'results by Internal CI.')
+ argp.add_argument('--bq_result_table',
+ default='',
+ type=str,
+ nargs='?',
+ help='Upload test results to a specified BQ table.')
args = argp.parse_args()
if args.internal_ci:
@@ -403,6 +417,10 @@ if __name__ == "__main__":
extra_args.append('--quiet_success')
if args.max_time > 0:
extra_args.extend(('--max_time', '%d' % args.max_time))
+ if args.bq_result_table:
+ extra_args.append('--bq_result_table')
+ extra_args.append('%s' % args.bq_result_table)
+ extra_args.append('--measure_cpu_costs')
all_jobs = _create_test_jobs(extra_args=extra_args, inner_jobs=args.inner_jobs) + \
_create_portability_test_jobs(extra_args=extra_args, inner_jobs=args.inner_jobs)
diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh
index 6be7a39d07..43d05212e8 100755
--- a/tools/run_tests/sanity/check_submodules.sh
+++ b/tools/run_tests/sanity/check_submodules.sh
@@ -46,7 +46,7 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules
886e7d75368e3f4fab3f4d0d3584e4abfc557755 third_party/boringssl-with-bazel (version_for_cocoapods_7.0-857-g886e7d7)
30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e third_party/gflags (v2.2.0)
ec44c6c1675c25b9827aacd08c02433cccde7780 third_party/googletest (release-1.8.0)
- 593e917c176b5bc5aafa57bf9f6030d749d91cd5 third_party/protobuf (v3.1.0-alpha-1-326-g593e917)
+ a6189acd18b00611c1dc7042299ad75486f08a1a third_party/protobuf (v3.3.0)
cacf7f1d4e3d44d871b605da3b647f07d718623f third_party/zlib (v1.2.11)
7691f773af79bf75a62d1863fd0f13ebf9dc51b1 third_party/cares/cares (1.12.0)
EOF
diff --git a/tools/run_tests/start_port_server.py b/tools/run_tests/start_port_server.py
index bfd72222b6..f7c9f43665 100755
--- a/tools/run_tests/start_port_server.py
+++ b/tools/run_tests/start_port_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2.7
# Copyright 2017, Google Inc.
# All rights reserved.
@@ -39,10 +39,8 @@ The path to this file is called out in test/core/util/port.c, and printed as
an error message to users.
"""
-from __future__ import print_function
-
import python_utils.start_port_server as start_port_server
start_port_server.start_port_server()
-print("Port server started successfully")
+print "Port server started successfully"
diff --git a/tools/run_tests/stress_test/README.md b/tools/run_tests/stress_test/README.md
deleted file mode 100644
index cc82b875cd..0000000000
--- a/tools/run_tests/stress_test/README.md
+++ /dev/null
@@ -1,76 +0,0 @@
-Running Stress tests on Google Container Engine
-=======================================
-
-### **Glossary**:
-* GCP: Google Cloud Platform
-* GCE: Google Compute Engine
-* GKE: Google Container Engine
-* GCP console: https://console.cloud.google.com
-
-### **Setup Instructions**
-#### *On GCP:*
-1. Login to GCP with your Google account (for example, your @gmail account) at https://cloud.google.com. If do not have a Google account, you will have to create an account first.
-2. Enable billing on Google cloud platform. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (see the '*Enable billing*' section).
-3. Create a Project from the [GCP console](https://console.cloud.google.com).i.e Click on the project dropdown box on the top right (to the right of the search box) and click '*Create a project*' option.
-4. Enable the Container Engine API. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (See the '*Enable the Container Engine API*’ section). Alternatively, you can do the following:
- - Click on the '*Products & Services*' icon on the top left (i.e the icon with three small horizontal bars) and select '*API Manager*'
- - Select the '*Container Engine API*' under '*Google Cloud APIs*' on the main page. Note that you might have to click on '*More*' under '*Google Cloud APIs*' to see the '*Container Engine API*' link
- - Click on the '*Enable*' button. If the API is already enabled, the button's label would be '*Disable*' instead (do NOT click the button if its label is '*Disable*')
-5. Create a Cluster from the GCP console.
- - Go to the Container Engine section from GCP console i.e: Click on the '*Products & Services*' icon on the top left (i.e the icon with three small horizontal bars) and click on '*Container Engine*'
- - Click '*Create Container Cluster*' and follow the instructions.
- - The instructions for 'Name/Zone/MachineType' etc are [here](https://cloud.google.com/container-engine/docs/clusters/operations) (**NOTE**: The page also has instructions to setting up default clusters and configuring `kubectl`. We will be doing that later)
- - For the cluster size, a smaller size of < 10 GCE instances is good enough for our use cases - assuming that we are planning to run a reasonably small number of stress client instances. For the machine type, something like '2 vCPUs 7.5 GB' (available in the drop down box) should be good enough.
- - **IMPORTANT**: Before hitting the '*Create*' button, click on '*More*' link just above the '*Create*' button and Select '*Enabled*' for BigQuery , '*Enabled*' for Cloud Platform and '*Read/Write*' for Cloud User Accounts.
- - Create the cluster by clicking '*Create*' button.
-
-#### *On your machine* (or the machine from which stress tests on GKE are launched):
-1. You need a working gRPC repository on your machine. If you do not have it, clone the grpc repository from github (https://github.com/grpc/grpc) and follow the instructions [here](https://github.com/grpc/grpc/blob/master/INSTALL.md)
-2. Install Docker. Instructions [here](https://docs.docker.com/engine/installation/)
-3. Install Google Cloud SDK. Instructions [here](https://cloud.google.com/sdk/). This installs the `gcloud` tool
-4. Install `kubectl`, Kubernetes command line tool using `gcloud`. i.e
- - `$ gcloud components update kubectl`
- - NOTE: If you are running this from a GCE instance, the command may fail with the following error:
- ```
- You cannot perform this action because this Cloud SDK installation is
- managed by an external package manager. If you would like to get the
- latest version, please see our main download page at:
-
- https://developers.google.com/cloud/sdk/
-
- ERROR: (gcloud.components.update) The component manager is disabled for this installation
- ```
- -- If so, you will have to manually install Cloud SDK by doing the following
- ```shell
- $ # The following installs latest Cloud SDK and updates the PATH
- $ # (Accept the default values when prompted)
- $ curl https://sdk.cloud.google.com | bash
- $ exec -l $SHELL
- $ # Set the defaults. Pick the default GCE credentials when prompted (The service account
- $ # name will have a name similar to: "xxx-compute@developer.gserviceaccount.com")
- $ gcloud init
- ```
-
-5. Install Google python client apis:
- - `‘$ sudo pip install --upgrade google-api-python-client’`
- - **Note**: Do `$ sudo apt-get install python-pip` (or `$ easy_install -U pip`) if you do not have pip
-6. Install the `requests` Python package if you don’t have it already by doing `sudo pip install requests`. More details regarding `requests` package are [here](http://docs.python-requests.org/en/master/user/install/)
-7. Set the `gcloud` defaults: See the instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) under "*Set gcloud defaults*" section)
- - Make sure you also fetch the cluster credentials for `kubectl` command to use. I.e `$ gcloud container clusters get-credentials CLUSTER_NAME`
-
-### **Launching Stress tests**
-
-The stress tests are launched by the following script (path is relative to GRPC root directory) :
-`tools/run_tests/stress_test/run_stress_tests_on_gke.py`
-
-You can find out more details by using the `--help` flag.
- - `<grpc_root_dir>$ tools/run_tests/stress_test/run_on_gke.py --help`
-
-> **Example**
-> ```bash
-> $ # Change to the grpc root directory
-> $ cd $GRPC_ROOT
-> $ tools/run_tests/stress_test/run_on_gke.py --project_id=sree-gce --config_file=tools/run_tests/stress_test/configs/opt.json
-> ```
-
-> The above runs the stress test on GKE under the project `sree-gce` in the default cluster (that you set by `gcloud` command earlier). The test settings (like number of client instances, servers, the parmeters to pass, test cases etc) are all loaded from the config file `$GRPC_ROOT/tools/run_tests/stress_test/opt.json`
diff --git a/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md b/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md
deleted file mode 100644
index 9f079beebc..0000000000
--- a/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md
+++ /dev/null
@@ -1,25 +0,0 @@
-Stress Test client Specification
-=========================
-This document specifies the features a stress test client should implement in order to work with the stress testing framework. The stress test clients are executed against the existing interop test servers.
-
-**Requirements**
---------------
-**1.** A stress test client should be able to repeatedly execute one or more of the existing 'interop test cases'. It may just be a wrapper around the existing interop test client. The exact command line arguments the client should support are listed in _Table 1_ below.
-
-**2.** The stress test client must implement a metrics server defined by _[metrics.proto](https://github.com/grpc/grpc/blob/master/src/proto/grpc/testing/metrics.proto)_ and must expose _qps_ as a `Long`-valued Gauge. The client can track the overall _qps_ in one Gauge or in multiple Gauges (for example: One per Channel or Stub).
- The framework periodically queries the _qps_ by calling the `GetAllGauges()` method (the framework assumes that all the returned Gauges are _qps_ Gauges and adds them up to determine the final qps) and uses this to determine if the stress test client is running or crashed or stalled.
-> *Note:* In this context, the term _**qps**_ means _interop test cases per second_ (not _messages per second_ or _rpc calls per second_)
-
-
-**Table 1:** Command line arguments that should be supported by the stress test client.
-
->_**Note** The current C++ [stress client](https://github.com/grpc/grpc/blob/master/test/cpp/interop/stress_test.cc) supports more flags than those listed here but those flags will soon be deprecated._
-
-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
-`--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
diff --git a/tools/run_tests/stress_test/configs/asan.json b/tools/run_tests/stress_test/configs/asan.json
deleted file mode 100644
index 7ae11ccbf1..0000000000
--- a/tools/run_tests/stress_test/configs/asan.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "dockerImages": {
- "grpc_stress_cxx_asan" : {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_cxx",
- "buildType": "asan"
- }
- },
-
- "clientTemplates": {
- "baseTemplates": {
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
- "pollIntervalSecs": 120,
- "clientArgs": {
- "num_channels_per_server":5,
- "num_stubs_per_channel":10,
- "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
- "metrics_port": 8081
- },
- "metricsPort": 8081,
- "metricsArgs": {
- "metrics_server_address": "localhost:8081",
- "total_only": "true"
- }
- }
- },
- "templates": {
- "cxx_client_asan": {
- "baseTemplate": "default",
- "stressClientCmd": ["/var/local/git/grpc/bins/asan/stress_test"],
- "metricsClientCmd": ["/var/local/git/grpc/bins/asan/metrics_client"]
- }
- }
- },
-
- "serverTemplates": {
- "baseTemplates":{
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
- "serverPort": 8080,
- "serverArgs": {
- "port": 8080
- }
- }
- },
- "templates": {
- "cxx_server_asan": {
- "baseTemplate": "default",
- "stressServerCmd": ["/var/local/git/grpc/bins/asan/interop_server"]
- }
- }
- },
-
- "testMatrix": {
- "serverPodSpecs": {
- "stress-server-asan": {
- "serverTemplate": "cxx_server_asan",
- "dockerImage": "grpc_stress_cxx_asan",
- "numInstances": 1
- }
- },
-
- "clientPodSpecs": {
- "stress-client-asan": {
- "clientTemplate": "cxx_client_asan",
- "dockerImage": "grpc_stress_cxx_asan",
- "numInstances": 5,
- "serverPodSpec": "stress-server-asan"
- }
- }
- },
-
- "globalSettings": {
- "buildDockerImages": true,
- "pollIntervalSecs": 60,
- "testDurationSecs": 7200,
- "kubernetesProxyPort": 8003,
- "datasetIdNamePrefix": "stress_test_asan",
- "summaryTableId": "summary",
- "qpsTableId": "qps",
- "podWarmupSecs": 60
- }
-}
-
diff --git a/tools/run_tests/stress_test/configs/csharp.json b/tools/run_tests/stress_test/configs/csharp.json
deleted file mode 100644
index c438e08964..0000000000
--- a/tools/run_tests/stress_test/configs/csharp.json
+++ /dev/null
@@ -1,91 +0,0 @@
-{
- "dockerImages": {
- "grpc_stress_csharp" : {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_csharp"
- }
- },
-
- "clientTemplates": {
- "baseTemplates": {
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
- "pollIntervalSecs": 100,
- "clientArgs": {
- "num_channels_per_server":5,
- "num_stubs_per_channel":10,
- "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
- "metrics_port": 8081
- },
- "metricsPort": 8081,
- "metricsArgs": {
- "metrics_server_address": "localhost:8081",
- "total_only": "true",
- "deadline_secs": 60
- }
- }
- },
- "templates": {
- "csharp_client": {
- "baseTemplate": "default",
- "stressClientCmd": [
- "mono",
- "/var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.StressClient/bin/Debug/Grpc.IntegrationTesting.StressClient.exe"
- ],
- "metricsClientCmd": ["/var/local/git/grpc/bins/opt/metrics_client"]
- }
- }
- },
-
- "serverTemplates": {
- "baseTemplates":{
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
- "serverPort": 8080,
- "serverArgs": {
- "port": 8080
- }
- }
- },
- "templates": {
- "csharp_server": {
- "baseTemplate": "default",
- "stressServerCmd": [
- "mono",
- "/var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Server/bin/Debug/Grpc.IntegrationTesting.Server.exe"
- ]
- }
- }
- },
-
- "testMatrix": {
- "serverPodSpecs": {
- "stress-server-csharp": {
- "serverTemplate": "csharp_server",
- "dockerImage": "grpc_stress_csharp",
- "numInstances": 1
- }
- },
-
- "clientPodSpecs": {
- "stress-client-csharp": {
- "clientTemplate": "csharp_client",
- "dockerImage": "grpc_stress_csharp",
- "numInstances": 10,
- "serverPodSpec": "stress-server-csharp"
- }
- }
- },
-
- "globalSettings": {
- "buildDockerImages": true,
- "pollIntervalSecs": 100,
- "testDurationSecs": 7200,
- "kubernetesProxyPort": 8009,
- "datasetIdNamePrefix": "stress_test_csharp",
- "summaryTableId": "summary",
- "qpsTableId": "qps",
- "podWarmupSecs": 60
- }
-}
-
diff --git a/tools/run_tests/stress_test/configs/go.json b/tools/run_tests/stress_test/configs/go.json
deleted file mode 100644
index f1b2b523d3..0000000000
--- a/tools/run_tests/stress_test/configs/go.json
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "dockerImages": {
- "grpc_stress_go" : {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_go"
- }
- },
-
- "clientTemplates": {
- "baseTemplates": {
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
- "pollIntervalSecs": 60,
- "clientArgs": {
- "num_channels_per_server":5,
- "num_stubs_per_channel":10,
- "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
- "metrics_port": 8081
- },
- "metricsPort": 8081,
- "metricsArgs": {
- "metrics_server_address": "localhost:8081",
- "total_only": "true"
- }
- }
- },
- "templates": {
- "go_client": {
- "baseTemplate": "default",
- "stressClientCmd": [
- "go",
- "run",
- "/go/src/google.golang.org/grpc/stress/client/main.go"
- ],
- "metricsClientCmd": [
- "go",
- "run",
- "/go/src/google.golang.org/grpc/stress/metrics_client/main.go"
- ]
- }
- }
- },
-
- "serverTemplates": {
- "baseTemplates":{
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
- "serverPort": 8080,
- "serverArgs": {
- "port": 8080
- }
- }
- },
- "templates": {
- "go_server": {
- "baseTemplate": "default",
- "stressServerCmd": [
- "go",
- "run",
- "/go/src/google.golang.org/grpc/interop/server/server.go"
- ]
- }
- }
- },
-
- "testMatrix": {
- "serverPodSpecs": {
- "go-stress-server": {
- "serverTemplate": "go_server",
- "dockerImage": "grpc_stress_go",
- "numInstances": 1
- }
- },
-
- "clientPodSpecs": {
- "go-stress-client": {
- "clientTemplate": "go_client",
- "dockerImage": "grpc_stress_go",
- "numInstances": 15,
- "serverPodSpec": "go-stress-server"
- }
- }
- },
-
- "globalSettings": {
- "buildDockerImages": true,
- "pollIntervalSecs": 60,
- "testDurationSecs": 7200,
- "kubernetesProxyPort": 8007,
- "datasetIdNamePrefix": "stress_test_go",
- "summaryTableId": "summary",
- "qpsTableId": "qps",
- "podWarmupSecs": 60
- }
-}
-
diff --git a/tools/run_tests/stress_test/configs/java.json b/tools/run_tests/stress_test/configs/java.json
deleted file mode 100644
index 92af63c6b5..0000000000
--- a/tools/run_tests/stress_test/configs/java.json
+++ /dev/null
@@ -1,98 +0,0 @@
-{
- "dockerImages": {
- "grpc_stress_java" : {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_java"
- }
- },
-
- "clientTemplates": {
- "baseTemplates": {
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
- "pollIntervalSecs": 100,
- "clientArgs": {
- "num_channels_per_server":5,
- "num_stubs_per_channel":10,
- "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
- "metrics_port": 8081
- },
- "metricsPort": 8081,
- "metricsArgs": {
- "metrics_server_address": "localhost:8081",
- "total_only": "true",
- "deadline_secs": 60
- },
- "env": {
- "STRESSTEST_CLIENT_OPTS":"-Xmx3g -Xms3g -XX:NewSize=1500m -XX:MaxNewSize=1500m -XX:+UseConcMarkSweepGC"
- }
- }
- },
- "templates": {
- "java_client": {
- "baseTemplate": "default",
- "stressClientCmd": [
- "/var/local/git/grpc-java/interop-testing/build/install/grpc-interop-testing/bin/stresstest-client"
- ],
- "metricsClientCmd": [
- "/var/local/git/grpc/bins/opt/metrics_client"
- ]
- }
- }
- },
-
- "serverTemplates": {
- "baseTemplates":{
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
- "serverPort": 8080,
- "serverArgs": {
- "port": 8080,
- "use_tls": "false"
- },
- "env": {
- "TEST_SERVER_OPTS":"-Xmx3g -Xms3g -XX:NewSize=1500m -XX:MaxNewSize=1500m -XX:+UseConcMarkSweepGC"
- }
- }
- },
- "templates": {
- "java_server": {
- "baseTemplate": "default",
- "stressServerCmd": [
- "/var/local/git/grpc-java/interop-testing/build/install/grpc-interop-testing/bin/test-server"
- ]
- }
- }
- },
-
- "testMatrix": {
- "serverPodSpecs": {
- "java-stress-server": {
- "serverTemplate": "java_server",
- "dockerImage": "grpc_stress_java",
- "numInstances": 1
- }
- },
-
- "clientPodSpecs": {
- "java-stress-client": {
- "clientTemplate": "java_client",
- "dockerImage": "grpc_stress_java",
- "numInstances": 10,
- "serverPodSpec": "java-stress-server"
- }
- }
- },
-
- "globalSettings": {
- "buildDockerImages": true,
- "pollIntervalSecs": 100,
- "testDurationSecs": 7200,
- "kubernetesProxyPort": 8008,
- "datasetIdNamePrefix": "stress_test_java",
- "summaryTableId": "summary",
- "qpsTableId": "qps",
- "podWarmupSecs": 60
- }
-}
-
diff --git a/tools/run_tests/stress_test/configs/node-cxx.json b/tools/run_tests/stress_test/configs/node-cxx.json
deleted file mode 100644
index 094c1236e7..0000000000
--- a/tools/run_tests/stress_test/configs/node-cxx.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "dockerImages": {
- "grpc_stress_cxx_opt" : {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_cxx",
- "buildType": "opt"
- },
- "grpc_stress_node": {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_node"
- }
- },
-
- "clientTemplates": {
- "baseTemplates": {
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
- "pollIntervalSecs": 60,
- "clientArgs": {
- "num_channels_per_server":5,
- "num_stubs_per_channel":10,
- "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
- "metrics_port": 8081
- },
- "metricsPort": 8081,
- "metricsArgs": {
- "metrics_server_address": "localhost:8081",
- "total_only": "true"
- }
- }
- },
- "templates": {
- "node_client": {
- "baseTemplate": "default",
- "stressClientCmd": [
- "/var/local/git/grpc/tools/gcp/stress_test/run_node.sh",
- "node",
- "/var/local/git/grpc/src/node/stress/stress_client.js"
- ],
- "metricsClientCmd": [
- "/var/local/git/grpc/tools/gcp/stress_test/run_node.sh",
- "node",
- "/var/local/git/grpc/src/node/stress/metrics_client.js"
- ]
- }
- }
- },
-
- "serverTemplates": {
- "baseTemplates":{
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
- "serverPort": 8080,
- "serverArgs": {
- "port": 8080
- }
- }
- },
- "templates": {
- "cxx_server_opt": {
- "baseTemplate": "default",
- "stressServerCmd": ["/var/local/git/grpc/bins/opt/interop_server"]
- }
- }
- },
-
- "testMatrix": {
- "serverPodSpecs": {
- "stress-server-cxx-opt": {
- "serverTemplate": "cxx_server_opt",
- "dockerImage": "grpc_stress_cxx_opt",
- "numInstances": 1
- }
- },
-
- "clientPodSpecs": {
- "stress-client-node": {
- "clientTemplate": "node_client",
- "dockerImage": "grpc_stress_node",
- "numInstances": 20,
- "serverPodSpec": "stress-server-cxx-opt"
- }
- }
- },
-
- "globalSettings": {
- "buildDockerImages": true,
- "pollIntervalSecs": 60,
- "testDurationSecs": 7200,
- "kubernetesProxyPort": 8006,
- "datasetIdNamePrefix": "stress_test_node_cxx_opt",
- "summaryTableId": "summary",
- "qpsTableId": "qps",
- "podWarmupSecs": 60
- }
-}
-
diff --git a/tools/run_tests/stress_test/configs/node.json b/tools/run_tests/stress_test/configs/node.json
deleted file mode 100644
index 85eb9e0003..0000000000
--- a/tools/run_tests/stress_test/configs/node.json
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "dockerImages": {
- "grpc_stress_node" : {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_node"
- }
- },
-
- "clientTemplates": {
- "baseTemplates": {
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
- "pollIntervalSecs": 60,
- "clientArgs": {
- "num_channels_per_server":5,
- "num_stubs_per_channel":10,
- "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
- "metrics_port": 8081
- },
- "metricsPort": 8081,
- "metricsArgs": {
- "metrics_server_address": "localhost:8081",
- "total_only": "true"
- }
- }
- },
- "templates": {
- "node_client": {
- "baseTemplate": "default",
- "stressClientCmd": [
- "/var/local/git/grpc/tools/gcp/stress_test/run_node.sh",
- "node",
- "/var/local/git/grpc/src/node/stress/stress_client.js"
- ],
- "metricsClientCmd": [
- "/var/local/git/grpc/tools/gcp/stress_test/run_node.sh",
- "node",
- "/var/local/git/grpc/src/node/stress/metrics_client.js"
- ]
- }
- }
- },
-
- "serverTemplates": {
- "baseTemplates":{
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
- "serverPort": 8080,
- "serverArgs": {
- "port": 8080
- }
- }
- },
- "templates": {
- "node_server": {
- "baseTemplate": "default",
- "stressServerCmd": [
- "/var/local/git/grpc/tools/gcp/stress_test/run_node.sh",
- "node",
- "/var/local/git/grpc/src/node/interop/interop_server.js"
- ]
- }
- }
- },
-
- "testMatrix": {
- "serverPodSpecs": {
- "node-stress-server": {
- "serverTemplate": "node_server",
- "dockerImage": "grpc_stress_node",
- "numInstances": 1
- }
- },
-
- "clientPodSpecs": {
- "node-stress-client": {
- "clientTemplate": "node_client",
- "dockerImage": "grpc_stress_node",
- "numInstances": 15,
- "serverPodSpec": "node-stress-server"
- }
- }
- },
-
- "globalSettings": {
- "buildDockerImages": true,
- "pollIntervalSecs": 60,
- "testDurationSecs": 7200,
- "kubernetesProxyPort": 8005,
- "datasetIdNamePrefix": "stress_test_node",
- "summaryTableId": "summary",
- "qpsTableId": "qps",
- "podWarmupSecs": 60
- }
-}
-
diff --git a/tools/run_tests/stress_test/configs/opt-tsan-asan.json b/tools/run_tests/stress_test/configs/opt-tsan-asan.json
deleted file mode 100644
index fcb3678c02..0000000000
--- a/tools/run_tests/stress_test/configs/opt-tsan-asan.json
+++ /dev/null
@@ -1,134 +0,0 @@
-{
- "dockerImages": {
- "grpc_stress_cxx_opt" : {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_cxx",
- "buildType": "opt"
- },
- "grpc_stress_cxx_tsan": {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_cxx",
- "buildType": "tsan"
- },
- "grpc_stress_cxx_asan": {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_cxx",
- "buildType": "asan"
- }
- },
-
- "clientTemplates": {
- "baseTemplates": {
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
- "pollIntervalSecs": 60,
- "clientArgs": {
- "num_channels_per_server":5,
- "num_stubs_per_channel":10,
- "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
- "metrics_port": 8081
- },
- "metricsPort": 8081,
- "metricsArgs": {
- "metrics_server_address": "localhost:8081",
- "total_only": "true"
- }
- }
- },
- "templates": {
- "cxx_client_opt": {
- "baseTemplate": "default",
- "stressClientCmd": ["/var/local/git/grpc/bins/opt/stress_test"],
- "metricsClientCmd": ["/var/local/git/grpc/bins/opt/metrics_client"]
- },
- "cxx_client_tsan": {
- "baseTemplate": "default",
- "stressClientCmd": ["/var/local/git/grpc/bins/tsan/stress_test"],
- "metricsClientCmd": ["/var/local/git/grpc/bins/tsan/metrics_client"]
- },
- "cxx_client_asan": {
- "baseTemplate": "default",
- "stressClientCmd": ["/var/local/git/grpc/bins/asan/stress_test"],
- "metricsClientCmd": ["/var/local/git/grpc/bins/asan/metrics_client"]
- }
- }
- },
-
- "serverTemplates": {
- "baseTemplates":{
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
- "serverPort": 8080,
- "serverArgs": {
- "port": 8080
- }
- }
- },
- "templates": {
- "cxx_server_opt": {
- "baseTemplate": "default",
- "stressServerCmd": ["/var/local/git/grpc/bins/opt/interop_server"]
- },
- "cxx_server_tsan": {
- "baseTemplate": "default",
- "stressServerCmd": ["/var/local/git/grpc/bins/tsan/interop_server"]
- },
- "cxx_server_asan": {
- "baseTemplate": "default",
- "stressServerCmd": ["/var/local/git/grpc/bins/asan/interop_server"]
- }
- }
- },
-
- "testMatrix": {
- "serverPodSpecs": {
- "stress-server-opt": {
- "serverTemplate": "cxx_server_opt",
- "dockerImage": "grpc_stress_cxx_opt",
- "numInstances": 1
- },
- "stress-server-tsan": {
- "serverTemplate": "cxx_server_tsan",
- "dockerImage": "grpc_stress_cxx_tsan",
- "numInstances": 1
- },
- "stress-server-asan": {
- "serverTemplate": "cxx_server_asan",
- "dockerImage": "grpc_stress_cxx_asan",
- "numInstances": 1
- }
- },
-
- "clientPodSpecs": {
- "stress-client-opt": {
- "clientTemplate": "cxx_client_opt",
- "dockerImage": "grpc_stress_cxx_opt",
- "numInstances": 5,
- "serverPodSpec": "stress-server-opt"
- },
- "stress-client-tsan": {
- "clientTemplate": "cxx_client_tsan",
- "dockerImage": "grpc_stress_cxx_tsan",
- "numInstances": 10,
- "serverPodSpec": "stress-server-tsan"
- },
- "stress-client-asan": {
- "clientTemplate": "cxx_client_asan",
- "dockerImage": "grpc_stress_cxx_asan",
- "numInstances": 10,
- "serverPodSpec": "stress-server-asan"
- }
- }
- },
-
- "globalSettings": {
- "buildDockerImages": true,
- "pollIntervalSecs": 60,
- "testDurationSecs": 7200,
- "kubernetesProxyPort": 8004,
- "datasetIdNamePrefix": "stress_test_opt_tsan",
- "summaryTableId": "summary",
- "qpsTableId": "qps",
- "podWarmupSecs": 60
- }
-}
diff --git a/tools/run_tests/stress_test/configs/opt.json b/tools/run_tests/stress_test/configs/opt.json
deleted file mode 100644
index 5e0e930d45..0000000000
--- a/tools/run_tests/stress_test/configs/opt.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "dockerImages": {
- "grpc_stress_cxx_opt" : {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_cxx",
- "buildType": "opt"
- }
- },
-
- "clientTemplates": {
- "baseTemplates": {
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
- "pollIntervalSecs": 60,
- "clientArgs": {
- "num_channels_per_server":5,
- "num_stubs_per_channel":10,
- "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
- "metrics_port": 8081
- },
- "metricsPort": 8081,
- "metricsArgs": {
- "metrics_server_address": "localhost:8081",
- "total_only": "true"
- }
- }
- },
- "templates": {
- "cxx_client_opt": {
- "baseTemplate": "default",
- "stressClientCmd": ["/var/local/git/grpc/bins/opt/stress_test"],
- "metricsClientCmd": ["/var/local/git/grpc/bins/opt/metrics_client"]
- }
- }
- },
-
- "serverTemplates": {
- "baseTemplates":{
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
- "serverPort": 8080,
- "serverArgs": {
- "port": 8080
- }
- }
- },
- "templates": {
- "cxx_server_opt": {
- "baseTemplate": "default",
- "stressServerCmd": ["/var/local/git/grpc/bins/opt/interop_server"]
- }
- }
- },
-
- "testMatrix": {
- "serverPodSpecs": {
- "stress-server-opt": {
- "serverTemplate": "cxx_server_opt",
- "dockerImage": "grpc_stress_cxx_opt",
- "numInstances": 1
- }
- },
-
- "clientPodSpecs": {
- "stress-client-opt": {
- "clientTemplate": "cxx_client_opt",
- "dockerImage": "grpc_stress_cxx_opt",
- "numInstances": 15,
- "serverPodSpec": "stress-server-opt"
- }
- }
- },
-
- "globalSettings": {
- "buildDockerImages": true,
- "pollIntervalSecs": 60,
- "testDurationSecs": 7200,
- "kubernetesProxyPort": 8001,
- "datasetIdNamePrefix": "stress_test_opt",
- "summaryTableId": "summary",
- "qpsTableId": "qps",
- "podWarmupSecs": 60
- }
-}
-
diff --git a/tools/run_tests/stress_test/configs/php-cxx.json b/tools/run_tests/stress_test/configs/php-cxx.json
deleted file mode 100644
index 03254b368c..0000000000
--- a/tools/run_tests/stress_test/configs/php-cxx.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "dockerImages": {
- "grpc_stress_cxx_opt" : {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_cxx",
- "buildType": "opt"
- },
- "grpc_stress_php": {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_php"
- }
- },
-
- "clientTemplates": {
- "baseTemplates": {
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
- "pollIntervalSecs": 60,
- "clientArgs": {
- "num_channels_per_server":5,
- "num_stubs_per_channel":10,
- "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
- "metrics_port": 8081
- },
- "metricsPort": 8081,
- "metricsArgs": {
- "metrics_server_address": "localhost:8081"
- }
- }
- },
- "templates": {
- "php_client": {
- "baseTemplate": "default",
- "stressClientCmd": [
- "/var/local/git/grpc/src/php/bin/stress_client.sh"
- ],
- "metricsClientCmd": [
- "php",
- "/var/local/git/grpc/src/php/tests/interop/metrics_client.php"
- ]
- }
- }
- },
-
- "serverTemplates": {
- "baseTemplates":{
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
- "serverPort": 8080,
- "serverArgs": {
- "port": 8080
- }
- }
- },
- "templates": {
- "cxx_server_opt": {
- "baseTemplate": "default",
- "stressServerCmd": ["/var/local/git/grpc/bins/opt/interop_server"]
- }
- }
- },
-
- "testMatrix": {
- "serverPodSpecs": {
- "stress-server-cxx-php": {
- "serverTemplate": "cxx_server_opt",
- "dockerImage": "grpc_stress_cxx_opt",
- "numInstances": 1
- }
- },
-
- "clientPodSpecs": {
- "stress-client-php": {
- "clientTemplate": "php_client",
- "dockerImage": "grpc_stress_php",
- "numInstances": 20,
- "serverPodSpec": "stress-server-cxx-php"
- }
- }
- },
-
- "globalSettings": {
- "buildDockerImages": true,
- "pollIntervalSecs": 60,
- "testDurationSecs": 7200,
- "kubernetesProxyPort": 8010,
- "datasetIdNamePrefix": "stress_test_php_cxx_opt",
- "summaryTableId": "summary",
- "qpsTableId": "qps",
- "podWarmupSecs": 60
- }
-}
-
diff --git a/tools/run_tests/stress_test/configs/python.json b/tools/run_tests/stress_test/configs/python.json
deleted file mode 100644
index 4f85de1d5f..0000000000
--- a/tools/run_tests/stress_test/configs/python.json
+++ /dev/null
@@ -1,98 +0,0 @@
-{
- "dockerImages": {
- "grpc_stress_python" : {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_python"
- }
- },
-
- "clientTemplates": {
- "baseTemplates": {
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
- "pollIntervalSecs": 60,
- "clientArgs": {
- "num_channels_per_server":5,
- "num_stubs_per_channel":10,
- "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
- "metrics_port": 8081
- },
- "metricsPort": 8081,
- "metricsArgs": {
- "metrics_server_address": "localhost:8081",
- "total_only": "true"
- },
- "env": {
- "PYTHONPATH": "/var/local/git/grpc/src/python/gens:/var/local/git/grpc/src/python/grpcio",
- "LD_LIBRARY_PATH":"/var/local/git/grpc/libs/opt"
- }
- }
- },
- "templates": {
- "python_client": {
- "baseTemplate": "default",
- "stressClientCmd": [
- "python",
- "/var/local/git/grpc/src/python/grpcio/tests/stress/client.py"
- ],
- "metricsClientCmd": ["/var/local/git/grpc/bins/opt/metrics_client"]
- }
- }
- },
-
- "serverTemplates": {
- "baseTemplates":{
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
- "serverPort": 8080,
- "serverArgs": {
- "port": 8080
- },
- "env": {
- "PYTHONPATH": "/var/local/git/grpc/src/python/gens:/var/local/git/grpc/src/python/grpcio",
- "LD_LIBRARY_PATH":"/var/local/git/grpc/libs/opt"
- }
- }
- },
- "templates": {
- "python_server": {
- "baseTemplate": "default",
- "stressServerCmd": [
- "python",
- "/var/local/git/grpc/src/python/grpcio/tests/interop/server.py"
- ]
- }
- }
- },
-
- "testMatrix": {
- "serverPodSpecs": {
- "python-stress-server": {
- "serverTemplate": "python_server",
- "dockerImage": "grpc_stress_python",
- "numInstances": 1
- }
- },
-
- "clientPodSpecs": {
- "python-stress-client": {
- "clientTemplate": "python_client",
- "dockerImage": "grpc_stress_python",
- "numInstances": 5,
- "serverPodSpec": "python-stress-server"
- }
- }
- },
-
- "globalSettings": {
- "buildDockerImages": true,
- "pollIntervalSecs": 60,
- "testDurationSecs": 7200,
- "kubernetesProxyPort": 8011,
- "datasetIdNamePrefix": "stress_test_python",
- "summaryTableId": "summary",
- "qpsTableId": "qps",
- "podWarmupSecs": 60
- }
-}
-
diff --git a/tools/run_tests/stress_test/configs/ruby.json b/tools/run_tests/stress_test/configs/ruby.json
deleted file mode 100644
index 7e2afcbb69..0000000000
--- a/tools/run_tests/stress_test/configs/ruby.json
+++ /dev/null
@@ -1,92 +0,0 @@
-{
- "dockerImages": {
- "grpc_stress_ruby" : {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_ruby"
- }
- },
-
- "clientTemplates": {
- "baseTemplates": {
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
- "pollIntervalSecs": 60,
- "clientArgs": {
- "num_channels_per_server":5,
- "num_stubs_per_channel":10,
- "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
- "metrics_port": 8081
- },
- "metricsPort": 8081,
- "metricsArgs": {
- "metrics_server_address": "localhost:8081",
- "total_only": "true"
- }
- }
- },
- "templates": {
- "ruby_client": {
- "baseTemplate": "default",
- "stressClientCmd": [
- "/var/local/git/grpc/tools/gcp/stress_test/run_ruby.sh",
- "ruby",
- "/var/local/git/grpc/src/ruby/stress/stress_client.rb"
- ],
- "metricsClientCmd": ["/var/local/git/grpc/bins/opt/metrics_client"]
- }
- }
- },
-
- "serverTemplates": {
- "baseTemplates":{
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
- "serverPort": 8080,
- "serverArgs": {
- "port": 8080
- }
- }
- },
- "templates": {
- "ruby_server": {
- "baseTemplate": "default",
- "stressServerCmd": [
- "/var/local/git/grpc/tools/gcp/stress_test/run_ruby.sh",
- "ruby",
- "/var/local/git/grpc/src/ruby/pb/test/server.rb"
- ]
- }
- }
- },
-
- "testMatrix": {
- "serverPodSpecs": {
- "stress-server-ruby": {
- "serverTemplate": "ruby_server",
- "dockerImage": "grpc_stress_ruby",
- "numInstances": 1
- }
- },
-
- "clientPodSpecs": {
- "stress-client-ruby": {
- "clientTemplate": "ruby_client",
- "dockerImage": "grpc_stress_ruby",
- "numInstances": 10,
- "serverPodSpec": "stress-server-ruby"
- }
- }
- },
-
- "globalSettings": {
- "buildDockerImages": true,
- "pollIntervalSecs": 60,
- "testDurationSecs": 7200,
- "kubernetesProxyPort": 8001,
- "datasetIdNamePrefix": "stress_test_ruby",
- "summaryTableId": "summary",
- "qpsTableId": "qps",
- "podWarmupSecs": 60
- }
-}
-
diff --git a/tools/run_tests/stress_test/configs/tsan.json b/tools/run_tests/stress_test/configs/tsan.json
deleted file mode 100644
index abc759c79d..0000000000
--- a/tools/run_tests/stress_test/configs/tsan.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "dockerImages": {
- "grpc_stress_cxx_tsan" : {
- "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh",
- "dockerFileDir": "grpc_interop_stress_cxx",
- "buildType": "tsan"
- }
- },
-
- "clientTemplates": {
- "baseTemplates": {
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
- "pollIntervalSecs": 120,
- "clientArgs": {
- "num_channels_per_server":5,
- "num_stubs_per_channel":10,
- "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
- "metrics_port": 8081
- },
- "metricsPort": 8081,
- "metricsArgs": {
- "metrics_server_address": "localhost:8081",
- "total_only": "true"
- }
- }
- },
- "templates": {
- "cxx_client_tsan": {
- "baseTemplate": "default",
- "stressClientCmd": ["/var/local/git/grpc/bins/tsan/stress_test"],
- "metricsClientCmd": ["/var/local/git/grpc/bins/tsan/metrics_client"]
- }
- }
- },
-
- "serverTemplates": {
- "baseTemplates":{
- "default": {
- "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
- "serverPort": 8080,
- "serverArgs": {
- "port": 8080
- }
- }
- },
- "templates": {
- "cxx_server_tsan": {
- "baseTemplate": "default",
- "stressServerCmd": ["/var/local/git/grpc/bins/tsan/interop_server"]
- }
- }
- },
-
- "testMatrix": {
- "serverPodSpecs": {
- "stress-server-tsan": {
- "serverTemplate": "cxx_server_tsan",
- "dockerImage": "grpc_stress_cxx_tsan",
- "numInstances": 1
- }
- },
-
- "clientPodSpecs": {
- "stress-client-tsan": {
- "clientTemplate": "cxx_client_tsan",
- "dockerImage": "grpc_stress_cxx_tsan",
- "numInstances": 5,
- "serverPodSpec": "stress-server-tsan"
- }
- }
- },
-
- "globalSettings": {
- "buildDockerImages": true,
- "pollIntervalSecs": 60,
- "testDurationSecs": 7200,
- "kubernetesProxyPort": 8002,
- "datasetIdNamePrefix": "stress_test_tsan",
- "summaryTableId": "summary",
- "qpsTableId": "qps",
- "podWarmupSecs": 60
- }
-}
-
diff --git a/tools/run_tests/stress_test/print_summary.py b/tools/run_tests/stress_test/print_summary.py
deleted file mode 100755
index 6f4ada2f4f..0000000000
--- a/tools/run_tests/stress_test/print_summary.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env python
-# 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.
-import argparse
-import os
-import sys
-
-stress_test_utils_dir = os.path.abspath(os.path.join(
- os.path.dirname(__file__), '../../gcp/stress_test'))
-sys.path.append(stress_test_utils_dir)
-from stress_test_utils import BigQueryHelper
-
-argp = argparse.ArgumentParser(
- description='Print summary tables',
- formatter_class=argparse.ArgumentDefaultsHelpFormatter)
-argp.add_argument('--gcp_project_id',
- required=True,
- help='The Google Cloud Platform Project Id')
-argp.add_argument('--dataset_id', type=str, required=True)
-argp.add_argument('--run_id', type=str, required=True)
-argp.add_argument('--summary_table_id', type=str, default='summary')
-argp.add_argument('--qps_table_id', type=str, default='qps')
-argp.add_argument('--summary_only', action='store_true', default=True)
-
-if __name__ == '__main__':
- args = argp.parse_args()
- bq_helper = BigQueryHelper(args.run_id, '', '', args.gcp_project_id,
- args.dataset_id, args.summary_table_id,
- args.qps_table_id)
- bq_helper.initialize()
- if not args.summary_only:
- bq_helper.print_qps_records()
- bq_helper.print_summary_records()
diff --git a/tools/run_tests/stress_test/run_on_gke.py b/tools/run_tests/stress_test/run_on_gke.py
deleted file mode 100755
index b190ebde7a..0000000000
--- a/tools/run_tests/stress_test/run_on_gke.py
+++ /dev/null
@@ -1,674 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2015-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.
-
-from __future__ import print_function
-
-import argparse
-import datetime
-import json
-import os
-import subprocess
-import sys
-import time
-
-stress_test_utils_dir = os.path.abspath(os.path.join(
- os.path.dirname(__file__), '../../gcp/stress_test'))
-sys.path.append(stress_test_utils_dir)
-from stress_test_utils import BigQueryHelper
-
-kubernetes_api_dir = os.path.abspath(os.path.join(
- os.path.dirname(__file__), '../../gcp/utils'))
-sys.path.append(kubernetes_api_dir)
-
-import kubernetes_api
-
-
-class GlobalSettings:
-
- def __init__(self, gcp_project_id, build_docker_images,
- test_poll_interval_secs, test_duration_secs,
- kubernetes_proxy_port, dataset_id_prefix, summary_table_id,
- qps_table_id, pod_warmup_secs):
- self.gcp_project_id = gcp_project_id
- self.build_docker_images = build_docker_images
- self.test_poll_interval_secs = test_poll_interval_secs
- self.test_duration_secs = test_duration_secs
- self.kubernetes_proxy_port = kubernetes_proxy_port
- self.dataset_id_prefix = dataset_id_prefix
- self.summary_table_id = summary_table_id
- self.qps_table_id = qps_table_id
- self.pod_warmup_secs = pod_warmup_secs
-
-
-class ClientTemplate:
- """ Contains all the common settings that are used by a stress client """
-
- def __init__(self, name, stress_client_cmd, metrics_client_cmd, metrics_port,
- wrapper_script_path, poll_interval_secs, client_args_dict,
- metrics_args_dict, will_run_forever, env_dict):
- self.name = name
- self.stress_client_cmd = stress_client_cmd
- self.metrics_client_cmd = metrics_client_cmd
- self.metrics_port = metrics_port
- self.wrapper_script_path = wrapper_script_path
- self.poll_interval_secs = poll_interval_secs
- self.client_args_dict = client_args_dict
- self.metrics_args_dict = metrics_args_dict
- self.will_run_forever = will_run_forever
- self.env_dict = env_dict
-
-
-class ServerTemplate:
- """ Contains all the common settings used by a stress server """
-
- def __init__(self, name, server_cmd, wrapper_script_path, server_port,
- server_args_dict, will_run_forever, env_dict):
- self.name = name
- self.server_cmd = server_cmd
- self.wrapper_script_path = wrapper_script_path
- self.server_port = server_port
- self.server_args_dict = server_args_dict
- self.will_run_forever = will_run_forever
- self.env_dict = env_dict
-
-
-class DockerImage:
- """ Represents properties of a Docker image. Provides methods to build the
- image and push it to GKE registry
- """
-
- def __init__(self, gcp_project_id, image_name, build_script_path,
- dockerfile_dir, build_type):
- """Args:
-
- image_name: The docker image name
- tag_name: The additional tag name. This is the name used when pushing the
- docker image to GKE registry
- build_script_path: The path to the build script that builds this docker
- image
- dockerfile_dir: The name of the directory under
- '<grpc_root>/tools/dockerfile' that contains the dockerfile
- """
- self.image_name = image_name
- self.gcp_project_id = gcp_project_id
- self.build_script_path = build_script_path
- self.dockerfile_dir = dockerfile_dir
- self.build_type = build_type
- self.tag_name = self._make_tag_name(gcp_project_id, image_name)
-
- def _make_tag_name(self, project_id, image_name):
- return 'gcr.io/%s/%s' % (project_id, image_name)
-
- def build_image(self):
- print('Building docker image: %s (tag: %s)' % (self.image_name,
- self.tag_name))
- os.environ['INTEROP_IMAGE'] = self.image_name
- os.environ['INTEROP_IMAGE_REPOSITORY_TAG'] = self.tag_name
- os.environ['BASE_NAME'] = self.dockerfile_dir
- os.environ['BUILD_TYPE'] = self.build_type
- print('DEBUG: path: ', self.build_script_path)
- if subprocess.call(args=[self.build_script_path]) != 0:
- print('Error in building the Docker image')
- return False
- return True
-
- def push_to_gke_registry(self):
- cmd = ['gcloud', 'docker', 'push', self.tag_name]
- print('Pushing %s to the GKE registry..' % self.tag_name)
- if subprocess.call(args=cmd) != 0:
- print('Error in pushing the image %s to the GKE registry' %
- self.tag_name)
- return False
- return True
-
-
-class ServerPodSpec:
- """ Contains the information required to launch server pods. """
-
- def __init__(self, name, server_template, docker_image, num_instances):
- self.name = name
- self.template = server_template
- self.docker_image = docker_image
- self.num_instances = num_instances
-
- def pod_names(self):
- """ Return a list of names of server pods to create. """
- return ['%s-%d' % (self.name, i) for i in range(1, self.num_instances + 1)]
-
- def server_addresses(self):
- """ Return string of server addresses in the following format:
- '<server_pod_name_1>:<server_port>,<server_pod_name_2>:<server_port>...'
- """
- return ','.join(['%s:%d' % (pod_name, self.template.server_port)
- for pod_name in self.pod_names()])
-
-
-class ClientPodSpec:
- """ Contains the information required to launch client pods """
-
- def __init__(self, name, client_template, docker_image, num_instances,
- server_addresses):
- self.name = name
- self.template = client_template
- self.docker_image = docker_image
- self.num_instances = num_instances
- self.server_addresses = server_addresses
-
- def pod_names(self):
- """ Return a list of names of client pods to create """
- return ['%s-%d' % (self.name, i) for i in range(1, self.num_instances + 1)]
-
- # The client args in the template do not have server addresses. This function
- # adds the server addresses and returns the updated client args
- def get_client_args_dict(self):
- args_dict = self.template.client_args_dict.copy()
- args_dict['server_addresses'] = self.server_addresses
- return args_dict
-
-
-class Gke:
- """ Class that has helper methods to interact with GKE """
-
- class KubernetesProxy:
- """Class to start a proxy on localhost to talk to the Kubernetes API server"""
-
- def __init__(self, port):
- cmd = ['kubectl', 'proxy', '--port=%d' % port]
- self.p = subprocess.Popen(args=cmd)
- time.sleep(2)
- print('\nStarted kubernetes proxy on port: %d' % port)
-
- def __del__(self):
- if self.p is not None:
- print('Shutting down Kubernetes proxy..')
- self.p.kill()
-
- def __init__(self, project_id, run_id, dataset_id, summary_table_id,
- qps_table_id, kubernetes_port):
- self.project_id = project_id
- self.run_id = run_id
- self.dataset_id = dataset_id
- self.summary_table_id = summary_table_id
- self.qps_table_id = qps_table_id
-
- # The environment variables we would like to pass to every pod (both client
- # and server) launched in GKE
- self.gke_env = {
- 'RUN_ID': self.run_id,
- 'GCP_PROJECT_ID': self.project_id,
- 'DATASET_ID': self.dataset_id,
- 'SUMMARY_TABLE_ID': self.summary_table_id,
- 'QPS_TABLE_ID': self.qps_table_id
- }
-
- self.kubernetes_port = kubernetes_port
- # Start kubernetes proxy
- self.kubernetes_proxy = Gke.KubernetesProxy(kubernetes_port)
-
- def _args_dict_to_str(self, args_dict):
- return ' '.join('--%s=%s' % (k, args_dict[k]) for k in args_dict.keys())
-
- def launch_servers(self, server_pod_spec):
- is_success = True
-
- # The command to run inside the container is the wrapper script (which then
- # launches the actual server)
- container_cmd = server_pod_spec.template.wrapper_script_path
-
- # The parameters to the wrapper script (defined in
- # server_pod_spec.template.wrapper_script_path) are are injected into the
- # container via environment variables
- server_env = self.gke_env.copy()
- server_env.update(server_pod_spec.template.env_dict)
- server_env.update({
- 'STRESS_TEST_IMAGE_TYPE': 'SERVER',
- 'STRESS_TEST_CMD': server_pod_spec.template.server_cmd,
- 'STRESS_TEST_ARGS_STR': self._args_dict_to_str(
- server_pod_spec.template.server_args_dict),
- 'WILL_RUN_FOREVER': str(server_pod_spec.template.will_run_forever)
- })
-
- for pod_name in server_pod_spec.pod_names():
- server_env['POD_NAME'] = pod_name
- print('Creating server: %s' % pod_name)
- is_success = kubernetes_api.create_pod_and_service(
- 'localhost',
- self.kubernetes_port,
- 'default', # Use 'default' namespace
- pod_name,
- server_pod_spec.docker_image.tag_name,
- [server_pod_spec.template.server_port], # Ports to expose on the pod
- [container_cmd],
- [], # Args list is empty since we are passing all args via env variables
- server_env,
- True # Headless = True for server to that GKE creates a DNS record for pod_name
- )
- if not is_success:
- print('Error in launching server: %s' % pod_name)
- break
-
- if is_success:
- print('Successfully created server(s)')
-
- return is_success
-
- def launch_clients(self, client_pod_spec):
- is_success = True
-
- # The command to run inside the container is the wrapper script (which then
- # launches the actual stress client)
- container_cmd = client_pod_spec.template.wrapper_script_path
-
- # The parameters to the wrapper script (defined in
- # client_pod_spec.template.wrapper_script_path) are are injected into the
- # container via environment variables
- client_env = self.gke_env.copy()
- client_env.update(client_pod_spec.template.env_dict)
- client_env.update({
- 'STRESS_TEST_IMAGE_TYPE': 'CLIENT',
- 'STRESS_TEST_CMD': client_pod_spec.template.stress_client_cmd,
- 'STRESS_TEST_ARGS_STR': self._args_dict_to_str(
- client_pod_spec.get_client_args_dict()),
- 'METRICS_CLIENT_CMD': client_pod_spec.template.metrics_client_cmd,
- 'METRICS_CLIENT_ARGS_STR': self._args_dict_to_str(
- client_pod_spec.template.metrics_args_dict),
- 'POLL_INTERVAL_SECS': str(client_pod_spec.template.poll_interval_secs),
- 'WILL_RUN_FOREVER': str(client_pod_spec.template.will_run_forever)
- })
-
- for pod_name in client_pod_spec.pod_names():
- client_env['POD_NAME'] = pod_name
- print('Creating client: %s' % pod_name)
- is_success = kubernetes_api.create_pod_and_service(
- 'localhost',
- self.kubernetes_port,
- 'default', # default namespace,
- pod_name,
- client_pod_spec.docker_image.tag_name,
- [client_pod_spec.template.metrics_port], # Ports to expose on the pod
- [container_cmd],
- [], # Empty args list since all args are passed via env variables
- client_env,
- True # Client is a headless service (no need for an external ip)
- )
-
- if not is_success:
- print('Error in launching client %s' % pod_name)
- break
-
- if is_success:
- print('Successfully created all client(s)')
-
- return is_success
-
- def _delete_pods(self, pod_name_list):
- is_success = True
- for pod_name in pod_name_list:
- print('Deleting %s' % pod_name)
- is_success = kubernetes_api.delete_pod_and_service(
- 'localhost',
- self.kubernetes_port,
- 'default', # default namespace
- pod_name)
-
- if not is_success:
- print('Error in deleting pod %s' % pod_name)
- break
-
- if is_success:
- print('Successfully deleted all pods')
-
- return is_success
-
- def delete_servers(self, server_pod_spec):
- return self._delete_pods(server_pod_spec.pod_names())
-
- def delete_clients(self, client_pod_spec):
- return self._delete_pods(client_pod_spec.pod_names())
-
-
-class Config:
-
- def __init__(self, config_filename, gcp_project_id):
- print('Loading configuration...')
- config_dict = self._load_config(config_filename)
-
- self.global_settings = self._parse_global_settings(config_dict,
- gcp_project_id)
- self.docker_images_dict = self._parse_docker_images(
- config_dict, self.global_settings.gcp_project_id)
- self.client_templates_dict = self._parse_client_templates(config_dict)
- self.server_templates_dict = self._parse_server_templates(config_dict)
- self.server_pod_specs_dict = self._parse_server_pod_specs(
- config_dict, self.docker_images_dict, self.server_templates_dict)
- self.client_pod_specs_dict = self._parse_client_pod_specs(
- config_dict, self.docker_images_dict, self.client_templates_dict,
- self.server_pod_specs_dict)
- print('Loaded Configuaration.')
-
- def _parse_global_settings(self, config_dict, gcp_project_id):
- global_settings_dict = config_dict['globalSettings']
- return GlobalSettings(gcp_project_id,
- global_settings_dict['buildDockerImages'],
- global_settings_dict['pollIntervalSecs'],
- global_settings_dict['testDurationSecs'],
- global_settings_dict['kubernetesProxyPort'],
- global_settings_dict['datasetIdNamePrefix'],
- global_settings_dict['summaryTableId'],
- global_settings_dict['qpsTableId'],
- global_settings_dict['podWarmupSecs'])
-
- def _parse_docker_images(self, config_dict, gcp_project_id):
- """Parses the 'dockerImages' section of the config file and returns a
- Dictionary of 'DockerImage' objects keyed by docker image names"""
- docker_images_dict = {}
-
- docker_config_dict = config_dict['dockerImages']
- for image_name in docker_config_dict.keys():
- build_script_path = docker_config_dict[image_name]['buildScript']
- dockerfile_dir = docker_config_dict[image_name]['dockerFileDir']
- build_type = docker_config_dict[image_name].get('buildType', 'opt')
- docker_images_dict[image_name] = DockerImage(gcp_project_id, image_name,
- build_script_path,
- dockerfile_dir, build_type)
- return docker_images_dict
-
- def _parse_client_templates(self, config_dict):
- """Parses the 'clientTemplates' section of the config file and returns a
- Dictionary of 'ClientTemplate' objects keyed by client template names.
-
- Note: The 'baseTemplates' sub section of the config file contains templates
- with default values and the 'templates' sub section contains the actual
- client templates (which refer to the base template name to use for default
- values).
- """
- client_templates_dict = {}
-
- templates_dict = config_dict['clientTemplates']['templates']
- base_templates_dict = config_dict['clientTemplates'].get('baseTemplates',
- {})
- for template_name in templates_dict.keys():
- # temp_dict is a temporary dictionary that merges base template dictionary
- # and client template dictionary (with client template dictionary values
- # overriding base template values)
- temp_dict = {}
-
- base_template_name = templates_dict[template_name].get('baseTemplate')
- if not base_template_name is None:
- temp_dict = base_templates_dict[base_template_name].copy()
-
- temp_dict.update(templates_dict[template_name])
-
- # Create and add ClientTemplate object to the final client_templates_dict
- stress_client_cmd = ' '.join(temp_dict['stressClientCmd'])
- metrics_client_cmd = ' '.join(temp_dict['metricsClientCmd'])
- client_templates_dict[template_name] = ClientTemplate(
- template_name, stress_client_cmd, metrics_client_cmd,
- temp_dict['metricsPort'], temp_dict['wrapperScriptPath'],
- temp_dict['pollIntervalSecs'], temp_dict['clientArgs'].copy(),
- temp_dict['metricsArgs'].copy(), temp_dict.get('willRunForever', 1),
- temp_dict.get('env', {}).copy())
-
- return client_templates_dict
-
- def _parse_server_templates(self, config_dict):
- """Parses the 'serverTemplates' section of the config file and returns a
- Dictionary of 'serverTemplate' objects keyed by server template names.
-
- Note: The 'baseTemplates' sub section of the config file contains templates
- with default values and the 'templates' sub section contains the actual
- server templates (which refer to the base template name to use for default
- values).
- """
- server_templates_dict = {}
-
- templates_dict = config_dict['serverTemplates']['templates']
- base_templates_dict = config_dict['serverTemplates'].get('baseTemplates',
- {})
-
- for template_name in templates_dict.keys():
- # temp_dict is a temporary dictionary that merges base template dictionary
- # and server template dictionary (with server template dictionary values
- # overriding base template values)
- temp_dict = {}
-
- base_template_name = templates_dict[template_name].get('baseTemplate')
- if not base_template_name is None:
- temp_dict = base_templates_dict[base_template_name].copy()
-
- temp_dict.update(templates_dict[template_name])
-
- # Create and add ServerTemplate object to the final server_templates_dict
- stress_server_cmd = ' '.join(temp_dict['stressServerCmd'])
- server_templates_dict[template_name] = ServerTemplate(
- template_name, stress_server_cmd, temp_dict['wrapperScriptPath'],
- temp_dict['serverPort'], temp_dict['serverArgs'].copy(),
- temp_dict.get('willRunForever', 1), temp_dict.get('env', {}).copy())
-
- return server_templates_dict
-
- def _parse_server_pod_specs(self, config_dict, docker_images_dict,
- server_templates_dict):
- """Parses the 'serverPodSpecs' sub-section (under 'testMatrix' section) of
- the config file and returns a Dictionary of 'ServerPodSpec' objects keyed
- by server pod spec names"""
- server_pod_specs_dict = {}
-
- pod_specs_dict = config_dict['testMatrix'].get('serverPodSpecs', {})
-
- for pod_name in pod_specs_dict.keys():
- server_template_name = pod_specs_dict[pod_name]['serverTemplate']
- docker_image_name = pod_specs_dict[pod_name]['dockerImage']
- num_instances = pod_specs_dict[pod_name].get('numInstances', 1)
-
- # Create and add the ServerPodSpec object to the final
- # server_pod_specs_dict
- server_pod_specs_dict[pod_name] = ServerPodSpec(
- pod_name, server_templates_dict[server_template_name],
- docker_images_dict[docker_image_name], num_instances)
-
- return server_pod_specs_dict
-
- def _parse_client_pod_specs(self, config_dict, docker_images_dict,
- client_templates_dict, server_pod_specs_dict):
- """Parses the 'clientPodSpecs' sub-section (under 'testMatrix' section) of
- the config file and returns a Dictionary of 'ClientPodSpec' objects keyed
- by client pod spec names"""
- client_pod_specs_dict = {}
-
- pod_specs_dict = config_dict['testMatrix'].get('clientPodSpecs', {})
- for pod_name in pod_specs_dict.keys():
- client_template_name = pod_specs_dict[pod_name]['clientTemplate']
- docker_image_name = pod_specs_dict[pod_name]['dockerImage']
- num_instances = pod_specs_dict[pod_name]['numInstances']
-
- # Get the server addresses from the server pod spec object
- server_pod_spec_name = pod_specs_dict[pod_name]['serverPodSpec']
- server_addresses = server_pod_specs_dict[
- server_pod_spec_name].server_addresses()
-
- client_pod_specs_dict[pod_name] = ClientPodSpec(
- pod_name, client_templates_dict[client_template_name],
- docker_images_dict[docker_image_name], num_instances,
- server_addresses)
-
- return client_pod_specs_dict
-
- def _load_config(self, config_filename):
- """Opens the config file and converts the Json text to Dictionary"""
- if not os.path.isabs(config_filename):
- raise Exception('Config objects expects an absolute file path. '
- 'config file name passed: %s' % config_filename)
- with open(config_filename) as config_file:
- return json.load(config_file)
-
-
-def run_tests(config):
- """ The main function that launches the stress tests """
- # Build docker images and push to GKE registry
- if config.global_settings.build_docker_images:
- for name, docker_image in config.docker_images_dict.iteritems():
- if not (docker_image.build_image() and
- docker_image.push_to_gke_registry()):
- return False
-
- # Create a unique id for this run (Note: Using timestamp instead of UUID to
- # make it easier to deduce the date/time of the run just by looking at the run
- # run id. This is useful in debugging when looking at records in Biq query)
- run_id = datetime.datetime.now().strftime('%Y_%m_%d_%H_%M_%S')
- dataset_id = '%s_%s' % (config.global_settings.dataset_id_prefix, run_id)
- print('Run id:', run_id)
- print('Dataset id:', dataset_id)
-
- bq_helper = BigQueryHelper(run_id, '', '',
- config.global_settings.gcp_project_id, dataset_id,
- config.global_settings.summary_table_id,
- config.global_settings.qps_table_id)
- bq_helper.initialize()
-
- gke = Gke(config.global_settings.gcp_project_id, run_id, dataset_id,
- config.global_settings.summary_table_id,
- config.global_settings.qps_table_id,
- config.global_settings.kubernetes_proxy_port)
-
- is_success = True
-
- try:
- print('Launching servers..')
- for name, server_pod_spec in config.server_pod_specs_dict.iteritems():
- if not gke.launch_servers(server_pod_spec):
- is_success = False # is_success is checked in the 'finally' block
- return False
-
- print('Launched servers. Waiting for %d seconds for the server pods to be '
- 'fully online') % config.global_settings.pod_warmup_secs
- time.sleep(config.global_settings.pod_warmup_secs)
-
- for name, client_pod_spec in config.client_pod_specs_dict.iteritems():
- if not gke.launch_clients(client_pod_spec):
- is_success = False # is_success is checked in the 'finally' block
- return False
-
- print('Launched all clients. Waiting for %d seconds for the client pods to '
- 'be fully online') % config.global_settings.pod_warmup_secs
- time.sleep(config.global_settings.pod_warmup_secs)
-
- start_time = datetime.datetime.now()
- end_time = start_time + datetime.timedelta(
- seconds=config.global_settings.test_duration_secs)
- print('Running the test until %s' % end_time.isoformat())
-
- while True:
- if datetime.datetime.now() > end_time:
- print('Test was run for %d seconds' %
- config.global_settings.test_duration_secs)
- break
-
- # Check if either stress server or clients have failed (btw, the bq_helper
- # monitors all the rows in the summary table and checks if any of them
- # have a failure status)
- if bq_helper.check_if_any_tests_failed():
- is_success = False
- print('Some tests failed.')
- break # Don't 'return' here. We still want to call bq_helper to print qps/summary tables
-
- # Tests running fine. Wait until next poll time to check the status
- print('Sleeping for %d seconds..' %
- config.global_settings.test_poll_interval_secs)
- time.sleep(config.global_settings.test_poll_interval_secs)
-
- # Print BiqQuery tables
- bq_helper.print_qps_records()
- bq_helper.print_summary_records()
-
- finally:
- # If there was a test failure, we should not delete the pods since they
- # would contain useful debug information (logs, core dumps etc)
- if is_success:
- for name, server_pod_spec in config.server_pod_specs_dict.iteritems():
- gke.delete_servers(server_pod_spec)
- for name, client_pod_spec in config.client_pod_specs_dict.iteritems():
- gke.delete_clients(client_pod_spec)
-
- return is_success
-
-
-def tear_down(config):
- gke = Gke(config.global_settings.gcp_project_id, '', '',
- config.global_settings.summary_table_id,
- config.global_settings.qps_table_id,
- config.global_settings.kubernetes_proxy_port)
- for name, server_pod_spec in config.server_pod_specs_dict.iteritems():
- gke.delete_servers(server_pod_spec)
- for name, client_pod_spec in config.client_pod_specs_dict.iteritems():
- gke.delete_clients(client_pod_spec)
-
-
-argp = argparse.ArgumentParser(
- description='Launch stress tests in GKE',
- formatter_class=argparse.ArgumentDefaultsHelpFormatter)
-argp.add_argument('--gcp_project_id',
- required=True,
- help='The Google Cloud Platform Project Id')
-argp.add_argument('--config_file',
- required=True,
- type=str,
- help='The test config file')
-argp.add_argument('--tear_down', action='store_true', default=False)
-
-if __name__ == '__main__':
- args = argp.parse_args()
-
- config_filename = args.config_file
-
- # Since we will be changing the current working directory to grpc root in the
- # next step, we should check if the config filename path is a relative path
- # (i.e a path relative to the current working directory) and if so, convert it
- # to abosulte path
- if not os.path.isabs(config_filename):
- config_filename = os.path.abspath(config_filename)
-
- config = Config(config_filename, args.gcp_project_id)
-
- # Change current working directory to grpc root
- # (This is important because all relative file paths in the config file are
- # supposed to interpreted as relative to the GRPC root)
- grpc_root = os.path.abspath(os.path.join(
- os.path.dirname(sys.argv[0]), '../../..'))
- os.chdir(grpc_root)
-
- # Note that tear_down is only in cases where we want to manually tear down a
- # test that for some reason run_tests() could not cleanup
- if args.tear_down:
- tear_down(config)
- sys.exit(1)
-
- if not run_tests(config):
- sys.exit(1)