aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitmodules2
-rw-r--r--CMakeLists.txt252
-rw-r--r--Makefile92
-rw-r--r--README.md3
-rw-r--r--binding.gyp994
-rw-r--r--build.yaml22
-rw-r--r--cmake/benchmark.cmake33
-rw-r--r--cmake/cares.cmake36
-rw-r--r--cmake/gflags.cmake33
-rw-r--r--cmake/msvc_static_runtime.cmake14
-rw-r--r--cmake/protobuf.cmake77
-rw-r--r--cmake/ssl.cmake38
-rw-r--r--cmake/zlib.cmake39
-rw-r--r--doc/PROTOCOL-WEB.md12
-rw-r--r--doc/md0
-rw-r--r--gRPC-Core.podspec117
-rw-r--r--package.json103
-rw-r--r--src/compiler/cpp_generator.cc15
-rw-r--r--src/compiler/cpp_generator.h4
-rw-r--r--src/compiler/cpp_plugin.cc2
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc25
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc23
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc23
-rw-r--r--src/core/ext/filters/client_channel/subchannel.cc117
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.cc32
-rw-r--r--src/core/lib/backoff/backoff.cc78
-rw-r--r--src/core/lib/backoff/backoff.h110
-rw-r--r--src/core/lib/iomgr/error.cc2
-rw-r--r--src/core/lib/iomgr/error.h5
-rw-r--r--src/core/lib/iomgr/ev_epoll1_linux.cc2
-rw-r--r--src/core/lib/iomgr/ev_epollex_linux.cc2
-rw-r--r--src/core/lib/iomgr/ev_epollsig_linux.cc2
-rw-r--r--src/core/lib/iomgr/ev_poll_posix.cc28
-rw-r--r--src/core/lib/iomgr/tcp_client_posix.cc9
-rw-r--r--src/core/lib/iomgr/udp_server.cc20
-rw-r--r--src/core/lib/iomgr/udp_server.h6
-rw-r--r--src/core/lib/iomgr/wakeup_fd_cv.cc8
-rw-r--r--src/core/lib/iomgr/wakeup_fd_cv.h24
-rw-r--r--src/core/lib/support/debug_location.h4
-rw-r--r--src/node/health_check/package.json29
-rw-r--r--src/node/tools/package.json41
-rwxr-xr-xsrc/objective-c/tests/run_tests.sh64
-rw-r--r--src/python/grpcio/grpc/_channel.py66
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi15
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi6
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi42
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/event.pxd.pxi45
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/event.pyx.pxi55
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi24
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/operation.pxd.pxi109
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/operation.pyx.pxi238
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi58
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi284
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi29
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/tag.pxd.pxi58
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/tag.pyx.pxi87
-rw-r--r--src/python/grpcio/grpc/_cython/cygrpc.pxd3
-rw-r--r--src/python/grpcio/grpc/_cython/cygrpc.pyx3
-rw-r--r--src/python/grpcio/grpc/_server.py111
-rw-r--r--src/python/grpcio_tests/tests/health_check/_health_servicer_test.py6
-rw-r--r--src/python/grpcio_tests/tests/interop/_insecure_intraop_test.py4
-rw-r--r--src/python/grpcio_tests/tests/interop/_secure_intraop_test.py4
-rw-r--r--src/python/grpcio_tests/tests/interop/server.py3
-rw-r--r--src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py8
-rw-r--r--src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py7
-rw-r--r--src/python/grpcio_tests/tests/qps/qps_worker.py4
-rw-r--r--src/python/grpcio_tests/tests/qps/worker_server.py4
-rw-r--r--src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py6
-rw-r--r--src/python/grpcio_tests/tests/tests.json1
-rw-r--r--src/python/grpcio_tests/tests/unit/_auth_context_test.py14
-rw-r--r--src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py4
-rw-r--r--src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py2
-rw-r--r--src/python/grpcio_tests/tests/unit/_compression_test.py6
-rw-r--r--src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py31
-rw-r--r--src/python/grpcio_tests/tests/unit/_cython/_common.py3
-rw-r--r--src/python/grpcio_tests/tests/unit/_cython/_no_messages_server_completion_queue_per_call_test.py57
-rw-r--r--src/python/grpcio_tests/tests/unit/_cython/_no_messages_single_server_completion_queue_test.py55
-rw-r--r--src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py40
-rw-r--r--src/python/grpcio_tests/tests/unit/_cython/_server_test.py49
-rw-r--r--src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py129
-rw-r--r--src/python/grpcio_tests/tests/unit/_empty_message_test.py7
-rw-r--r--src/python/grpcio_tests/tests/unit/_exit_scenarios.py8
-rw-r--r--src/python/grpcio_tests/tests/unit/_interceptor_test.py2
-rw-r--r--src/python/grpcio_tests/tests/unit/_invocation_defects_test.py6
-rw-r--r--src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py7
-rw-r--r--src/python/grpcio_tests/tests/unit/_metadata_test.py7
-rw-r--r--src/python/grpcio_tests/tests/unit/_reconnect_test.py45
-rw-r--r--src/python/grpcio_tests/tests/unit/_resource_exhausted_test.py1
-rw-r--r--src/python/grpcio_tests/tests/unit/_rpc_test.py5
-rw-r--r--src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py5
-rw-r--r--src/python/grpcio_tests/tests/unit/test_common.py11
-rw-r--r--templates/CMakeLists.txt.template183
-rw-r--r--templates/Makefile.template8
-rw-r--r--templates/gRPC-Core.podspec.template71
-rw-r--r--templates/tools/dockerfile/test/sanity/Dockerfile.template3
-rw-r--r--test/core/backoff/BUILD7
-rw-r--r--test/core/backoff/backoff_test.cc202
-rw-r--r--test/core/iomgr/udp_server_test.cc60
-rw-r--r--test/cpp/codegen/BUILD21
-rw-r--r--test/cpp/codegen/golden_file_test.cc9
-rwxr-xr-xtest/cpp/codegen/run_golden_file_test.sh19
-rw-r--r--test/cpp/end2end/client_lb_end2end_test.cc115
-rw-r--r--test/cpp/end2end/mock_test.cc2
-rw-r--r--test/cpp/interop/interop_client.cc69
-rw-r--r--test/cpp/interop/interop_client.h6
-rwxr-xr-xtest/cpp/qps/gen_build_yaml.py40
-rw-r--r--tools/dockerfile/test/sanity/Dockerfile3
-rwxr-xr-xtools/run_tests/dockerize/build_docker_and_run_tests.sh1
-rw-r--r--tools/run_tests/generated/sources_and_headers.json34
-rw-r--r--tools/run_tests/generated/tests.json3059
-rw-r--r--tools/run_tests/python_utils/upload_test_results.py5
-rwxr-xr-xtools/run_tests/run_tests.py4
-rwxr-xr-xtools/run_tests/sanity/check_clang_tidy.sh6
-rwxr-xr-xtools/run_tests/sanity/check_owners.sh10
-rwxr-xr-xtools/run_tests/sanity/check_shellcheck.sh28
-rwxr-xr-xtools/run_tests/sanity/check_submodules.sh14
-rwxr-xr-xtools/run_tests/sanity/check_unsecure.sh8
-rwxr-xr-xtools/run_tests/sanity/core_untyped_structs.sh2
-rw-r--r--tools/run_tests/sanity/sanity_tests.yaml1
119 files changed, 2395 insertions, 5911 deletions
diff --git a/.gitmodules b/.gitmodules
index d7f23ffcbd..c4b0d241dc 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -19,7 +19,7 @@
url = https://github.com/google/benchmark
[submodule "third_party/boringssl-with-bazel"]
path = third_party/boringssl-with-bazel
- url = https://boringssl.googlesource.com/boringssl
+ url = https://github.com/google/boringssl.git
[submodule "third_party/cares/cares"]
path = third_party/cares/cares
url = https://github.com/c-ares/c-ares.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 49eb38f331..8eff902f6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -102,183 +102,12 @@ else()
set(_gRPC_PROTOBUF_LIBRARY_NAME "libprotobuf")
endif()
-if("${gRPC_ZLIB_PROVIDER}" STREQUAL "module")
- if(NOT ZLIB_ROOT_DIR)
- set(ZLIB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib)
- endif()
- set(ZLIB_INCLUDE_DIR "${ZLIB_ROOT_DIR}")
- if(EXISTS "${ZLIB_ROOT_DIR}/CMakeLists.txt")
- # TODO(jtattermusch): workaround for https://github.com/madler/zlib/issues/218
- include_directories(${ZLIB_INCLUDE_DIR})
-
- add_subdirectory(${ZLIB_ROOT_DIR} third_party/zlib)
- if(TARGET zlibstatic)
- set(_gRPC_ZLIB_LIBRARIES zlibstatic)
- endif()
- else()
- message(WARNING "gRPC_ZLIB_PROVIDER is \"module\" but ZLIB_ROOT_DIR is wrong")
- endif()
- if(gRPC_INSTALL)
- message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_ZLIB_PROVIDER is \"module\"")
- set(gRPC_INSTALL FALSE)
- endif()
-elseif("${gRPC_ZLIB_PROVIDER}" STREQUAL "package")
- find_package(ZLIB REQUIRED)
- set(_gRPC_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
- set(_gRPC_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()")
-endif()
-
-if("${gRPC_CARES_PROVIDER}" STREQUAL "module")
- if(NOT CARES_ROOT_DIR)
- set(CARES_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/cares/cares)
- endif()
- set(CARES_SHARED OFF CACHE BOOL "disable shared library")
- set(CARES_STATIC ON CACHE BOOL "link cares statically")
- set(CARES_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/cares/cares")
- add_subdirectory(third_party/cares/cares)
- if(TARGET c-ares)
- set(_gRPC_CARES_LIBRARIES c-ares)
- endif()
- if(gRPC_INSTALL)
- message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_CARES_PROVIDER is \"module\"")
- set(gRPC_INSTALL FALSE)
- endif()
-elseif("${gRPC_CARES_PROVIDER}" STREQUAL "package")
- find_package(c-ares REQUIRED CONFIG)
- if(TARGET c-ares::cares)
- set(_gRPC_CARES_LIBRARIES c-ares::cares)
- endif()
- set(_gRPC_FIND_CARES "if(NOT c-ares_FOUND)\n find_package(c-ares CONFIG)\nendif()")
-endif()
-
-if("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "module")
- # Building the protobuf tests require gmock what is not part of a standard protobuf checkout.
- # Disable them unless they are explicitly requested from the cmake command line (when we assume
- # gmock is downloaded to the right location inside protobuf).
- if(NOT protobuf_BUILD_TESTS)
- set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
- endif()
- # Disable building protobuf with zlib. Building protobuf with zlib breaks
- # the build if zlib is not installed on the system.
- if(NOT protobuf_WITH_ZLIB)
- set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build protobuf with zlib.")
- endif()
- if(NOT PROTOBUF_ROOT_DIR)
- set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf)
- endif()
- set(PROTOBUF_WELLKNOWN_IMPORT_DIR ${PROTOBUF_ROOT_DIR}/src)
- if(EXISTS "${PROTOBUF_ROOT_DIR}/cmake/CMakeLists.txt")
- set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link static runtime libraries")
- add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf)
- if(TARGET ${_gRPC_PROTOBUF_LIBRARY_NAME})
- set(_gRPC_PROTOBUF_LIBRARIES ${_gRPC_PROTOBUF_LIBRARY_NAME})
- endif()
- if(TARGET libprotoc)
- set(_gRPC_PROTOBUF_PROTOC_LIBRARIES libprotoc)
- endif()
- if(TARGET protoc)
- set(_gRPC_PROTOBUF_PROTOC protoc)
- set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protoc>)
- endif()
- else()
- message(WARNING "gRPC_PROTOBUF_PROVIDER is \"module\" but PROTOBUF_ROOT_DIR is wrong")
- endif()
- if(gRPC_INSTALL)
- message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_PROTOBUF_PROVIDER is \"module\"")
- set(gRPC_INSTALL FALSE)
- endif()
-elseif("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "package")
- find_package(Protobuf REQUIRED ${gRPC_PROTOBUF_PACKAGE_TYPE})
- if(Protobuf_FOUND OR PROTOBUF_FOUND)
- if(TARGET protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
- set(_gRPC_PROTOBUF_LIBRARIES protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
- else()
- set(_gRPC_PROTOBUF_LIBRARIES ${PROTOBUF_LIBRARIES})
- endif()
- if(TARGET protobuf::libprotoc)
- set(_gRPC_PROTOBUF_PROTOC_LIBRARIES protobuf::libprotoc)
- else()
- set(_gRPC_PROTOBUF_PROTOC_LIBRARIES ${PROTOBUF_PROTOC_LIBRARIES})
- endif()
- if(TARGET protobuf::protoc)
- set(_gRPC_PROTOBUF_PROTOC protobuf::protoc)
- set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protobuf::protoc>)
- else()
- set(_gRPC_PROTOBUF_PROTOC ${PROTOBUF_PROTOC_EXECUTABLE})
- set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE})
- endif()
- set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND)\n find_package(Protobuf ${gRPC_PROTOBUF_PACKAGE_TYPE})\nendif()")
- endif()
- if(PROTOBUF_FOUND)
- include_directories(${PROTOBUF_INCLUDE_DIRS})
- endif()
- set(PROTOBUF_WELLKNOWN_IMPORT_DIR /usr/local/include)
-endif()
-
-if("${gRPC_SSL_PROVIDER}" STREQUAL "module")
- if(NOT BORINGSSL_ROOT_DIR)
- set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl)
- endif()
- if(EXISTS "${BORINGSSL_ROOT_DIR}/CMakeLists.txt")
- set(OPENSSL_NO_ASM ON) # make boringssl buildable with Visual Studio
- add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl)
- if(TARGET ssl)
- set(_gRPC_SSL_LIBRARIES ssl)
- set(_gRPC_SSL_INCLUDE_DIR ${BORINGSSL_ROOT_DIR}/include)
- endif()
- else()
- message(WARNING "gRPC_SSL_PROVIDER is \"module\" but BORINGSSL_ROOT_DIR is wrong")
- endif()
- if(gRPC_INSTALL)
- message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_SSL_PROVIDER is \"module\"")
- set(gRPC_INSTALL FALSE)
- endif()
-elseif("${gRPC_SSL_PROVIDER}" STREQUAL "package")
- find_package(OpenSSL REQUIRED)
- set(_gRPC_SSL_LIBRARIES ${OPENSSL_LIBRARIES})
- set(_gRPC_SSL_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR})
- set(_gRPC_FIND_SSL "if(NOT OPENSSL_FOUND)\n find_package(OpenSSL)\nendif()")
-endif()
-
-if("${gRPC_GFLAGS_PROVIDER}" STREQUAL "module")
- if(NOT GFLAGS_ROOT_DIR)
- set(GFLAGS_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/gflags)
- endif()
- if(EXISTS "${GFLAGS_ROOT_DIR}/CMakeLists.txt")
- add_subdirectory(${GFLAGS_ROOT_DIR} third_party/gflags)
- if(TARGET gflags_static)
- set(_gRPC_GFLAGS_LIBRARIES gflags_static)
- endif()
- else()
- message(WARNING "gRPC_GFLAGS_PROVIDER is \"module\" but GFLAGS_ROOT_DIR is wrong")
- endif()
-elseif("${gRPC_GFLAGS_PROVIDER}" STREQUAL "package")
- find_package(gflags)
- if(TARGET gflags::gflags)
- set(_gRPC_GFLAGS_LIBRARIES gflags::gflags)
- endif()
- set(_gRPC_FIND_GFLAGS "if(NOT gflags_FOUND)\n find_package(gflags)\nendif()")
-endif()
-
-if("${gRPC_BENCHMARK_PROVIDER}" STREQUAL "module")
- if(NOT BENCHMARK_ROOT_DIR)
- set(BENCHMARK_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/benchmark)
- endif()
- if(EXISTS "${BENCHMARK_ROOT_DIR}/CMakeLists.txt")
- add_subdirectory(${BENCHMARK_ROOT_DIR} third_party/benchmark)
- if(TARGET benchmark)
- set(_gRPC_BENCHMARK_LIBRARIES benchmark)
- endif()
- else()
- message(WARNING "gRPC_BENCHMARK_PROVIDER is \"module\" but BENCHMARK_ROOT_DIR is wrong")
- endif()
-elseif("${gRPC_BENCHMARK_PROVIDER}" STREQUAL "package")
- find_package(benchmark)
- if(TARGET benchmark::benchmark)
- set(_gRPC_BENCHMARK_LIBRARIES benchmark::benchmark)
- endif()
- set(_gRPC_FIND_BENCHMARK "if(NOT benchmark_FOUND)\n find_package(benchmark)\nendif()")
-endif()
+include(cmake/zlib.cmake)
+include(cmake/cares.cmake)
+include(cmake/protobuf.cmake)
+include(cmake/ssl.cmake)
+include(cmake/gflags.cmake)
+include(cmake/benchmark.cmake)
if(NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
@@ -381,7 +210,6 @@ add_dependencies(buildtests_c algorithm_test)
add_dependencies(buildtests_c alloc_test)
add_dependencies(buildtests_c alpn_test)
add_dependencies(buildtests_c arena_test)
-add_dependencies(buildtests_c backoff_test)
add_dependencies(buildtests_c bad_server_response_test)
add_dependencies(buildtests_c bin_decoder_test)
add_dependencies(buildtests_c bin_encoder_test)
@@ -634,6 +462,7 @@ add_custom_target(buildtests_cxx)
add_dependencies(buildtests_cxx alarm_cpp_test)
add_dependencies(buildtests_cxx async_end2end_test)
add_dependencies(buildtests_cxx auth_property_iterator_test)
+add_dependencies(buildtests_cxx backoff_test)
add_dependencies(buildtests_cxx bdp_estimator_test)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx bm_arena)
@@ -5110,35 +4939,6 @@ target_link_libraries(arena_test
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
-add_executable(backoff_test
- test/core/backoff/backoff_test.cc
-)
-
-
-target_include_directories(backoff_test
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
- PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
- PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${BENCHMARK_ROOT_DIR}/include
- PRIVATE ${ZLIB_ROOT_DIR}
- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
- PRIVATE ${CARES_INCLUDE_DIR}
- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/cares/cares
- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags/include
-)
-
-target_link_libraries(backoff_test
- ${_gRPC_ALLTARGETS_LIBRARIES}
- grpc_test_util
- grpc
- gpr_test_util
- gpr
-)
-
-endif (gRPC_BUILD_TESTS)
-if (gRPC_BUILD_TESTS)
-
add_executable(bad_server_response_test
test/core/end2end/bad_server_response_test.cc
)
@@ -8950,6 +8750,44 @@ target_link_libraries(auth_property_iterator_test
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
+add_executable(backoff_test
+ test/core/backoff/backoff_test.cc
+ third_party/googletest/googletest/src/gtest-all.cc
+ third_party/googletest/googlemock/src/gmock-all.cc
+)
+
+
+target_include_directories(backoff_test
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
+ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+ PRIVATE ${PROTOBUF_ROOT_DIR}/src
+ PRIVATE ${BENCHMARK_ROOT_DIR}/include
+ PRIVATE ${ZLIB_ROOT_DIR}
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
+ PRIVATE ${CARES_INCLUDE_DIR}
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/cares/cares
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags/include
+ PRIVATE third_party/googletest/googletest/include
+ PRIVATE third_party/googletest/googletest
+ PRIVATE third_party/googletest/googlemock/include
+ PRIVATE third_party/googletest/googlemock
+ PRIVATE ${_gRPC_PROTO_GENS_DIR}
+)
+
+target_link_libraries(backoff_test
+ ${_gRPC_PROTOBUF_LIBRARIES}
+ ${_gRPC_ALLTARGETS_LIBRARIES}
+ grpc_test_util
+ grpc
+ gpr_test_util
+ gpr
+ ${_gRPC_GFLAGS_LIBRARIES}
+)
+
+endif (gRPC_BUILD_TESTS)
+if (gRPC_BUILD_TESTS)
+
add_executable(bdp_estimator_test
test/core/transport/bdp_estimator_test.cc
third_party/googletest/googletest/src/gtest-all.cc
diff --git a/Makefile b/Makefile
index aabe135bd6..e51882c364 100644
--- a/Makefile
+++ b/Makefile
@@ -951,7 +951,6 @@ alloc_test: $(BINDIR)/$(CONFIG)/alloc_test
alpn_test: $(BINDIR)/$(CONFIG)/alpn_test
api_fuzzer: $(BINDIR)/$(CONFIG)/api_fuzzer
arena_test: $(BINDIR)/$(CONFIG)/arena_test
-backoff_test: $(BINDIR)/$(CONFIG)/backoff_test
bad_server_response_test: $(BINDIR)/$(CONFIG)/bad_server_response_test
bin_decoder_test: $(BINDIR)/$(CONFIG)/bin_decoder_test
bin_encoder_test: $(BINDIR)/$(CONFIG)/bin_encoder_test
@@ -1094,6 +1093,7 @@ wakeup_fd_cv_test: $(BINDIR)/$(CONFIG)/wakeup_fd_cv_test
alarm_cpp_test: $(BINDIR)/$(CONFIG)/alarm_cpp_test
async_end2end_test: $(BINDIR)/$(CONFIG)/async_end2end_test
auth_property_iterator_test: $(BINDIR)/$(CONFIG)/auth_property_iterator_test
+backoff_test: $(BINDIR)/$(CONFIG)/backoff_test
bdp_estimator_test: $(BINDIR)/$(CONFIG)/bdp_estimator_test
bm_arena: $(BINDIR)/$(CONFIG)/bm_arena
bm_call_create: $(BINDIR)/$(CONFIG)/bm_call_create
@@ -1352,7 +1352,6 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/alloc_test \
$(BINDIR)/$(CONFIG)/alpn_test \
$(BINDIR)/$(CONFIG)/arena_test \
- $(BINDIR)/$(CONFIG)/backoff_test \
$(BINDIR)/$(CONFIG)/bad_server_response_test \
$(BINDIR)/$(CONFIG)/bin_decoder_test \
$(BINDIR)/$(CONFIG)/bin_encoder_test \
@@ -1541,6 +1540,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/alarm_cpp_test \
$(BINDIR)/$(CONFIG)/async_end2end_test \
$(BINDIR)/$(CONFIG)/auth_property_iterator_test \
+ $(BINDIR)/$(CONFIG)/backoff_test \
$(BINDIR)/$(CONFIG)/bdp_estimator_test \
$(BINDIR)/$(CONFIG)/bm_arena \
$(BINDIR)/$(CONFIG)/bm_call_create \
@@ -1669,6 +1669,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/alarm_cpp_test \
$(BINDIR)/$(CONFIG)/async_end2end_test \
$(BINDIR)/$(CONFIG)/auth_property_iterator_test \
+ $(BINDIR)/$(CONFIG)/backoff_test \
$(BINDIR)/$(CONFIG)/bdp_estimator_test \
$(BINDIR)/$(CONFIG)/bm_arena \
$(BINDIR)/$(CONFIG)/bm_call_create \
@@ -1772,8 +1773,6 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/alpn_test || ( echo test alpn_test failed ; exit 1 )
$(E) "[RUN] Testing arena_test"
$(Q) $(BINDIR)/$(CONFIG)/arena_test || ( echo test arena_test failed ; exit 1 )
- $(E) "[RUN] Testing backoff_test"
- $(Q) $(BINDIR)/$(CONFIG)/backoff_test || ( echo test backoff_test failed ; exit 1 )
$(E) "[RUN] Testing bad_server_response_test"
$(Q) $(BINDIR)/$(CONFIG)/bad_server_response_test || ( echo test bad_server_response_test failed ; exit 1 )
$(E) "[RUN] Testing bin_decoder_test"
@@ -2038,6 +2037,8 @@ test_cxx: buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/async_end2end_test || ( echo test async_end2end_test failed ; exit 1 )
$(E) "[RUN] Testing auth_property_iterator_test"
$(Q) $(BINDIR)/$(CONFIG)/auth_property_iterator_test || ( echo test auth_property_iterator_test failed ; exit 1 )
+ $(E) "[RUN] Testing backoff_test"
+ $(Q) $(BINDIR)/$(CONFIG)/backoff_test || ( echo test backoff_test failed ; exit 1 )
$(E) "[RUN] Testing bdp_estimator_test"
$(Q) $(BINDIR)/$(CONFIG)/bdp_estimator_test || ( echo test bdp_estimator_test failed ; exit 1 )
$(E) "[RUN] Testing bm_arena"
@@ -2796,14 +2797,14 @@ install-plugins: $(PROTOC_PLUGINS)
install-pkg-config_c: pc_c pc_c_unsecure
$(E) "[INSTALL] Installing C pkg-config files"
$(Q) $(INSTALL) -d $(prefix)/lib/pkgconfig
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc $(prefix)/lib/pkgconfig/grpc.pc
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc $(prefix)/lib/pkgconfig/grpc_unsecure.pc
+ $(Q) $(INSTALL) -m 0644 $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc $(prefix)/lib/pkgconfig/grpc.pc
+ $(Q) $(INSTALL) -m 0644 $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc $(prefix)/lib/pkgconfig/grpc_unsecure.pc
install-pkg-config_cxx: pc_cxx pc_cxx_unsecure
$(E) "[INSTALL] Installing C++ pkg-config files"
$(Q) $(INSTALL) -d $(prefix)/lib/pkgconfig
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc $(prefix)/lib/pkgconfig/grpc++.pc
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc $(prefix)/lib/pkgconfig/grpc++_unsecure.pc
+ $(Q) $(INSTALL) -m 0644 $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc $(prefix)/lib/pkgconfig/grpc++.pc
+ $(Q) $(INSTALL) -m 0644 $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc $(prefix)/lib/pkgconfig/grpc++_unsecure.pc
install-certs: etc/roots.pem
$(E) "[INSTALL] Installing root certificates"
@@ -8912,38 +8913,6 @@ endif
endif
-BACKOFF_TEST_SRC = \
- test/core/backoff/backoff_test.cc \
-
-BACKOFF_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BACKOFF_TEST_SRC))))
-ifeq ($(NO_SECURE),true)
-
-# You can't build secure targets if you don't have OpenSSL.
-
-$(BINDIR)/$(CONFIG)/backoff_test: openssl_dep_error
-
-else
-
-
-
-$(BINDIR)/$(CONFIG)/backoff_test: $(BACKOFF_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
- $(E) "[LD] Linking $@"
- $(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) $(BACKOFF_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/backoff_test
-
-endif
-
-$(OBJDIR)/$(CONFIG)/test/core/backoff/backoff_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
-
-deps_backoff_test: $(BACKOFF_TEST_OBJS:.o=.dep)
-
-ifneq ($(NO_SECURE),true)
-ifneq ($(NO_DEPS),true)
--include $(BACKOFF_TEST_OBJS:.o=.dep)
-endif
-endif
-
-
BAD_SERVER_RESPONSE_TEST_SRC = \
test/core/end2end/bad_server_response_test.cc \
@@ -13533,6 +13502,49 @@ endif
endif
+BACKOFF_TEST_SRC = \
+ test/core/backoff/backoff_test.cc \
+
+BACKOFF_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BACKOFF_TEST_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/backoff_test: openssl_dep_error
+
+else
+
+
+
+
+ifeq ($(NO_PROTOBUF),true)
+
+# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+.
+
+$(BINDIR)/$(CONFIG)/backoff_test: protobuf_dep_error
+
+else
+
+$(BINDIR)/$(CONFIG)/backoff_test: $(PROTOBUF_DEP) $(BACKOFF_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LDXX) $(LDFLAGS) $(BACKOFF_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/backoff_test
+
+endif
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/core/backoff/backoff_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+deps_backoff_test: $(BACKOFF_TEST_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(BACKOFF_TEST_OBJS:.o=.dep)
+endif
+endif
+
+
BDP_ESTIMATOR_TEST_SRC = \
test/core/transport/bdp_estimator_test.cc \
diff --git a/README.md b/README.md
index 53078e6078..fc72c7c1ba 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,8 @@
[![Join the chat at https://gitter.im/grpc/grpc](https://badges.gitter.im/grpc/grpc.svg)](https://gitter.im/grpc/grpc?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-Copyright 2015 Google Inc.
+Copyright 2015
+[The gRPC Authors](https://github.com/grpc/grpc/blob/master/AUTHORS)
# Documentation
diff --git a/binding.gyp b/binding.gyp
deleted file mode 100644
index cb0a2fbab1..0000000000
--- a/binding.gyp
+++ /dev/null
@@ -1,994 +0,0 @@
-# GRPC Node gyp file
-# This currently builds the Node extension and dependencies
-# This file has been automatically generated from a template file.
-# Please look at the templates directory instead.
-# This file can be regenerated from the template by running
-# tools/buildgen/generate_projects.sh
-
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Some of this file is built with the help of
-# https://n8.io/converting-a-c-library-to-gyp/
-{
- 'variables': {
- 'runtime%': 'node',
- # Some Node installations use the system installation of OpenSSL, and on
- # some systems, the system OpenSSL still does not have ALPN support. This
- # will let users recompile gRPC to work without ALPN.
- 'grpc_alpn%': 'true',
- # Indicates that the library should be built with gcov.
- 'grpc_gcov%': 'false',
- # Indicates that the library should be built with compatibility for musl
- # libc, so that it can run on Alpine Linux. This is only necessary if not
- # building on Alpine Linux
- 'grpc_alpine%': 'false'
- },
- 'target_defaults': {
- 'configurations': {
- 'Release': {
- 'cflags': [
- '-O2',
- ],
- 'defines': [
- 'NDEBUG',
- ],
- },
- 'Debug': {
- 'cflags': [
- '-O0',
- ],
- 'defines': [
- '_DEBUG',
- 'DEBUG',
- ],
- },
- },
- 'cflags': [
- '-g',
- '-Wall',
- '-Wextra',
- '-Werror',
- '-Wno-long-long',
- '-Wno-unused-parameter',
- '-DOSATOMIC_USE_INLINED=1',
- ],
- 'ldflags': [
- '-g',
- ],
- 'cflags_c': [
- '-Werror',
- '-std=c99'
- ],
- 'cflags_cc': [
- '-Werror',
- '-std=c++11'
- ],
- 'include_dirs': [
- '.',
- 'include'
- ],
- 'defines': [
- 'GPR_BACKWARDS_COMPATIBILITY_MODE',
- 'GRPC_ARES=0',
- 'GRPC_UV'
- ],
- 'conditions': [
- ['grpc_gcov=="true"', {
- 'cflags': [
- '-O0',
- '-fprofile-arcs',
- '-ftest-coverage',
- '-Wno-return-type',
- ],
- 'defines': [
- '_DEBUG',
- 'DEBUG',
- 'GPR_GCOV',
- ],
- 'ldflags': [
- '-fprofile-arcs',
- '-ftest-coverage',
- '-rdynamic',
- ],
- }],
- ['grpc_alpine=="true"', {
- 'defines': [
- 'GPR_MUSL_LIBC_COMPAT'
- ]
- }],
- ['OS!="win" and runtime=="electron"', {
- "defines": [
- 'OPENSSL_NO_THREADS'
- ]
- }],
- # This is the condition for using boringssl
- ['OS=="win" or runtime=="electron"', {
- "include_dirs": [
- "third_party/boringssl/include"
- ],
- "defines": [
- 'OPENSSL_NO_ASM'
- ]
- }, {
- 'conditions': [
- ["target_arch=='ia32'", {
- "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ]
- }],
- ["target_arch=='x64'", {
- "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ]
- }],
- ["target_arch=='arm'", {
- "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ]
- }],
- ['grpc_alpn=="true"', {
- 'defines': [
- 'TSI_OPENSSL_ALPN_SUPPORT=1'
- ],
- }, {
- 'defines': [
- 'TSI_OPENSSL_ALPN_SUPPORT=0'
- ],
- }]
- ],
- 'include_dirs': [
- '<(node_root_dir)/deps/openssl/openssl/include',
- ]
- }],
- ['OS == "win"', {
- "include_dirs": [
- "third_party/zlib",
- "third_party/cares/cares"
- ],
- "defines": [
- '_WIN32_WINNT=0x0600',
- 'WIN32_LEAN_AND_MEAN',
- '_HAS_EXCEPTIONS=0',
- 'UNICODE',
- '_UNICODE',
- 'NOMINMAX',
- ],
- "msvs_settings": {
- 'VCCLCompilerTool': {
- 'RuntimeLibrary': 1, # static debug
- }
- },
- "libraries": [
- "ws2_32"
- ]
- }, { # OS != "win"
- 'include_dirs': [
- '<(node_root_dir)/deps/zlib',
- '<(node_root_dir)/deps/cares/include'
- ]
- }],
- ['OS == "mac"', {
- 'xcode_settings': {
- 'OTHER_CFLAGS': [
- '-g',
- '-Wall',
- '-Wextra',
- '-Werror',
- '-Wno-long-long',
- '-Wno-unused-parameter',
- '-DOSATOMIC_USE_INLINED=1',
- ],
- 'OTHER_CPLUSPLUSFLAGS': [
- '-g',
- '-Wall',
- '-Wextra',
- '-Werror',
- '-Wno-long-long',
- '-Wno-unused-parameter',
- '-DOSATOMIC_USE_INLINED=1',
- '-stdlib=libc++',
- '-std=c++11',
- '-Wno-error=deprecated-declarations'
- ],
- },
- }]
- ]
- },
- 'conditions': [
- ['OS=="win" or runtime=="electron"', {
- 'targets': [
- {
- 'target_name': 'boringssl',
- 'product_prefix': 'lib',
- 'type': 'static_library',
- 'dependencies': [
- ],
- 'sources': [
- 'src/boringssl/err_data.c',
- 'third_party/boringssl/crypto/aes/aes.c',
- 'third_party/boringssl/crypto/aes/key_wrap.c',
- 'third_party/boringssl/crypto/aes/mode_wrappers.c',
- 'third_party/boringssl/crypto/asn1/a_bitstr.c',
- 'third_party/boringssl/crypto/asn1/a_bool.c',
- 'third_party/boringssl/crypto/asn1/a_d2i_fp.c',
- 'third_party/boringssl/crypto/asn1/a_dup.c',
- 'third_party/boringssl/crypto/asn1/a_enum.c',
- 'third_party/boringssl/crypto/asn1/a_gentm.c',
- 'third_party/boringssl/crypto/asn1/a_i2d_fp.c',
- 'third_party/boringssl/crypto/asn1/a_int.c',
- 'third_party/boringssl/crypto/asn1/a_mbstr.c',
- 'third_party/boringssl/crypto/asn1/a_object.c',
- 'third_party/boringssl/crypto/asn1/a_octet.c',
- 'third_party/boringssl/crypto/asn1/a_print.c',
- 'third_party/boringssl/crypto/asn1/a_strnid.c',
- 'third_party/boringssl/crypto/asn1/a_time.c',
- 'third_party/boringssl/crypto/asn1/a_type.c',
- 'third_party/boringssl/crypto/asn1/a_utctm.c',
- 'third_party/boringssl/crypto/asn1/a_utf8.c',
- 'third_party/boringssl/crypto/asn1/asn1_lib.c',
- 'third_party/boringssl/crypto/asn1/asn1_par.c',
- 'third_party/boringssl/crypto/asn1/asn_pack.c',
- 'third_party/boringssl/crypto/asn1/f_enum.c',
- 'third_party/boringssl/crypto/asn1/f_int.c',
- 'third_party/boringssl/crypto/asn1/f_string.c',
- 'third_party/boringssl/crypto/asn1/t_bitst.c',
- 'third_party/boringssl/crypto/asn1/tasn_dec.c',
- 'third_party/boringssl/crypto/asn1/tasn_enc.c',
- 'third_party/boringssl/crypto/asn1/tasn_fre.c',
- 'third_party/boringssl/crypto/asn1/tasn_new.c',
- 'third_party/boringssl/crypto/asn1/tasn_typ.c',
- 'third_party/boringssl/crypto/asn1/tasn_utl.c',
- 'third_party/boringssl/crypto/asn1/time_support.c',
- 'third_party/boringssl/crypto/asn1/x_bignum.c',
- 'third_party/boringssl/crypto/asn1/x_long.c',
- 'third_party/boringssl/crypto/base64/base64.c',
- 'third_party/boringssl/crypto/bio/bio.c',
- 'third_party/boringssl/crypto/bio/bio_mem.c',
- 'third_party/boringssl/crypto/bio/connect.c',
- 'third_party/boringssl/crypto/bio/fd.c',
- 'third_party/boringssl/crypto/bio/file.c',
- 'third_party/boringssl/crypto/bio/hexdump.c',
- 'third_party/boringssl/crypto/bio/pair.c',
- 'third_party/boringssl/crypto/bio/printf.c',
- 'third_party/boringssl/crypto/bio/socket.c',
- 'third_party/boringssl/crypto/bio/socket_helper.c',
- 'third_party/boringssl/crypto/bn/add.c',
- 'third_party/boringssl/crypto/bn/asm/x86_64-gcc.c',
- 'third_party/boringssl/crypto/bn/bn.c',
- 'third_party/boringssl/crypto/bn/bn_asn1.c',
- 'third_party/boringssl/crypto/bn/cmp.c',
- 'third_party/boringssl/crypto/bn/convert.c',
- 'third_party/boringssl/crypto/bn/ctx.c',
- 'third_party/boringssl/crypto/bn/div.c',
- 'third_party/boringssl/crypto/bn/exponentiation.c',
- 'third_party/boringssl/crypto/bn/gcd.c',
- 'third_party/boringssl/crypto/bn/generic.c',
- 'third_party/boringssl/crypto/bn/kronecker.c',
- 'third_party/boringssl/crypto/bn/montgomery.c',
- 'third_party/boringssl/crypto/bn/montgomery_inv.c',
- 'third_party/boringssl/crypto/bn/mul.c',
- 'third_party/boringssl/crypto/bn/prime.c',
- 'third_party/boringssl/crypto/bn/random.c',
- 'third_party/boringssl/crypto/bn/rsaz_exp.c',
- 'third_party/boringssl/crypto/bn/shift.c',
- 'third_party/boringssl/crypto/bn/sqrt.c',
- 'third_party/boringssl/crypto/buf/buf.c',
- 'third_party/boringssl/crypto/bytestring/asn1_compat.c',
- 'third_party/boringssl/crypto/bytestring/ber.c',
- 'third_party/boringssl/crypto/bytestring/cbb.c',
- 'third_party/boringssl/crypto/bytestring/cbs.c',
- 'third_party/boringssl/crypto/chacha/chacha.c',
- 'third_party/boringssl/crypto/cipher/aead.c',
- 'third_party/boringssl/crypto/cipher/cipher.c',
- 'third_party/boringssl/crypto/cipher/derive_key.c',
- 'third_party/boringssl/crypto/cipher/e_aes.c',
- 'third_party/boringssl/crypto/cipher/e_chacha20poly1305.c',
- 'third_party/boringssl/crypto/cipher/e_des.c',
- 'third_party/boringssl/crypto/cipher/e_null.c',
- 'third_party/boringssl/crypto/cipher/e_rc2.c',
- 'third_party/boringssl/crypto/cipher/e_rc4.c',
- 'third_party/boringssl/crypto/cipher/e_ssl3.c',
- 'third_party/boringssl/crypto/cipher/e_tls.c',
- 'third_party/boringssl/crypto/cipher/tls_cbc.c',
- 'third_party/boringssl/crypto/cmac/cmac.c',
- 'third_party/boringssl/crypto/conf/conf.c',
- 'third_party/boringssl/crypto/cpu-aarch64-linux.c',
- 'third_party/boringssl/crypto/cpu-arm-linux.c',
- 'third_party/boringssl/crypto/cpu-arm.c',
- 'third_party/boringssl/crypto/cpu-intel.c',
- 'third_party/boringssl/crypto/cpu-ppc64le.c',
- 'third_party/boringssl/crypto/crypto.c',
- 'third_party/boringssl/crypto/curve25519/curve25519.c',
- 'third_party/boringssl/crypto/curve25519/spake25519.c',
- 'third_party/boringssl/crypto/curve25519/x25519-x86_64.c',
- 'third_party/boringssl/crypto/des/des.c',
- 'third_party/boringssl/crypto/dh/check.c',
- 'third_party/boringssl/crypto/dh/dh.c',
- 'third_party/boringssl/crypto/dh/dh_asn1.c',
- 'third_party/boringssl/crypto/dh/params.c',
- 'third_party/boringssl/crypto/digest/digest.c',
- 'third_party/boringssl/crypto/digest/digests.c',
- 'third_party/boringssl/crypto/dsa/dsa.c',
- 'third_party/boringssl/crypto/dsa/dsa_asn1.c',
- 'third_party/boringssl/crypto/ec/ec.c',
- 'third_party/boringssl/crypto/ec/ec_asn1.c',
- 'third_party/boringssl/crypto/ec/ec_key.c',
- 'third_party/boringssl/crypto/ec/ec_montgomery.c',
- 'third_party/boringssl/crypto/ec/oct.c',
- 'third_party/boringssl/crypto/ec/p224-64.c',
- 'third_party/boringssl/crypto/ec/p256-64.c',
- 'third_party/boringssl/crypto/ec/p256-x86_64.c',
- 'third_party/boringssl/crypto/ec/simple.c',
- 'third_party/boringssl/crypto/ec/util-64.c',
- 'third_party/boringssl/crypto/ec/wnaf.c',
- 'third_party/boringssl/crypto/ecdh/ecdh.c',
- 'third_party/boringssl/crypto/ecdsa/ecdsa.c',
- 'third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c',
- 'third_party/boringssl/crypto/engine/engine.c',
- 'third_party/boringssl/crypto/err/err.c',
- 'third_party/boringssl/crypto/evp/digestsign.c',
- 'third_party/boringssl/crypto/evp/evp.c',
- 'third_party/boringssl/crypto/evp/evp_asn1.c',
- 'third_party/boringssl/crypto/evp/evp_ctx.c',
- 'third_party/boringssl/crypto/evp/p_dsa_asn1.c',
- 'third_party/boringssl/crypto/evp/p_ec.c',
- 'third_party/boringssl/crypto/evp/p_ec_asn1.c',
- 'third_party/boringssl/crypto/evp/p_rsa.c',
- 'third_party/boringssl/crypto/evp/p_rsa_asn1.c',
- 'third_party/boringssl/crypto/evp/pbkdf.c',
- 'third_party/boringssl/crypto/evp/print.c',
- 'third_party/boringssl/crypto/evp/sign.c',
- 'third_party/boringssl/crypto/ex_data.c',
- 'third_party/boringssl/crypto/hkdf/hkdf.c',
- 'third_party/boringssl/crypto/hmac/hmac.c',
- 'third_party/boringssl/crypto/lhash/lhash.c',
- 'third_party/boringssl/crypto/md4/md4.c',
- 'third_party/boringssl/crypto/md5/md5.c',
- 'third_party/boringssl/crypto/mem.c',
- 'third_party/boringssl/crypto/modes/cbc.c',
- 'third_party/boringssl/crypto/modes/cfb.c',
- 'third_party/boringssl/crypto/modes/ctr.c',
- 'third_party/boringssl/crypto/modes/gcm.c',
- 'third_party/boringssl/crypto/modes/ofb.c',
- 'third_party/boringssl/crypto/modes/polyval.c',
- 'third_party/boringssl/crypto/obj/obj.c',
- 'third_party/boringssl/crypto/obj/obj_xref.c',
- 'third_party/boringssl/crypto/pem/pem_all.c',
- 'third_party/boringssl/crypto/pem/pem_info.c',
- 'third_party/boringssl/crypto/pem/pem_lib.c',
- 'third_party/boringssl/crypto/pem/pem_oth.c',
- 'third_party/boringssl/crypto/pem/pem_pk8.c',
- 'third_party/boringssl/crypto/pem/pem_pkey.c',
- 'third_party/boringssl/crypto/pem/pem_x509.c',
- 'third_party/boringssl/crypto/pem/pem_xaux.c',
- 'third_party/boringssl/crypto/pkcs8/p5_pbev2.c',
- 'third_party/boringssl/crypto/pkcs8/p8_pkey.c',
- 'third_party/boringssl/crypto/pkcs8/pkcs8.c',
- 'third_party/boringssl/crypto/poly1305/poly1305.c',
- 'third_party/boringssl/crypto/poly1305/poly1305_arm.c',
- 'third_party/boringssl/crypto/poly1305/poly1305_vec.c',
- 'third_party/boringssl/crypto/pool/pool.c',
- 'third_party/boringssl/crypto/rand/deterministic.c',
- 'third_party/boringssl/crypto/rand/fuchsia.c',
- 'third_party/boringssl/crypto/rand/rand.c',
- 'third_party/boringssl/crypto/rand/urandom.c',
- 'third_party/boringssl/crypto/rand/windows.c',
- 'third_party/boringssl/crypto/rc4/rc4.c',
- 'third_party/boringssl/crypto/refcount_c11.c',
- 'third_party/boringssl/crypto/refcount_lock.c',
- 'third_party/boringssl/crypto/rsa/blinding.c',
- 'third_party/boringssl/crypto/rsa/padding.c',
- 'third_party/boringssl/crypto/rsa/rsa.c',
- 'third_party/boringssl/crypto/rsa/rsa_asn1.c',
- 'third_party/boringssl/crypto/rsa/rsa_impl.c',
- 'third_party/boringssl/crypto/sha/sha1-altivec.c',
- 'third_party/boringssl/crypto/sha/sha1.c',
- 'third_party/boringssl/crypto/sha/sha256.c',
- 'third_party/boringssl/crypto/sha/sha512.c',
- 'third_party/boringssl/crypto/stack/stack.c',
- 'third_party/boringssl/crypto/thread.c',
- 'third_party/boringssl/crypto/thread_none.c',
- 'third_party/boringssl/crypto/thread_pthread.c',
- 'third_party/boringssl/crypto/thread_win.c',
- 'third_party/boringssl/crypto/x509/a_digest.c',
- 'third_party/boringssl/crypto/x509/a_sign.c',
- 'third_party/boringssl/crypto/x509/a_strex.c',
- 'third_party/boringssl/crypto/x509/a_verify.c',
- 'third_party/boringssl/crypto/x509/algorithm.c',
- 'third_party/boringssl/crypto/x509/asn1_gen.c',
- 'third_party/boringssl/crypto/x509/by_dir.c',
- 'third_party/boringssl/crypto/x509/by_file.c',
- 'third_party/boringssl/crypto/x509/i2d_pr.c',
- 'third_party/boringssl/crypto/x509/pkcs7.c',
- 'third_party/boringssl/crypto/x509/rsa_pss.c',
- 'third_party/boringssl/crypto/x509/t_crl.c',
- 'third_party/boringssl/crypto/x509/t_req.c',
- 'third_party/boringssl/crypto/x509/t_x509.c',
- 'third_party/boringssl/crypto/x509/t_x509a.c',
- 'third_party/boringssl/crypto/x509/x509.c',
- 'third_party/boringssl/crypto/x509/x509_att.c',
- 'third_party/boringssl/crypto/x509/x509_cmp.c',
- 'third_party/boringssl/crypto/x509/x509_d2.c',
- 'third_party/boringssl/crypto/x509/x509_def.c',
- 'third_party/boringssl/crypto/x509/x509_ext.c',
- 'third_party/boringssl/crypto/x509/x509_lu.c',
- 'third_party/boringssl/crypto/x509/x509_obj.c',
- 'third_party/boringssl/crypto/x509/x509_r2x.c',
- 'third_party/boringssl/crypto/x509/x509_req.c',
- 'third_party/boringssl/crypto/x509/x509_set.c',
- 'third_party/boringssl/crypto/x509/x509_trs.c',
- 'third_party/boringssl/crypto/x509/x509_txt.c',
- 'third_party/boringssl/crypto/x509/x509_v3.c',
- 'third_party/boringssl/crypto/x509/x509_vfy.c',
- 'third_party/boringssl/crypto/x509/x509_vpm.c',
- 'third_party/boringssl/crypto/x509/x509cset.c',
- 'third_party/boringssl/crypto/x509/x509name.c',
- 'third_party/boringssl/crypto/x509/x509rset.c',
- 'third_party/boringssl/crypto/x509/x509spki.c',
- 'third_party/boringssl/crypto/x509/x509type.c',
- 'third_party/boringssl/crypto/x509/x_algor.c',
- 'third_party/boringssl/crypto/x509/x_all.c',
- 'third_party/boringssl/crypto/x509/x_attrib.c',
- 'third_party/boringssl/crypto/x509/x_crl.c',
- 'third_party/boringssl/crypto/x509/x_exten.c',
- 'third_party/boringssl/crypto/x509/x_info.c',
- 'third_party/boringssl/crypto/x509/x_name.c',
- 'third_party/boringssl/crypto/x509/x_pkey.c',
- 'third_party/boringssl/crypto/x509/x_pubkey.c',
- 'third_party/boringssl/crypto/x509/x_req.c',
- 'third_party/boringssl/crypto/x509/x_sig.c',
- 'third_party/boringssl/crypto/x509/x_spki.c',
- 'third_party/boringssl/crypto/x509/x_val.c',
- 'third_party/boringssl/crypto/x509/x_x509.c',
- 'third_party/boringssl/crypto/x509/x_x509a.c',
- 'third_party/boringssl/crypto/x509v3/pcy_cache.c',
- 'third_party/boringssl/crypto/x509v3/pcy_data.c',
- 'third_party/boringssl/crypto/x509v3/pcy_lib.c',
- 'third_party/boringssl/crypto/x509v3/pcy_map.c',
- 'third_party/boringssl/crypto/x509v3/pcy_node.c',
- 'third_party/boringssl/crypto/x509v3/pcy_tree.c',
- 'third_party/boringssl/crypto/x509v3/v3_akey.c',
- 'third_party/boringssl/crypto/x509v3/v3_akeya.c',
- 'third_party/boringssl/crypto/x509v3/v3_alt.c',
- 'third_party/boringssl/crypto/x509v3/v3_bcons.c',
- 'third_party/boringssl/crypto/x509v3/v3_bitst.c',
- 'third_party/boringssl/crypto/x509v3/v3_conf.c',
- 'third_party/boringssl/crypto/x509v3/v3_cpols.c',
- 'third_party/boringssl/crypto/x509v3/v3_crld.c',
- 'third_party/boringssl/crypto/x509v3/v3_enum.c',
- 'third_party/boringssl/crypto/x509v3/v3_extku.c',
- 'third_party/boringssl/crypto/x509v3/v3_genn.c',
- 'third_party/boringssl/crypto/x509v3/v3_ia5.c',
- 'third_party/boringssl/crypto/x509v3/v3_info.c',
- 'third_party/boringssl/crypto/x509v3/v3_int.c',
- 'third_party/boringssl/crypto/x509v3/v3_lib.c',
- 'third_party/boringssl/crypto/x509v3/v3_ncons.c',
- 'third_party/boringssl/crypto/x509v3/v3_pci.c',
- 'third_party/boringssl/crypto/x509v3/v3_pcia.c',
- 'third_party/boringssl/crypto/x509v3/v3_pcons.c',
- 'third_party/boringssl/crypto/x509v3/v3_pku.c',
- 'third_party/boringssl/crypto/x509v3/v3_pmaps.c',
- 'third_party/boringssl/crypto/x509v3/v3_prn.c',
- 'third_party/boringssl/crypto/x509v3/v3_purp.c',
- 'third_party/boringssl/crypto/x509v3/v3_skey.c',
- 'third_party/boringssl/crypto/x509v3/v3_sxnet.c',
- 'third_party/boringssl/crypto/x509v3/v3_utl.c',
- 'third_party/boringssl/ssl/bio_ssl.c',
- 'third_party/boringssl/ssl/custom_extensions.c',
- 'third_party/boringssl/ssl/d1_both.c',
- 'third_party/boringssl/ssl/d1_lib.c',
- 'third_party/boringssl/ssl/d1_pkt.c',
- 'third_party/boringssl/ssl/d1_srtp.c',
- 'third_party/boringssl/ssl/dtls_method.c',
- 'third_party/boringssl/ssl/dtls_record.c',
- 'third_party/boringssl/ssl/handshake_client.c',
- 'third_party/boringssl/ssl/handshake_server.c',
- 'third_party/boringssl/ssl/s3_both.c',
- 'third_party/boringssl/ssl/s3_lib.c',
- 'third_party/boringssl/ssl/s3_pkt.c',
- 'third_party/boringssl/ssl/ssl_aead_ctx.c',
- 'third_party/boringssl/ssl/ssl_asn1.c',
- 'third_party/boringssl/ssl/ssl_buffer.c',
- 'third_party/boringssl/ssl/ssl_cert.c',
- 'third_party/boringssl/ssl/ssl_cipher.c',
- 'third_party/boringssl/ssl/ssl_ecdh.c',
- 'third_party/boringssl/ssl/ssl_file.c',
- 'third_party/boringssl/ssl/ssl_lib.c',
- 'third_party/boringssl/ssl/ssl_privkey.c',
- 'third_party/boringssl/ssl/ssl_privkey_cc.cc',
- 'third_party/boringssl/ssl/ssl_session.c',
- 'third_party/boringssl/ssl/ssl_stat.c',
- 'third_party/boringssl/ssl/ssl_transcript.c',
- 'third_party/boringssl/ssl/ssl_x509.c',
- 'third_party/boringssl/ssl/t1_enc.c',
- 'third_party/boringssl/ssl/t1_lib.c',
- 'third_party/boringssl/ssl/tls13_both.c',
- 'third_party/boringssl/ssl/tls13_client.c',
- 'third_party/boringssl/ssl/tls13_enc.c',
- 'third_party/boringssl/ssl/tls13_server.c',
- 'third_party/boringssl/ssl/tls_method.c',
- 'third_party/boringssl/ssl/tls_record.c',
- ],
- 'conditions': [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'MACOSX_DEPLOYMENT_TARGET': '10.9'
- }
- }]
- ]
- },
- ],
- }],
- ['OS == "win" and runtime!="electron"', {
- 'targets': [
- {
- # IMPORTANT WINDOWS BUILD INFORMATION
- # This library does not build on Windows without modifying the Node
- # development packages that node-gyp downloads in order to build.
- # Due to https://github.com/nodejs/node/issues/4932, the headers for
- # BoringSSL conflict with the OpenSSL headers included by default
- # when including the Node headers. The remedy for this is to remove
- # the OpenSSL headers, from the downloaded Node development package,
- # which is typically located in `.node-gyp` in your home directory.
- #
- # This is not true of Electron, which does not have OpenSSL headers.
- 'target_name': 'WINDOWS_BUILD_WARNING',
- 'rules': [
- {
- 'rule_name': 'WINDOWS_BUILD_WARNING',
- 'extension': 'S',
- 'inputs': [
- 'package.json'
- ],
- 'outputs': [
- 'ignore_this_part'
- ],
- 'action': ['echo', 'IMPORTANT: Due to https://github.com/nodejs/node/issues/4932, to build this library on Windows, you must first remove <(node_root_dir)/include/node/openssl/']
- }
- ]
- },
- ]
- }],
- ['OS == "win"', {
- 'targets': [
- # Only want to compile zlib under Windows
- {
- 'target_name': 'z',
- 'product_prefix': 'lib',
- 'type': 'static_library',
- 'dependencies': [
- ],
- 'sources': [
- 'third_party/zlib/adler32.c',
- 'third_party/zlib/compress.c',
- 'third_party/zlib/crc32.c',
- 'third_party/zlib/deflate.c',
- 'third_party/zlib/gzclose.c',
- 'third_party/zlib/gzlib.c',
- 'third_party/zlib/gzread.c',
- 'third_party/zlib/gzwrite.c',
- 'third_party/zlib/infback.c',
- 'third_party/zlib/inffast.c',
- 'third_party/zlib/inflate.c',
- 'third_party/zlib/inftrees.c',
- 'third_party/zlib/trees.c',
- 'third_party/zlib/uncompr.c',
- 'third_party/zlib/zutil.c',
- ]
- },
- ]
- }]
- ],
- 'targets': [
- {
- 'target_name': 'gpr',
- 'product_prefix': 'lib',
- 'type': 'static_library',
- 'dependencies': [
- ],
- 'sources': [
- 'src/core/lib/profiling/basic_timers.c',
- 'src/core/lib/profiling/stap_timers.c',
- 'src/core/lib/support/alloc.c',
- 'src/core/lib/support/arena.c',
- 'src/core/lib/support/atm.c',
- 'src/core/lib/support/avl.c',
- 'src/core/lib/support/backoff.c',
- 'src/core/lib/support/cmdline.c',
- 'src/core/lib/support/cpu_iphone.c',
- 'src/core/lib/support/cpu_linux.c',
- 'src/core/lib/support/cpu_posix.c',
- 'src/core/lib/support/cpu_windows.c',
- 'src/core/lib/support/env_linux.c',
- 'src/core/lib/support/env_posix.c',
- 'src/core/lib/support/env_windows.c',
- 'src/core/lib/support/fork.c',
- 'src/core/lib/support/histogram.c',
- 'src/core/lib/support/host_port.c',
- 'src/core/lib/support/log.c',
- 'src/core/lib/support/log_android.c',
- 'src/core/lib/support/log_linux.c',
- 'src/core/lib/support/log_posix.c',
- 'src/core/lib/support/log_windows.c',
- 'src/core/lib/support/mpscq.c',
- 'src/core/lib/support/murmur_hash.c',
- 'src/core/lib/support/stack_lockfree.c',
- 'src/core/lib/support/string.c',
- 'src/core/lib/support/string_posix.c',
- 'src/core/lib/support/string_util_windows.c',
- 'src/core/lib/support/string_windows.c',
- 'src/core/lib/support/subprocess_posix.c',
- 'src/core/lib/support/subprocess_windows.c',
- 'src/core/lib/support/sync.c',
- 'src/core/lib/support/sync_posix.c',
- 'src/core/lib/support/sync_windows.c',
- 'src/core/lib/support/thd.c',
- 'src/core/lib/support/thd_posix.c',
- 'src/core/lib/support/thd_windows.c',
- 'src/core/lib/support/time.c',
- 'src/core/lib/support/time_posix.c',
- 'src/core/lib/support/time_precise.c',
- 'src/core/lib/support/time_windows.c',
- 'src/core/lib/support/tls_pthread.c',
- 'src/core/lib/support/tmpfile_msys.c',
- 'src/core/lib/support/tmpfile_posix.c',
- 'src/core/lib/support/tmpfile_windows.c',
- 'src/core/lib/support/wrap_memcpy.c',
- ],
- 'conditions': [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'MACOSX_DEPLOYMENT_TARGET': '10.9'
- }
- }]
- ]
- },
- {
- 'target_name': 'grpc',
- 'product_prefix': 'lib',
- 'type': 'static_library',
- 'dependencies': [
- 'gpr',
- ],
- 'sources': [
- 'src/core/lib/surface/init.c',
- 'src/core/lib/channel/channel_args.c',
- 'src/core/lib/channel/channel_stack.c',
- 'src/core/lib/channel/channel_stack_builder.c',
- 'src/core/lib/channel/connected_channel.c',
- 'src/core/lib/channel/handshaker.c',
- 'src/core/lib/channel/handshaker_factory.c',
- 'src/core/lib/channel/handshaker_registry.c',
- 'src/core/lib/compression/compression.c',
- 'src/core/lib/compression/message_compress.c',
- 'src/core/lib/compression/stream_compression.c',
- 'src/core/lib/compression/stream_compression_gzip.c',
- 'src/core/lib/compression/stream_compression_identity.c',
- 'src/core/lib/debug/stats.c',
- 'src/core/lib/debug/stats_data.c',
- 'src/core/lib/http/format_request.c',
- 'src/core/lib/http/httpcli.c',
- 'src/core/lib/http/parser.c',
- 'src/core/lib/iomgr/call_combiner.c',
- 'src/core/lib/iomgr/closure.c',
- 'src/core/lib/iomgr/combiner.c',
- 'src/core/lib/iomgr/endpoint.c',
- 'src/core/lib/iomgr/endpoint_pair_posix.c',
- 'src/core/lib/iomgr/endpoint_pair_uv.c',
- 'src/core/lib/iomgr/endpoint_pair_windows.c',
- 'src/core/lib/iomgr/error.c',
- 'src/core/lib/iomgr/ev_epoll1_linux.c',
- 'src/core/lib/iomgr/ev_epollex_linux.c',
- 'src/core/lib/iomgr/ev_epollsig_linux.c',
- 'src/core/lib/iomgr/ev_poll_posix.c',
- 'src/core/lib/iomgr/ev_posix.c',
- 'src/core/lib/iomgr/ev_windows.c',
- 'src/core/lib/iomgr/exec_ctx.c',
- 'src/core/lib/iomgr/executor.c',
- 'src/core/lib/iomgr/fork_posix.c',
- 'src/core/lib/iomgr/fork_windows.c',
- 'src/core/lib/iomgr/gethostname_fallback.c',
- 'src/core/lib/iomgr/gethostname_host_name_max.c',
- 'src/core/lib/iomgr/gethostname_sysconf.c',
- 'src/core/lib/iomgr/iocp_windows.c',
- 'src/core/lib/iomgr/iomgr.c',
- 'src/core/lib/iomgr/iomgr_posix.c',
- 'src/core/lib/iomgr/iomgr_uv.c',
- 'src/core/lib/iomgr/iomgr_windows.c',
- 'src/core/lib/iomgr/is_epollexclusive_available.c',
- 'src/core/lib/iomgr/load_file.c',
- 'src/core/lib/iomgr/lockfree_event.c',
- 'src/core/lib/iomgr/network_status_tracker.c',
- 'src/core/lib/iomgr/polling_entity.c',
- 'src/core/lib/iomgr/pollset_set_uv.c',
- 'src/core/lib/iomgr/pollset_set_windows.c',
- 'src/core/lib/iomgr/pollset_uv.c',
- 'src/core/lib/iomgr/pollset_windows.c',
- 'src/core/lib/iomgr/resolve_address_posix.c',
- 'src/core/lib/iomgr/resolve_address_uv.c',
- 'src/core/lib/iomgr/resolve_address_windows.c',
- 'src/core/lib/iomgr/resource_quota.c',
- 'src/core/lib/iomgr/sockaddr_utils.c',
- 'src/core/lib/iomgr/socket_factory_posix.c',
- 'src/core/lib/iomgr/socket_mutator.c',
- 'src/core/lib/iomgr/socket_utils_common_posix.c',
- 'src/core/lib/iomgr/socket_utils_linux.c',
- 'src/core/lib/iomgr/socket_utils_posix.c',
- 'src/core/lib/iomgr/socket_utils_uv.c',
- 'src/core/lib/iomgr/socket_utils_windows.c',
- 'src/core/lib/iomgr/socket_windows.c',
- 'src/core/lib/iomgr/tcp_client_posix.c',
- 'src/core/lib/iomgr/tcp_client_uv.c',
- 'src/core/lib/iomgr/tcp_client_windows.c',
- 'src/core/lib/iomgr/tcp_posix.c',
- 'src/core/lib/iomgr/tcp_server_posix.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_common.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_uv.c',
- 'src/core/lib/iomgr/tcp_server_windows.c',
- 'src/core/lib/iomgr/tcp_uv.c',
- 'src/core/lib/iomgr/tcp_windows.c',
- 'src/core/lib/iomgr/time_averaged_stats.c',
- 'src/core/lib/iomgr/timer_generic.c',
- 'src/core/lib/iomgr/timer_heap.c',
- 'src/core/lib/iomgr/timer_manager.c',
- 'src/core/lib/iomgr/timer_uv.c',
- 'src/core/lib/iomgr/udp_server.c',
- 'src/core/lib/iomgr/unix_sockets_posix.c',
- 'src/core/lib/iomgr/unix_sockets_posix_noop.c',
- 'src/core/lib/iomgr/wakeup_fd_cv.c',
- 'src/core/lib/iomgr/wakeup_fd_eventfd.c',
- 'src/core/lib/iomgr/wakeup_fd_nospecial.c',
- 'src/core/lib/iomgr/wakeup_fd_pipe.c',
- 'src/core/lib/iomgr/wakeup_fd_posix.c',
- 'src/core/lib/json/json.c',
- 'src/core/lib/json/json_reader.c',
- 'src/core/lib/json/json_string.c',
- 'src/core/lib/json/json_writer.c',
- 'src/core/lib/slice/b64.c',
- 'src/core/lib/slice/percent_encoding.c',
- 'src/core/lib/slice/slice.c',
- 'src/core/lib/slice/slice_buffer.c',
- 'src/core/lib/slice/slice_hash_table.c',
- 'src/core/lib/slice/slice_intern.c',
- 'src/core/lib/slice/slice_string_helpers.c',
- 'src/core/lib/surface/alarm.c',
- 'src/core/lib/surface/api_trace.c',
- 'src/core/lib/surface/byte_buffer.c',
- 'src/core/lib/surface/byte_buffer_reader.c',
- 'src/core/lib/surface/call.c',
- 'src/core/lib/surface/call_details.c',
- 'src/core/lib/surface/call_log_batch.c',
- 'src/core/lib/surface/channel.c',
- 'src/core/lib/surface/channel_init.c',
- 'src/core/lib/surface/channel_ping.c',
- 'src/core/lib/surface/channel_stack_type.c',
- 'src/core/lib/surface/completion_queue.c',
- 'src/core/lib/surface/completion_queue_factory.c',
- 'src/core/lib/surface/event_string.c',
- 'src/core/lib/surface/lame_client.cc',
- 'src/core/lib/surface/metadata_array.c',
- 'src/core/lib/surface/server.c',
- 'src/core/lib/surface/validate_metadata.c',
- 'src/core/lib/surface/version.c',
- 'src/core/lib/transport/bdp_estimator.c',
- 'src/core/lib/transport/byte_stream.c',
- 'src/core/lib/transport/connectivity_state.c',
- 'src/core/lib/transport/error_utils.c',
- 'src/core/lib/transport/metadata.c',
- 'src/core/lib/transport/metadata_batch.c',
- 'src/core/lib/transport/pid_controller.c',
- 'src/core/lib/transport/service_config.c',
- 'src/core/lib/transport/static_metadata.c',
- 'src/core/lib/transport/status_conversion.c',
- 'src/core/lib/transport/timeout_encoding.c',
- 'src/core/lib/transport/transport.c',
- 'src/core/lib/transport/transport_op_string.c',
- 'src/core/lib/debug/trace.c',
- 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c',
- 'src/core/ext/transport/chttp2/transport/bin_decoder.c',
- 'src/core/ext/transport/chttp2/transport/bin_encoder.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_transport.c',
- 'src/core/ext/transport/chttp2/transport/flow_control.c',
- 'src/core/ext/transport/chttp2/transport/frame_data.c',
- 'src/core/ext/transport/chttp2/transport/frame_goaway.c',
- 'src/core/ext/transport/chttp2/transport/frame_ping.c',
- 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c',
- 'src/core/ext/transport/chttp2/transport/frame_settings.c',
- 'src/core/ext/transport/chttp2/transport/frame_window_update.c',
- 'src/core/ext/transport/chttp2/transport/hpack_encoder.c',
- 'src/core/ext/transport/chttp2/transport/hpack_parser.c',
- 'src/core/ext/transport/chttp2/transport/hpack_table.c',
- 'src/core/ext/transport/chttp2/transport/http2_settings.c',
- 'src/core/ext/transport/chttp2/transport/huffsyms.c',
- 'src/core/ext/transport/chttp2/transport/incoming_metadata.c',
- 'src/core/ext/transport/chttp2/transport/parsing.c',
- 'src/core/ext/transport/chttp2/transport/stream_lists.c',
- 'src/core/ext/transport/chttp2/transport/stream_map.c',
- 'src/core/ext/transport/chttp2/transport/varint.c',
- 'src/core/ext/transport/chttp2/transport/writing.c',
- 'src/core/ext/transport/chttp2/alpn/alpn.c',
- 'src/core/ext/filters/http/client/http_client_filter.c',
- 'src/core/ext/filters/http/http_filters_plugin.c',
- 'src/core/ext/filters/http/message_compress/message_compress_filter.c',
- 'src/core/ext/filters/http/server/http_server_filter.c',
- 'src/core/lib/http/httpcli_security_connector.c',
- 'src/core/lib/security/context/security_context.c',
- 'src/core/lib/security/credentials/composite/composite_credentials.c',
- 'src/core/lib/security/credentials/credentials.c',
- 'src/core/lib/security/credentials/credentials_metadata.c',
- 'src/core/lib/security/credentials/fake/fake_credentials.c',
- 'src/core/lib/security/credentials/google_default/credentials_generic.c',
- 'src/core/lib/security/credentials/google_default/google_default_credentials.c',
- 'src/core/lib/security/credentials/iam/iam_credentials.c',
- 'src/core/lib/security/credentials/jwt/json_token.c',
- 'src/core/lib/security/credentials/jwt/jwt_credentials.c',
- 'src/core/lib/security/credentials/jwt/jwt_verifier.c',
- 'src/core/lib/security/credentials/oauth2/oauth2_credentials.c',
- 'src/core/lib/security/credentials/plugin/plugin_credentials.c',
- 'src/core/lib/security/credentials/ssl/ssl_credentials.c',
- 'src/core/lib/security/transport/client_auth_filter.c',
- 'src/core/lib/security/transport/lb_targets_info.c',
- 'src/core/lib/security/transport/secure_endpoint.c',
- 'src/core/lib/security/transport/security_connector.c',
- 'src/core/lib/security/transport/security_handshaker.c',
- 'src/core/lib/security/transport/server_auth_filter.c',
- 'src/core/lib/security/transport/tsi_error.c',
- 'src/core/lib/security/util/json_util.c',
- 'src/core/lib/surface/init_secure.c',
- 'src/core/tsi/fake_transport_security.c',
- 'src/core/tsi/gts_transport_security.c',
- 'src/core/tsi/ssl_transport_security.c',
- 'src/core/tsi/transport_security_grpc.c',
- 'src/core/tsi/transport_security.c',
- 'src/core/tsi/transport_security_adapter.c',
- 'src/core/ext/transport/chttp2/server/chttp2_server.c',
- 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c',
- 'src/core/ext/filters/client_channel/channel_connectivity.c',
- 'src/core/ext/filters/client_channel/client_channel.c',
- 'src/core/ext/filters/client_channel/client_channel_factory.c',
- 'src/core/ext/filters/client_channel/client_channel_plugin.c',
- 'src/core/ext/filters/client_channel/connector.c',
- 'src/core/ext/filters/client_channel/http_connect_handshaker.c',
- 'src/core/ext/filters/client_channel/http_proxy.c',
- 'src/core/ext/filters/client_channel/lb_policy.c',
- 'src/core/ext/filters/client_channel/lb_policy_factory.c',
- 'src/core/ext/filters/client_channel/lb_policy_registry.c',
- 'src/core/ext/filters/client_channel/parse_address.c',
- 'src/core/ext/filters/client_channel/proxy_mapper.c',
- 'src/core/ext/filters/client_channel/proxy_mapper_registry.c',
- 'src/core/ext/filters/client_channel/resolver.c',
- 'src/core/ext/filters/client_channel/resolver_factory.c',
- 'src/core/ext/filters/client_channel/resolver_registry.c',
- 'src/core/ext/filters/client_channel/retry_throttle.c',
- 'src/core/ext/filters/client_channel/subchannel.c',
- 'src/core/ext/filters/client_channel/subchannel_index.c',
- 'src/core/ext/filters/client_channel/uri_parser.c',
- 'src/core/ext/filters/deadline/deadline_filter.c',
- 'src/core/ext/transport/chttp2/client/chttp2_connector.c',
- 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
- 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c',
- 'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
- 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c',
- 'src/core/ext/transport/inproc/inproc_plugin.c',
- 'src/core/ext/transport/inproc/inproc_transport.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
- 'third_party/nanopb/pb_common.c',
- 'third_party/nanopb/pb_decode.c',
- 'third_party/nanopb/pb_encode.c',
- 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c',
- 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c',
- 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c',
- 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c',
- 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c',
- 'src/core/ext/filters/load_reporting/server_load_reporting_filter.c',
- 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.c',
- 'src/core/ext/census/base_resources.c',
- 'src/core/ext/census/context.c',
- 'src/core/ext/census/gen/census.pb.c',
- 'src/core/ext/census/gen/trace_context.pb.c',
- 'src/core/ext/census/grpc_context.c',
- 'src/core/ext/census/grpc_filter.c',
- 'src/core/ext/census/grpc_plugin.c',
- 'src/core/ext/census/initialize.c',
- 'src/core/ext/census/intrusive_hash_map.c',
- 'src/core/ext/census/mlog.c',
- 'src/core/ext/census/operation.c',
- 'src/core/ext/census/placeholders.c',
- 'src/core/ext/census/resource.c',
- 'src/core/ext/census/trace_context.c',
- 'src/core/ext/census/tracing.c',
- 'src/core/ext/filters/max_age/max_age_filter.c',
- 'src/core/ext/filters/message_size/message_size_filter.c',
- 'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c',
- 'src/core/ext/filters/workarounds/workaround_utils.c',
- 'src/core/plugin_registry/grpc_plugin_registry.c',
- ],
- 'conditions': [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'MACOSX_DEPLOYMENT_TARGET': '10.9'
- }
- }]
- ]
- },
- {
- 'include_dirs': [
- "<!(node -e \"require('nan')\")"
- ],
- 'cflags': [
- '-pthread',
- '-zdefs',
- '-Wno-error=deprecated-declarations'
- ],
- "conditions": [
- ['OS=="win" or runtime=="electron"', {
- 'dependencies': [
- "boringssl",
- ]
- }],
- ['OS=="win"', {
- 'dependencies': [
- "z",
- ]
- }],
- ['OS=="linux"', {
- 'ldflags': [
- '-Wl,-wrap,memcpy'
- ]
- }],
- ['OS == "mac"', {
- 'xcode_settings': {
- 'MACOSX_DEPLOYMENT_TARGET': '10.9'
- }
- }]
- ],
- "target_name": "grpc_node",
- "sources": [
- "src/node/ext/byte_buffer.cc",
- "src/node/ext/call.cc",
- "src/node/ext/call_credentials.cc",
- "src/node/ext/channel.cc",
- "src/node/ext/channel_credentials.cc",
- "src/node/ext/completion_queue.cc",
- "src/node/ext/node_grpc.cc",
- "src/node/ext/server.cc",
- "src/node/ext/server_credentials.cc",
- "src/node/ext/slice.cc",
- "src/node/ext/timeval.cc",
- ],
- "dependencies": [
- "grpc",
- "gpr",
- ]
- },
- {
- "target_name": "action_after_build",
- "type": "none",
- "dependencies": [ "<(module_name)" ],
- "copies": [
- {
- "files": [ "<(PRODUCT_DIR)/<(module_name).node"],
- "destination": "<(module_path)"
- }
- ]
- }
- ]
-}
diff --git a/build.yaml b/build.yaml
index 4f74c57533..42d7245981 100644
--- a/build.yaml
+++ b/build.yaml
@@ -1769,17 +1769,6 @@ targets:
- gpr_test_util
- gpr
uses_polling: false
-- name: backoff_test
- build: test
- language: c
- src:
- - test/core/backoff/backoff_test.cc
- deps:
- - grpc_test_util
- - grpc
- - gpr_test_util
- - gpr
- uses_polling: false
- name: bad_server_response_test
build: test
language: c
@@ -3457,6 +3446,17 @@ targets:
- gpr_test_util
- gpr
uses_polling: false
+- name: backoff_test
+ build: test
+ language: c++
+ src:
+ - test/core/backoff/backoff_test.cc
+ deps:
+ - grpc_test_util
+ - grpc
+ - gpr_test_util
+ - gpr
+ uses_polling: false
- name: bdp_estimator_test
build: test
language: c++
diff --git a/cmake/benchmark.cmake b/cmake/benchmark.cmake
new file mode 100644
index 0000000000..c6284225a3
--- /dev/null
+++ b/cmake/benchmark.cmake
@@ -0,0 +1,33 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if("${gRPC_BENCHMARK_PROVIDER}" STREQUAL "module")
+ if(NOT BENCHMARK_ROOT_DIR)
+ set(BENCHMARK_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/benchmark)
+ endif()
+ if(EXISTS "${BENCHMARK_ROOT_DIR}/CMakeLists.txt")
+ add_subdirectory(${BENCHMARK_ROOT_DIR} third_party/benchmark)
+ if(TARGET benchmark)
+ set(_gRPC_BENCHMARK_LIBRARIES benchmark)
+ endif()
+ else()
+ message(WARNING "gRPC_BENCHMARK_PROVIDER is \"module\" but BENCHMARK_ROOT_DIR is wrong")
+ endif()
+elseif("${gRPC_BENCHMARK_PROVIDER}" STREQUAL "package")
+ find_package(benchmark)
+ if(TARGET benchmark::benchmark)
+ set(_gRPC_BENCHMARK_LIBRARIES benchmark::benchmark)
+ endif()
+ set(_gRPC_FIND_BENCHMARK "if(NOT benchmark_FOUND)\n find_package(benchmark)\nendif()")
+endif()
diff --git a/cmake/cares.cmake b/cmake/cares.cmake
new file mode 100644
index 0000000000..521cf52e77
--- /dev/null
+++ b/cmake/cares.cmake
@@ -0,0 +1,36 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if("${gRPC_CARES_PROVIDER}" STREQUAL "module")
+ if(NOT CARES_ROOT_DIR)
+ set(CARES_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/cares/cares)
+ endif()
+ set(CARES_SHARED OFF CACHE BOOL "disable shared library")
+ set(CARES_STATIC ON CACHE BOOL "link cares statically")
+ set(CARES_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/cares/cares")
+ add_subdirectory(third_party/cares/cares)
+ if(TARGET c-ares)
+ set(_gRPC_CARES_LIBRARIES c-ares)
+ endif()
+ if(gRPC_INSTALL)
+ message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_CARES_PROVIDER is \"module\"")
+ set(gRPC_INSTALL FALSE)
+ endif()
+elseif("${gRPC_CARES_PROVIDER}" STREQUAL "package")
+ find_package(c-ares REQUIRED CONFIG)
+ if(TARGET c-ares::cares)
+ set(_gRPC_CARES_LIBRARIES c-ares::cares)
+ endif()
+ set(_gRPC_FIND_CARES "if(NOT c-ares_FOUND)\n find_package(c-ares CONFIG)\nendif()")
+endif()
diff --git a/cmake/gflags.cmake b/cmake/gflags.cmake
new file mode 100644
index 0000000000..1864bda357
--- /dev/null
+++ b/cmake/gflags.cmake
@@ -0,0 +1,33 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if("${gRPC_GFLAGS_PROVIDER}" STREQUAL "module")
+ if(NOT GFLAGS_ROOT_DIR)
+ set(GFLAGS_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/gflags)
+ endif()
+ if(EXISTS "${GFLAGS_ROOT_DIR}/CMakeLists.txt")
+ add_subdirectory(${GFLAGS_ROOT_DIR} third_party/gflags)
+ if(TARGET gflags_static)
+ set(_gRPC_GFLAGS_LIBRARIES gflags_static)
+ endif()
+ else()
+ message(WARNING "gRPC_GFLAGS_PROVIDER is \"module\" but GFLAGS_ROOT_DIR is wrong")
+ endif()
+elseif("${gRPC_GFLAGS_PROVIDER}" STREQUAL "package")
+ find_package(gflags)
+ if(TARGET gflags::gflags)
+ set(_gRPC_GFLAGS_LIBRARIES gflags::gflags)
+ endif()
+ set(_gRPC_FIND_GFLAGS "if(NOT gflags_FOUND)\n find_package(gflags)\nendif()")
+endif()
diff --git a/cmake/msvc_static_runtime.cmake b/cmake/msvc_static_runtime.cmake
index fc6d1d62d3..844bd02653 100644
--- a/cmake/msvc_static_runtime.cmake
+++ b/cmake/msvc_static_runtime.cmake
@@ -1,3 +1,17 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
option(gRPC_MSVC_STATIC_RUNTIME "Link with static msvc runtime libraries" OFF)
if(gRPC_MSVC_STATIC_RUNTIME)
diff --git a/cmake/protobuf.cmake b/cmake/protobuf.cmake
new file mode 100644
index 0000000000..e2206a2319
--- /dev/null
+++ b/cmake/protobuf.cmake
@@ -0,0 +1,77 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "module")
+ # Building the protobuf tests require gmock what is not part of a standard protobuf checkout.
+ # Disable them unless they are explicitly requested from the cmake command line (when we assume
+ # gmock is downloaded to the right location inside protobuf).
+ if(NOT protobuf_BUILD_TESTS)
+ set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
+ endif()
+ # Disable building protobuf with zlib. Building protobuf with zlib breaks
+ # the build if zlib is not installed on the system.
+ if(NOT protobuf_WITH_ZLIB)
+ set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build protobuf with zlib.")
+ endif()
+ if(NOT PROTOBUF_ROOT_DIR)
+ set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf)
+ endif()
+ set(PROTOBUF_WELLKNOWN_IMPORT_DIR ${PROTOBUF_ROOT_DIR}/src)
+ if(EXISTS "${PROTOBUF_ROOT_DIR}/cmake/CMakeLists.txt")
+ set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link static runtime libraries")
+ add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf)
+ if(TARGET ${_gRPC_PROTOBUF_LIBRARY_NAME})
+ set(_gRPC_PROTOBUF_LIBRARIES ${_gRPC_PROTOBUF_LIBRARY_NAME})
+ endif()
+ if(TARGET libprotoc)
+ set(_gRPC_PROTOBUF_PROTOC_LIBRARIES libprotoc)
+ endif()
+ if(TARGET protoc)
+ set(_gRPC_PROTOBUF_PROTOC protoc)
+ set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protoc>)
+ endif()
+ else()
+ message(WARNING "gRPC_PROTOBUF_PROVIDER is \"module\" but PROTOBUF_ROOT_DIR is wrong")
+ endif()
+ if(gRPC_INSTALL)
+ message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_PROTOBUF_PROVIDER is \"module\"")
+ set(gRPC_INSTALL FALSE)
+ endif()
+elseif("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "package")
+ find_package(Protobuf REQUIRED ${gRPC_PROTOBUF_PACKAGE_TYPE})
+ if(Protobuf_FOUND OR PROTOBUF_FOUND)
+ if(TARGET protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
+ set(_gRPC_PROTOBUF_LIBRARIES protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
+ else()
+ set(_gRPC_PROTOBUF_LIBRARIES ${PROTOBUF_LIBRARIES})
+ endif()
+ if(TARGET protobuf::libprotoc)
+ set(_gRPC_PROTOBUF_PROTOC_LIBRARIES protobuf::libprotoc)
+ else()
+ set(_gRPC_PROTOBUF_PROTOC_LIBRARIES ${PROTOBUF_PROTOC_LIBRARIES})
+ endif()
+ if(TARGET protobuf::protoc)
+ set(_gRPC_PROTOBUF_PROTOC protobuf::protoc)
+ set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protobuf::protoc>)
+ else()
+ set(_gRPC_PROTOBUF_PROTOC ${PROTOBUF_PROTOC_EXECUTABLE})
+ set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE})
+ endif()
+ set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND)\n find_package(Protobuf ${gRPC_PROTOBUF_PACKAGE_TYPE})\nendif()")
+ endif()
+ if(PROTOBUF_FOUND)
+ include_directories(${PROTOBUF_INCLUDE_DIRS})
+ endif()
+ set(PROTOBUF_WELLKNOWN_IMPORT_DIR /usr/local/include)
+endif()
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
new file mode 100644
index 0000000000..75ce069fe6
--- /dev/null
+++ b/cmake/ssl.cmake
@@ -0,0 +1,38 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if("${gRPC_SSL_PROVIDER}" STREQUAL "module")
+ if(NOT BORINGSSL_ROOT_DIR)
+ set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl)
+ endif()
+ if(EXISTS "${BORINGSSL_ROOT_DIR}/CMakeLists.txt")
+ set(OPENSSL_NO_ASM ON) # make boringssl buildable with Visual Studio
+ add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl)
+ if(TARGET ssl)
+ set(_gRPC_SSL_LIBRARIES ssl)
+ set(_gRPC_SSL_INCLUDE_DIR ${BORINGSSL_ROOT_DIR}/include)
+ endif()
+ else()
+ message(WARNING "gRPC_SSL_PROVIDER is \"module\" but BORINGSSL_ROOT_DIR is wrong")
+ endif()
+ if(gRPC_INSTALL)
+ message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_SSL_PROVIDER is \"module\"")
+ set(gRPC_INSTALL FALSE)
+ endif()
+elseif("${gRPC_SSL_PROVIDER}" STREQUAL "package")
+ find_package(OpenSSL REQUIRED)
+ set(_gRPC_SSL_LIBRARIES ${OPENSSL_LIBRARIES})
+ set(_gRPC_SSL_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR})
+ set(_gRPC_FIND_SSL "if(NOT OPENSSL_FOUND)\n find_package(OpenSSL)\nendif()")
+endif()
diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake
new file mode 100644
index 0000000000..16cd9e66d5
--- /dev/null
+++ b/cmake/zlib.cmake
@@ -0,0 +1,39 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if("${gRPC_ZLIB_PROVIDER}" STREQUAL "module")
+ if(NOT ZLIB_ROOT_DIR)
+ set(ZLIB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib)
+ endif()
+ set(ZLIB_INCLUDE_DIR "${ZLIB_ROOT_DIR}")
+ if(EXISTS "${ZLIB_ROOT_DIR}/CMakeLists.txt")
+ # TODO(jtattermusch): workaround for https://github.com/madler/zlib/issues/218
+ include_directories(${ZLIB_INCLUDE_DIR})
+
+ add_subdirectory(${ZLIB_ROOT_DIR} third_party/zlib)
+ if(TARGET zlibstatic)
+ set(_gRPC_ZLIB_LIBRARIES zlibstatic)
+ endif()
+ else()
+ message(WARNING "gRPC_ZLIB_PROVIDER is \"module\" but ZLIB_ROOT_DIR is wrong")
+ endif()
+ if(gRPC_INSTALL)
+ message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_ZLIB_PROVIDER is \"module\"")
+ set(gRPC_INSTALL FALSE)
+ endif()
+elseif("${gRPC_ZLIB_PROVIDER}" STREQUAL "package")
+ find_package(ZLIB REQUIRED)
+ set(_gRPC_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
+ set(_gRPC_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()")
+endif()
diff --git a/doc/PROTOCOL-WEB.md b/doc/PROTOCOL-WEB.md
index 226871d7ae..c31a048a7c 100644
--- a/doc/PROTOCOL-WEB.md
+++ b/doc/PROTOCOL-WEB.md
@@ -3,14 +3,14 @@
gRPC-Web provides a JS client library that supports the same API
as gRPC-Node to access a gRPC service. Due to browser limitation,
the Web client library implements a different protocol than the
-[native gRPC protocol](https://grpc.io/docs/guides/wire.html).
+[native gRPC protocol](PROTOCOL-HTTP2.md).
This protocol is designed to make it easy for a proxy to translate
between the protocols as this is the most likely deployment model.
This document lists the differences between the two protocols.
To help tracking future revisions, this document describes a delta
with the protocol details specified in the
-[native gRPC protocol](https://grpc.io/docs/guides/wire.html).
+[native gRPC protocol](PROTOCOL-HTTP2.md).
# Design goals
@@ -31,7 +31,7 @@ web-specific features such as CORS, XSRF
* become optional (in 1-2 years) when browsers are able to speak the native
gRPC protocol via the new [whatwg fetch/streams API](https://github.com/whatwg/fetch)
-# Protocol differences vs [gRPC over HTTP2](https://grpc.io/docs/guides/wire.html)
+# Protocol differences vs [gRPC over HTTP2](PROTOCOL-HTTP2.md)
Content-Type
@@ -53,14 +53,14 @@ HTTP wire protocols
---
-HTTP/2 related behavior (specified in [gRPC over HTTP2](https://grpc.io/docs/guides/wire.html))
+HTTP/2 related behavior (specified in [gRPC over HTTP2](PROTOCOL-HTTP2.md))
1. stream-id is not supported or used
2. go-away is not supported or used
---
-Message framing (vs. [http2-transport-mapping](https://grpc.io/docs/guides/wire.html#http2-transport-mapping))
+Message framing (vs. [http2-transport-mapping](PROTOCOL-HTTP2.md#http2-transport-mapping))
1. Response status encoded as part of the response body
* Key-value pairs encoded as a HTTP/1 headers block (without the terminating newline), per https://tools.ietf.org/html/rfc7230#section-3.2
@@ -86,7 +86,7 @@ in the body.
User Agent
* Do NOT use User-Agent header (which is to be set by browsers, by default)
-* Use X-User-Agent: grpc-web-javascript/0.1 (follow the same format as specified in [gRPC over HTTP2](https://grpc.io/docs/guides/wire.html))
+* Use X-User-Agent: grpc-web-javascript/0.1 (follow the same format as specified in [gRPC over HTTP2](PROTOCOL-HTTP2.md))
---
diff --git a/doc/md b/doc/md
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/doc/md
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index bc4b318cb2..708c3436ab 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -963,7 +963,8 @@ Pod::Spec.new do |s|
ss.dependency "#{s.name}/Cronet-Interface", version
ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc',
- 'src/core/ext/transport/cronet/transport/cronet_transport.{cc,h}',
+ 'src/core/ext/transport/cronet/transport/cronet_transport.cc',
+ 'src/core/ext/transport/cronet/transport/cronet_transport.h',
'third_party/objective_c/Cronet/bidirectional_stream_c.h'
end
@@ -973,17 +974,111 @@ Pod::Spec.new do |s|
ss.dependency "#{s.name}/Interface", version
ss.dependency "#{s.name}/Implementation", version
- ss.source_files = 'test/core/end2end/cq_verifier.{cc,h}',
- 'test/core/end2end/end2end_tests.{cc,h}',
- 'test/core/end2end/end2end_test_utils.cc',
- 'test/core/end2end/tests/*.{cc,h}',
- 'test/core/end2end/fixtures/*.h',
- 'test/core/end2end/data/*.{cc,h}',
- 'test/core/util/debugger_macros.{cc,h}',
- 'test/core/util/test_config.{cc,h}',
- 'test/core/util/port.h',
+ ss.source_files = 'test/core/util/test_config.cc',
+ 'test/core/util/test_config.h',
+ 'test/core/end2end/data/client_certs.cc',
+ 'test/core/end2end/data/server1_cert.cc',
+ 'test/core/end2end/data/server1_key.cc',
+ 'test/core/end2end/data/test_root_cert.cc',
+ 'test/core/security/oauth2_utils.cc',
+ 'test/core/end2end/cq_verifier.cc',
+ 'test/core/end2end/fixtures/http_proxy_fixture.cc',
+ 'test/core/end2end/fixtures/proxy.cc',
+ 'test/core/iomgr/endpoint_tests.cc',
+ 'test/core/util/debugger_macros.cc',
+ 'test/core/util/grpc_profiler.cc',
+ 'test/core/util/histogram.cc',
+ 'test/core/util/memory_counters.cc',
+ 'test/core/util/mock_endpoint.cc',
+ 'test/core/util/parse_hexstring.cc',
+ 'test/core/util/passthru_endpoint.cc',
'test/core/util/port.cc',
- 'test/core/util/port_server_client.{cc,h}'
+ 'test/core/util/port_isolated_runtime_environment.cc',
+ 'test/core/util/port_server_client.cc',
+ 'test/core/util/slice_splitter.cc',
+ 'test/core/util/tracer_util.cc',
+ 'test/core/util/trickle_endpoint.cc',
+ 'test/core/end2end/data/ssl_test_data.h',
+ 'test/core/security/oauth2_utils.h',
+ 'test/core/end2end/cq_verifier.h',
+ 'test/core/end2end/fixtures/http_proxy_fixture.h',
+ 'test/core/end2end/fixtures/proxy.h',
+ 'test/core/iomgr/endpoint_tests.h',
+ 'test/core/util/debugger_macros.h',
+ 'test/core/util/grpc_profiler.h',
+ 'test/core/util/histogram.h',
+ 'test/core/util/memory_counters.h',
+ 'test/core/util/mock_endpoint.h',
+ 'test/core/util/parse_hexstring.h',
+ 'test/core/util/passthru_endpoint.h',
+ 'test/core/util/port.h',
+ 'test/core/util/port_server_client.h',
+ 'test/core/util/slice_splitter.h',
+ 'test/core/util/tracer_util.h',
+ 'test/core/util/trickle_endpoint.h',
+ 'test/core/end2end/end2end_tests.cc',
+ 'test/core/end2end/end2end_test_utils.cc',
+ 'test/core/end2end/tests/authority_not_supported.cc',
+ 'test/core/end2end/tests/bad_hostname.cc',
+ 'test/core/end2end/tests/bad_ping.cc',
+ 'test/core/end2end/tests/binary_metadata.cc',
+ 'test/core/end2end/tests/call_creds.cc',
+ 'test/core/end2end/tests/cancel_after_accept.cc',
+ 'test/core/end2end/tests/cancel_after_client_done.cc',
+ 'test/core/end2end/tests/cancel_after_invoke.cc',
+ 'test/core/end2end/tests/cancel_after_round_trip.cc',
+ 'test/core/end2end/tests/cancel_before_invoke.cc',
+ 'test/core/end2end/tests/cancel_in_a_vacuum.cc',
+ 'test/core/end2end/tests/cancel_with_status.cc',
+ 'test/core/end2end/tests/compressed_payload.cc',
+ 'test/core/end2end/tests/connectivity.cc',
+ 'test/core/end2end/tests/default_host.cc',
+ 'test/core/end2end/tests/disappearing_server.cc',
+ 'test/core/end2end/tests/empty_batch.cc',
+ 'test/core/end2end/tests/filter_call_init_fails.cc',
+ 'test/core/end2end/tests/filter_causes_close.cc',
+ 'test/core/end2end/tests/filter_latency.cc',
+ 'test/core/end2end/tests/graceful_server_shutdown.cc',
+ 'test/core/end2end/tests/high_initial_seqno.cc',
+ 'test/core/end2end/tests/hpack_size.cc',
+ 'test/core/end2end/tests/idempotent_request.cc',
+ 'test/core/end2end/tests/invoke_large_request.cc',
+ 'test/core/end2end/tests/keepalive_timeout.cc',
+ 'test/core/end2end/tests/large_metadata.cc',
+ 'test/core/end2end/tests/load_reporting_hook.cc',
+ 'test/core/end2end/tests/max_concurrent_streams.cc',
+ 'test/core/end2end/tests/max_connection_age.cc',
+ 'test/core/end2end/tests/max_connection_idle.cc',
+ 'test/core/end2end/tests/max_message_length.cc',
+ 'test/core/end2end/tests/negative_deadline.cc',
+ 'test/core/end2end/tests/network_status_change.cc',
+ 'test/core/end2end/tests/no_logging.cc',
+ 'test/core/end2end/tests/no_op.cc',
+ 'test/core/end2end/tests/payload.cc',
+ 'test/core/end2end/tests/ping.cc',
+ 'test/core/end2end/tests/ping_pong_streaming.cc',
+ 'test/core/end2end/tests/proxy_auth.cc',
+ 'test/core/end2end/tests/registered_call.cc',
+ 'test/core/end2end/tests/request_with_flags.cc',
+ 'test/core/end2end/tests/request_with_payload.cc',
+ 'test/core/end2end/tests/resource_quota_server.cc',
+ 'test/core/end2end/tests/server_finishes_request.cc',
+ 'test/core/end2end/tests/shutdown_finishes_calls.cc',
+ 'test/core/end2end/tests/shutdown_finishes_tags.cc',
+ 'test/core/end2end/tests/simple_cacheable_request.cc',
+ 'test/core/end2end/tests/simple_delayed_request.cc',
+ 'test/core/end2end/tests/simple_metadata.cc',
+ 'test/core/end2end/tests/simple_request.cc',
+ 'test/core/end2end/tests/stream_compression_compressed_payload.cc',
+ 'test/core/end2end/tests/stream_compression_payload.cc',
+ 'test/core/end2end/tests/stream_compression_ping_pong_streaming.cc',
+ 'test/core/end2end/tests/streaming_error_response.cc',
+ 'test/core/end2end/tests/trailing_metadata.cc',
+ 'test/core/end2end/tests/workaround_cronet_compression.cc',
+ 'test/core/end2end/tests/write_buffering.cc',
+ 'test/core/end2end/tests/write_buffering_at_end.cc',
+ 'test/core/end2end/tests/cancel_test_helpers.h',
+ 'test/core/end2end/end2end_tests.h'
end
# TODO (mxyan): Instead of this hack, add include path "third_party" to C core's include path?
diff --git a/package.json b/package.json
deleted file mode 100644
index 2b7930ce70..0000000000
--- a/package.json
+++ /dev/null
@@ -1,103 +0,0 @@
-{
- "name": "grpc",
- "version": "1.7.2",
- "author": "Google Inc.",
- "description": "gRPC Library for Node",
- "homepage": "https://grpc.io/",
- "repository": {
- "type": "git",
- "url": "https://github.com/grpc/grpc.git"
- },
- "bugs": "https://github.com/grpc/grpc/issues",
- "contributors": [
- {
- "name": "Michael Lumish",
- "email": "mlumish@google.com"
- }
- ],
- "directories": {
- "lib": "src/node/src"
- },
- "scripts": {
- "lint": "node ./node_modules/jshint/bin/jshint src/node/src src/node/test src/node/interop src/node/index.js --exclude-path=src/node/.jshintignore",
- "test": "./node_modules/.bin/mocha src/node/test && npm run-script lint",
- "electron-build": "./node_modules/.bin/node-pre-gyp configure build --runtime=electron --disturl=https://atom.io/download/atom-shell",
- "gen_docs": "./node_modules/.bin/jsdoc -c src/node/jsdoc_conf.json",
- "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha src/node/test",
- "install": "./node_modules/.bin/node-pre-gyp install --fallback-to-build --library=static_library"
- },
- "bundledDependencies": [
- "node-pre-gyp"
- ],
- "dependencies": {
- "arguejs": "^0.2.3",
- "lodash": "^4.15.0",
- "nan": "^2.0.0",
- "node-pre-gyp": "^0.6.35",
- "protobufjs": "^5.0.0"
- },
- "devDependencies": {
- "async": "^2.0.1",
- "body-parser": "^1.15.2",
- "electron-mocha": "^3.1.1",
- "express": "^4.14.0",
- "google-auth-library": "^0.9.2",
- "google-protobuf": "^3.0.0",
- "istanbul": "^0.4.4",
- "jsdoc": "^3.3.2",
- "jshint": "^2.5.0",
- "minimist": "^1.1.0",
- "mocha": "^3.0.2",
- "mocha-jenkins-reporter": "^0.2.3",
- "poisson-process": "^0.2.1"
- },
- "engines": {
- "node": ">=4"
- },
- "binary": {
- "module_name": "grpc_node",
- "module_path": "src/node/extension_binary/{node_abi}-{platform}-{arch}",
- "host": "https://storage.googleapis.com/",
- "remote_path": "grpc-precompiled-binaries/node/{name}/v{version}",
- "package_name": "{node_abi}-{platform}-{arch}.tar.gz"
- },
- "files": [
- "LICENSE",
- "src/node/README.md",
- "src/proto",
- "etc",
- "src/node/index.js",
- "src/node/src",
- "src/node/ext",
- "include/grpc",
- "src/core",
- "src/boringssl",
- "src/zlib",
- "third_party/nanopb",
- "third_party/zlib",
- "third_party/boringssl",
- "binding.gyp"
- ],
- "main": "src/node/index.js",
- "license": "Apache-2.0",
- "jshintConfig": {
- "bitwise": true,
- "curly": true,
- "eqeqeq": true,
- "esnext": true,
- "freeze": true,
- "immed": true,
- "indent": 2,
- "latedef": "nofunc",
- "maxlen": 80,
- "mocha": true,
- "newcap": true,
- "node": true,
- "noarg": true,
- "quotmark": "single",
- "strict": true,
- "trailing": true,
- "undef": true,
- "unused": "vars"
- }
-}
diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc
index 965d91b68b..f35bfd9ab9 100644
--- a/src/compiler/cpp_generator.cc
+++ b/src/compiler/cpp_generator.cc
@@ -1568,11 +1568,24 @@ grpc::string GetMockIncludes(grpc_generator::File* file,
static const char* headers_strs[] = {
"grpc++/impl/codegen/async_stream.h",
"grpc++/impl/codegen/sync_stream.h",
- "gmock/gmock.h",
};
std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
PrintIncludes(printer.get(), headers, params);
+ std::vector<grpc::string> gmock_header;
+ if (params.gmock_search_path.empty()) {
+ gmock_header.push_back("gmock/gmock.h");
+ PrintIncludes(printer.get(), gmock_header, params);
+ } else {
+ gmock_header.push_back("gmock.h");
+ // Copy a params to generate gmock header.
+ Parameters gmock_params(params);
+ // We use local includes when a gmock_search_path is given
+ gmock_params.use_system_headers = false;
+ gmock_params.grpc_search_path = params.gmock_search_path;
+ PrintIncludes(printer.get(), gmock_header, gmock_params);
+ }
+
if (!file->package().empty()) {
std::vector<grpc::string> parts = file->package_parts();
diff --git a/src/compiler/cpp_generator.h b/src/compiler/cpp_generator.h
index a93376acef..300a27c589 100644
--- a/src/compiler/cpp_generator.h
+++ b/src/compiler/cpp_generator.h
@@ -50,8 +50,10 @@ struct Parameters {
bool use_system_headers;
// Prefix to any grpc include
grpc::string grpc_search_path;
- // Generate GMOCK code to facilitate unit testing.
+ // Generate Google Mock code to facilitate unit testing.
bool generate_mock_code;
+ // Google Mock search path, when non-empty, local includes will be used.
+ grpc::string gmock_search_path;
};
// Return the prologue of the generated header file.
diff --git a/src/compiler/cpp_plugin.cc b/src/compiler/cpp_plugin.cc
index adac0e23d3..661282f880 100644
--- a/src/compiler/cpp_plugin.cc
+++ b/src/compiler/cpp_plugin.cc
@@ -78,6 +78,8 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
*error = grpc::string("Invalid parameter: ") + *parameter_string;
return false;
}
+ } else if (param[0] == "gmock_search_path") {
+ generator_parameters.gmock_search_path = param[1];
} else {
*error = grpc::string("Unknown parameter: ") + *parameter_string;
return false;
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
index 3c64213fb9..dd6fc602ab 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
@@ -113,13 +113,13 @@
#include "src/core/lib/slice/slice_hash_table.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
+#include "src/core/lib/support/manual_constructor.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/surface/call.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/channel_init.h"
#include "src/core/lib/transport/static_metadata.h"
-#define GRPC_GRPCLB_MIN_CONNECT_TIMEOUT_SECONDS 20
#define GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS 1
#define GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER 1.6
#define GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS 120
@@ -408,7 +408,7 @@ typedef struct glb_lb_policy {
grpc_slice lb_call_status_details;
/** LB call retry backoff state */
- grpc_backoff lb_call_backoff_state;
+ grpc_core::ManualConstructor<grpc_core::BackOff> lb_call_backoff;
/** LB call retry timer */
grpc_timer lb_call_retry_timer;
@@ -1167,7 +1167,7 @@ static void start_picking_locked(glb_lb_policy* glb_policy) {
}
glb_policy->started_picking = true;
- grpc_backoff_reset(&glb_policy->lb_call_backoff_state);
+ glb_policy->lb_call_backoff->Reset();
query_for_backends_locked(glb_policy);
}
@@ -1302,8 +1302,7 @@ static void maybe_restart_lb_call(glb_lb_policy* glb_policy) {
glb_policy->updating_lb_call = false;
} else if (!glb_policy->shutting_down) {
/* if we aren't shutting down, restart the LB client call after some time */
- grpc_millis next_try = grpc_backoff_step(&glb_policy->lb_call_backoff_state)
- .next_attempt_start_time;
+ grpc_millis next_try = glb_policy->lb_call_backoff->Step();
if (grpc_lb_glb_trace.enabled()) {
gpr_log(GPR_DEBUG, "[grpclb %p] Connection to LB server lost...",
glb_policy);
@@ -1463,12 +1462,14 @@ static void lb_call_init_locked(glb_lb_policy* glb_policy) {
lb_on_response_received_locked, glb_policy,
grpc_combiner_scheduler(glb_policy->base.combiner));
- grpc_backoff_init(&glb_policy->lb_call_backoff_state,
- GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS * 1000,
- GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER,
- GRPC_GRPCLB_RECONNECT_JITTER,
- GRPC_GRPCLB_MIN_CONNECT_TIMEOUT_SECONDS * 1000,
- GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
+ grpc_core::BackOff::Options backoff_options;
+ backoff_options
+ .set_initial_backoff(GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS * 1000)
+ .set_multiplier(GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER)
+ .set_jitter(GRPC_GRPCLB_RECONNECT_JITTER)
+ .set_max_backoff(GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
+
+ glb_policy->lb_call_backoff.Init(backoff_options);
glb_policy->seen_initial_response = false;
glb_policy->last_client_load_report_counters_were_zero = false;
@@ -1572,7 +1573,7 @@ static void lb_on_response_received_locked(void* arg, grpc_error* error) {
memset(ops, 0, sizeof(ops));
grpc_op* op = ops;
if (glb_policy->lb_response_payload != nullptr) {
- grpc_backoff_reset(&glb_policy->lb_call_backoff_state);
+ glb_policy->lb_call_backoff->Reset();
/* Received data from the LB server. Look inside
* glb_policy->lb_response_payload, for a serverlist. */
grpc_byte_buffer_reader bbr;
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
index 4ec4477c82..4659a5f3ed 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
@@ -40,10 +40,10 @@
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/support/env.h"
+#include "src/core/lib/support/manual_constructor.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/transport/service_config.h"
-#define GRPC_DNS_MIN_CONNECT_TIMEOUT_SECONDS 1
#define GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS 1
#define GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER 1.6
#define GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS 120
@@ -89,7 +89,7 @@ typedef struct {
bool have_retry_timer;
grpc_timer retry_timer;
/** retry backoff state */
- grpc_backoff backoff_state;
+ grpc_core::ManualConstructor<grpc_core::BackOff> backoff;
/** currently resolving addresses */
grpc_lb_addresses* lb_addresses;
@@ -131,7 +131,7 @@ static void dns_ares_shutdown_locked(grpc_resolver* resolver) {
static void dns_ares_channel_saw_error_locked(grpc_resolver* resolver) {
ares_dns_resolver* r = (ares_dns_resolver*)resolver;
if (!r->resolving) {
- grpc_backoff_reset(&r->backoff_state);
+ r->backoff->Reset();
dns_ares_start_resolving_locked(r);
}
}
@@ -264,8 +264,7 @@ static void dns_ares_on_resolved_locked(void* arg, grpc_error* error) {
} else {
const char* msg = grpc_error_string(error);
gpr_log(GPR_DEBUG, "dns resolution failed: %s", msg);
- grpc_millis next_try =
- grpc_backoff_step(&r->backoff_state).next_attempt_start_time;
+ grpc_millis next_try = r->backoff->Step();
grpc_millis timeout = next_try - grpc_core::ExecCtx::Get()->Now();
gpr_log(GPR_INFO, "dns resolution failed (will retry): %s",
grpc_error_string(error));
@@ -298,7 +297,7 @@ static void dns_ares_next_locked(grpc_resolver* resolver,
r->next_completion = on_complete;
r->target_result = target_result;
if (r->resolved_version == 0 && !r->resolving) {
- grpc_backoff_reset(&r->backoff_state);
+ r->backoff->Reset();
dns_ares_start_resolving_locked(r);
} else {
dns_ares_maybe_finish_next_locked(r);
@@ -368,11 +367,13 @@ static grpc_resolver* dns_ares_create(grpc_resolver_args* args,
if (args->pollset_set != nullptr) {
grpc_pollset_set_add_pollset_set(r->interested_parties, args->pollset_set);
}
- grpc_backoff_init(
- &r->backoff_state, GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS * 1000,
- GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER, GRPC_DNS_RECONNECT_JITTER,
- GRPC_DNS_MIN_CONNECT_TIMEOUT_SECONDS * 1000,
- GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
+ grpc_core::BackOff::Options backoff_options;
+ backoff_options
+ .set_initial_backoff(GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS * 1000)
+ .set_multiplier(GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER)
+ .set_jitter(GRPC_DNS_RECONNECT_JITTER)
+ .set_max_backoff(GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
+ r->backoff.Init(grpc_core::BackOff(backoff_options));
GRPC_CLOSURE_INIT(&r->dns_ares_on_retry_timer_locked,
dns_ares_on_retry_timer_locked, r,
grpc_combiner_scheduler(r->base.combiner));
diff --git a/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc b/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
index 77698e97aa..1c2cfc08e7 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
@@ -33,9 +33,9 @@
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/support/env.h"
+#include "src/core/lib/support/manual_constructor.h"
#include "src/core/lib/support/string.h"
-#define GRPC_DNS_MIN_CONNECT_TIMEOUT_SECONDS 1
#define GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS 1
#define GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER 1.6
#define GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS 120
@@ -70,7 +70,7 @@ typedef struct {
grpc_timer retry_timer;
grpc_closure on_retry;
/** retry backoff state */
- grpc_backoff backoff_state;
+ grpc_core::ManualConstructor<grpc_core::BackOff> backoff;
/** currently resolving addresses */
grpc_resolved_addresses* addresses;
@@ -106,7 +106,7 @@ static void dns_shutdown_locked(grpc_resolver* resolver) {
static void dns_channel_saw_error_locked(grpc_resolver* resolver) {
dns_resolver* r = (dns_resolver*)resolver;
if (!r->resolving) {
- grpc_backoff_reset(&r->backoff_state);
+ r->backoff->Reset();
dns_start_resolving_locked(r);
}
}
@@ -119,7 +119,7 @@ static void dns_next_locked(grpc_resolver* resolver,
r->next_completion = on_complete;
r->target_result = target_result;
if (r->resolved_version == 0 && !r->resolving) {
- grpc_backoff_reset(&r->backoff_state);
+ r->backoff->Reset();
dns_start_resolving_locked(r);
} else {
dns_maybe_finish_next_locked(r);
@@ -161,8 +161,7 @@ static void dns_on_resolved_locked(void* arg, grpc_error* error) {
grpc_resolved_addresses_destroy(r->addresses);
grpc_lb_addresses_destroy(addresses);
} else {
- grpc_millis next_try =
- grpc_backoff_step(&r->backoff_state).next_attempt_start_time;
+ grpc_millis next_try = r->backoff->Step();
grpc_millis timeout = next_try - grpc_core::ExecCtx::Get()->Now();
gpr_log(GPR_INFO, "dns resolution failed (will retry): %s",
grpc_error_string(error));
@@ -244,11 +243,13 @@ static grpc_resolver* dns_create(grpc_resolver_args* args,
if (args->pollset_set != nullptr) {
grpc_pollset_set_add_pollset_set(r->interested_parties, args->pollset_set);
}
- grpc_backoff_init(
- &r->backoff_state, GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS * 1000,
- GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER, GRPC_DNS_RECONNECT_JITTER,
- GRPC_DNS_MIN_CONNECT_TIMEOUT_SECONDS * 1000,
- GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
+ grpc_core::BackOff::Options backoff_options;
+ backoff_options
+ .set_initial_backoff(GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS * 1000)
+ .set_multiplier(GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER)
+ .set_jitter(GRPC_DNS_RECONNECT_JITTER)
+ .set_max_backoff(GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
+ r->backoff.Init(grpc_core::BackOff(backoff_options));
return &r->base;
}
diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc
index 84a5ace31d..f07394d29b 100644
--- a/src/core/ext/filters/client_channel/subchannel.cc
+++ b/src/core/ext/filters/client_channel/subchannel.cc
@@ -20,7 +20,9 @@
#include <inttypes.h>
#include <limits.h>
-#include <string.h>
+
+#include <algorithm>
+#include <cstring>
#include <grpc/support/alloc.h>
#include <grpc/support/avl.h>
@@ -39,6 +41,7 @@
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/slice/slice_internal.h"
+#include "src/core/lib/support/manual_constructor.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/channel_init.h"
#include "src/core/lib/transport/connectivity_state.h"
@@ -48,7 +51,7 @@
#define GRPC_SUBCHANNEL_INITIAL_CONNECT_BACKOFF_SECONDS 1
#define GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER 1.6
-#define GRPC_SUBCHANNEL_RECONNECT_MIN_BACKOFF_SECONDS 20
+#define GRPC_SUBCHANNEL_RECONNECT_MIN_TIMEOUT_SECONDS 20
#define GRPC_SUBCHANNEL_RECONNECT_MAX_BACKOFF_SECONDS 120
#define GRPC_SUBCHANNEL_RECONNECT_JITTER 0.2
@@ -118,8 +121,9 @@ struct grpc_subchannel {
external_state_watcher root_external_state_watcher;
/** backoff state */
- grpc_backoff backoff_state;
- grpc_backoff_result backoff_result;
+ grpc_core::ManualConstructor<grpc_core::BackOff> backoff;
+ grpc_millis next_attempt_deadline;
+ grpc_millis min_connect_timeout_ms;
/** do we have an active alarm? */
bool have_alarm;
@@ -274,6 +278,54 @@ void grpc_subchannel_weak_unref(
}
}
+static void parse_args_for_backoff_values(
+ const grpc_channel_args* args, grpc_core::BackOff::Options* backoff_options,
+ grpc_millis* min_connect_timeout_ms) {
+ grpc_millis initial_backoff_ms =
+ GRPC_SUBCHANNEL_INITIAL_CONNECT_BACKOFF_SECONDS * 1000;
+ *min_connect_timeout_ms =
+ GRPC_SUBCHANNEL_RECONNECT_MIN_TIMEOUT_SECONDS * 1000;
+ grpc_millis max_backoff_ms =
+ GRPC_SUBCHANNEL_RECONNECT_MAX_BACKOFF_SECONDS * 1000;
+ bool fixed_reconnect_backoff = false;
+ if (args != nullptr) {
+ for (size_t i = 0; i < args->num_args; i++) {
+ if (0 == strcmp(args->args[i].key,
+ "grpc.testing.fixed_reconnect_backoff_ms")) {
+ fixed_reconnect_backoff = true;
+ initial_backoff_ms = *min_connect_timeout_ms = max_backoff_ms =
+ grpc_channel_arg_get_integer(
+ &args->args[i],
+ {static_cast<int>(initial_backoff_ms), 100, INT_MAX});
+ } else if (0 ==
+ strcmp(args->args[i].key, GRPC_ARG_MIN_RECONNECT_BACKOFF_MS)) {
+ fixed_reconnect_backoff = false;
+ *min_connect_timeout_ms = grpc_channel_arg_get_integer(
+ &args->args[i],
+ {static_cast<int>(*min_connect_timeout_ms), 100, INT_MAX});
+ } else if (0 ==
+ strcmp(args->args[i].key, GRPC_ARG_MAX_RECONNECT_BACKOFF_MS)) {
+ fixed_reconnect_backoff = false;
+ max_backoff_ms = grpc_channel_arg_get_integer(
+ &args->args[i], {static_cast<int>(max_backoff_ms), 100, INT_MAX});
+ } else if (0 == strcmp(args->args[i].key,
+ GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS)) {
+ fixed_reconnect_backoff = false;
+ initial_backoff_ms = grpc_channel_arg_get_integer(
+ &args->args[i],
+ {static_cast<int>(initial_backoff_ms), 100, INT_MAX});
+ }
+ }
+ }
+ backoff_options->set_initial_backoff(initial_backoff_ms)
+ .set_multiplier(fixed_reconnect_backoff
+ ? 1.0
+ : GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER)
+ .set_jitter(fixed_reconnect_backoff ? 0.0
+ : GRPC_SUBCHANNEL_RECONNECT_JITTER)
+ .set_max_backoff(max_backoff_ms);
+}
+
grpc_subchannel* grpc_subchannel_create(grpc_connector* connector,
const grpc_subchannel_args* args) {
grpc_subchannel_key* key = grpc_subchannel_key_create(args);
@@ -324,43 +376,10 @@ grpc_subchannel* grpc_subchannel_create(grpc_connector* connector,
grpc_schedule_on_exec_ctx);
grpc_connectivity_state_init(&c->state_tracker, GRPC_CHANNEL_IDLE,
"subchannel");
- int initial_backoff_ms =
- GRPC_SUBCHANNEL_INITIAL_CONNECT_BACKOFF_SECONDS * 1000;
- int min_backoff_ms = GRPC_SUBCHANNEL_RECONNECT_MIN_BACKOFF_SECONDS * 1000;
- int max_backoff_ms = GRPC_SUBCHANNEL_RECONNECT_MAX_BACKOFF_SECONDS * 1000;
- bool fixed_reconnect_backoff = false;
- if (c->args) {
- for (size_t i = 0; i < c->args->num_args; i++) {
- if (0 == strcmp(c->args->args[i].key,
- "grpc.testing.fixed_reconnect_backoff_ms")) {
- fixed_reconnect_backoff = true;
- initial_backoff_ms = min_backoff_ms = max_backoff_ms =
- grpc_channel_arg_get_integer(&c->args->args[i],
- {initial_backoff_ms, 100, INT_MAX});
- } else if (0 == strcmp(c->args->args[i].key,
- GRPC_ARG_MIN_RECONNECT_BACKOFF_MS)) {
- fixed_reconnect_backoff = false;
- min_backoff_ms = grpc_channel_arg_get_integer(
- &c->args->args[i], {min_backoff_ms, 100, INT_MAX});
- } else if (0 == strcmp(c->args->args[i].key,
- GRPC_ARG_MAX_RECONNECT_BACKOFF_MS)) {
- fixed_reconnect_backoff = false;
- max_backoff_ms = grpc_channel_arg_get_integer(
- &c->args->args[i], {max_backoff_ms, 100, INT_MAX});
- } else if (0 == strcmp(c->args->args[i].key,
- GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS)) {
- fixed_reconnect_backoff = false;
- initial_backoff_ms = grpc_channel_arg_get_integer(
- &c->args->args[i], {initial_backoff_ms, 100, INT_MAX});
- }
- }
- }
- grpc_backoff_init(
- &c->backoff_state, initial_backoff_ms,
- fixed_reconnect_backoff ? 1.0
- : GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER,
- fixed_reconnect_backoff ? 0.0 : GRPC_SUBCHANNEL_RECONNECT_JITTER,
- min_backoff_ms, max_backoff_ms);
+ grpc_core::BackOff::Options backoff_options;
+ parse_args_for_backoff_values(args->args, &backoff_options,
+ &c->min_connect_timeout_ms);
+ c->backoff.Init(backoff_options);
gpr_mu_init(&c->mu);
return grpc_subchannel_index_register(key, c);
@@ -368,11 +387,11 @@ grpc_subchannel* grpc_subchannel_create(grpc_connector* connector,
static void continue_connect_locked(grpc_subchannel* c) {
grpc_connect_in_args args;
-
args.interested_parties = c->pollset_set;
- args.deadline = c->backoff_result.current_deadline;
+ const grpc_millis min_deadline =
+ c->min_connect_timeout_ms + grpc_core::ExecCtx::Get()->Now();
+ args.deadline = std::max(c->next_attempt_deadline, min_deadline);
args.channel_args = c->args;
-
grpc_connectivity_state_set(&c->state_tracker, GRPC_CHANNEL_CONNECTING,
GRPC_ERROR_NONE, "state_change");
grpc_connector_connect(c->connector, &args, &c->connecting_result,
@@ -416,7 +435,7 @@ static void on_alarm(void* arg, grpc_error* error) {
}
if (error == GRPC_ERROR_NONE) {
gpr_log(GPR_INFO, "Failed to connect to channel, retrying");
- c->backoff_result = grpc_backoff_step(&c->backoff_state);
+ c->next_attempt_deadline = c->backoff->Step();
continue_connect_locked(c);
gpr_mu_unlock(&c->mu);
} else {
@@ -452,22 +471,20 @@ static void maybe_start_connecting_locked(grpc_subchannel* c) {
if (!c->backoff_begun) {
c->backoff_begun = true;
- c->backoff_result = grpc_backoff_begin(&c->backoff_state);
+ c->next_attempt_deadline = c->backoff->Begin();
continue_connect_locked(c);
} else {
GPR_ASSERT(!c->have_alarm);
c->have_alarm = true;
const grpc_millis time_til_next =
- c->backoff_result.next_attempt_start_time -
- grpc_core::ExecCtx::Get()->Now();
+ c->next_attempt_deadline - grpc_core::ExecCtx::Get()->Now();
if (time_til_next <= 0) {
gpr_log(GPR_INFO, "Retry immediately");
} else {
gpr_log(GPR_INFO, "Retry in %" PRIdPTR " milliseconds", time_til_next);
}
GRPC_CLOSURE_INIT(&c->on_alarm, on_alarm, c, grpc_schedule_on_exec_ctx);
- grpc_timer_init(&c->alarm, c->backoff_result.next_attempt_start_time,
- &c->on_alarm);
+ grpc_timer_init(&c->alarm, c->next_attempt_deadline, &c->on_alarm);
}
}
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
index c13c4056c1..5ee1f08e61 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
@@ -79,7 +79,9 @@ static int g_default_server_keepalive_time_ms =
DEFAULT_SERVER_KEEPALIVE_TIME_MS;
static int g_default_server_keepalive_timeout_ms =
DEFAULT_SERVER_KEEPALIVE_TIMEOUT_MS;
-static bool g_default_keepalive_permit_without_calls =
+static bool g_default_client_keepalive_permit_without_calls =
+ DEFAULT_KEEPALIVE_PERMIT_WITHOUT_CALLS;
+static bool g_default_server_keepalive_permit_without_calls =
DEFAULT_KEEPALIVE_PERMIT_WITHOUT_CALLS;
static int g_default_min_sent_ping_interval_without_data_ms =
@@ -346,6 +348,8 @@ static void init_transport(grpc_chttp2_transport* t,
t->keepalive_timeout = g_default_client_keepalive_timeout_ms == INT_MAX
? GRPC_MILLIS_INF_FUTURE
: g_default_client_keepalive_timeout_ms;
+ t->keepalive_permit_without_calls =
+ g_default_client_keepalive_permit_without_calls;
} else {
t->keepalive_time = g_default_server_keepalive_time_ms == INT_MAX
? GRPC_MILLIS_INF_FUTURE
@@ -353,8 +357,9 @@ static void init_transport(grpc_chttp2_transport* t,
t->keepalive_timeout = g_default_server_keepalive_timeout_ms == INT_MAX
? GRPC_MILLIS_INF_FUTURE
: g_default_server_keepalive_timeout_ms;
+ t->keepalive_permit_without_calls =
+ g_default_server_keepalive_permit_without_calls;
}
- t->keepalive_permit_without_calls = g_default_keepalive_permit_without_calls;
t->opt_target = GRPC_CHTTP2_OPTIMIZE_FOR_LATENCY;
@@ -2550,7 +2555,9 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args* args,
for (i = 0; i < args->num_args; i++) {
if (0 == strcmp(args->args[i].key, GRPC_ARG_KEEPALIVE_TIME_MS)) {
const int value = grpc_channel_arg_get_integer(
- &args->args[i], {g_default_client_keepalive_time_ms, 1, INT_MAX});
+ &args->args[i], {is_client ? g_default_client_keepalive_time_ms
+ : g_default_server_keepalive_time_ms,
+ 1, INT_MAX});
if (is_client) {
g_default_client_keepalive_time_ms = value;
} else {
@@ -2559,8 +2566,9 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args* args,
} else if (0 ==
strcmp(args->args[i].key, GRPC_ARG_KEEPALIVE_TIMEOUT_MS)) {
const int value = grpc_channel_arg_get_integer(
- &args->args[i],
- {g_default_client_keepalive_timeout_ms, 0, INT_MAX});
+ &args->args[i], {is_client ? g_default_client_keepalive_timeout_ms
+ : g_default_server_keepalive_timeout_ms,
+ 0, INT_MAX});
if (is_client) {
g_default_client_keepalive_timeout_ms = value;
} else {
@@ -2568,10 +2576,16 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args* args,
}
} else if (0 == strcmp(args->args[i].key,
GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS)) {
- g_default_keepalive_permit_without_calls =
- (uint32_t)grpc_channel_arg_get_integer(
- &args->args[i],
- {g_default_keepalive_permit_without_calls, 0, 1});
+ const bool value = (uint32_t)grpc_channel_arg_get_integer(
+ &args->args[i],
+ {is_client ? g_default_client_keepalive_permit_without_calls
+ : g_default_server_keepalive_timeout_ms,
+ 0, 1});
+ if (is_client) {
+ g_default_client_keepalive_permit_without_calls = value;
+ } else {
+ g_default_server_keepalive_permit_without_calls = value;
+ }
} else if (0 ==
strcmp(args->args[i].key, GRPC_ARG_HTTP2_MAX_PING_STRIKES)) {
g_default_max_ping_strikes = grpc_channel_arg_get_integer(
diff --git a/src/core/lib/backoff/backoff.cc b/src/core/lib/backoff/backoff.cc
index da3b9b1b2d..41f625a636 100644
--- a/src/core/lib/backoff/backoff.cc
+++ b/src/core/lib/backoff/backoff.cc
@@ -18,61 +18,53 @@
#include "src/core/lib/backoff/backoff.h"
+#include <algorithm>
+
#include <grpc/support/useful.h>
-void grpc_backoff_init(grpc_backoff* backoff, grpc_millis initial_backoff,
- double multiplier, double jitter,
- grpc_millis min_connect_timeout,
- grpc_millis max_backoff) {
- backoff->initial_backoff = initial_backoff;
- backoff->multiplier = multiplier;
- backoff->jitter = jitter;
- backoff->min_connect_timeout = min_connect_timeout;
- backoff->max_backoff = max_backoff;
- backoff->rng_state = (uint32_t)gpr_now(GPR_CLOCK_REALTIME).tv_nsec;
-}
+namespace grpc_core {
-grpc_backoff_result grpc_backoff_begin(grpc_backoff* backoff) {
- backoff->current_backoff = backoff->initial_backoff;
- const grpc_millis initial_timeout =
- GPR_MAX(backoff->initial_backoff, backoff->min_connect_timeout);
- const grpc_millis now = grpc_core::ExecCtx::Get()->Now();
- const grpc_backoff_result result = {now + initial_timeout,
- now + backoff->current_backoff};
- return result;
-}
+namespace {
-/* Generate a random number between 0 and 1. */
-static double generate_uniform_random_number(uint32_t* rng_state) {
- *rng_state = (1103515245 * *rng_state + 12345) % ((uint32_t)1 << 31);
- return *rng_state / (double)((uint32_t)1 << 31);
+/* Generate a random number between 0 and 1. We roll our own RNG because seeding
+ * rand() modifies a global variable we have no control over. */
+double generate_uniform_random_number(uint32_t* rng_state) {
+ constexpr uint32_t two_raise_31 = uint32_t(1) << 31;
+ *rng_state = (1103515245 * *rng_state + 12345) % two_raise_31;
+ return *rng_state / static_cast<double>(two_raise_31);
}
-static double generate_uniform_random_number_between(uint32_t* rng_state,
- double a, double b) {
+double generate_uniform_random_number_between(uint32_t* rng_state, double a,
+ double b) {
if (a == b) return a;
if (a > b) GPR_SWAP(double, a, b); // make sure a < b
const double range = b - a;
return a + generate_uniform_random_number(rng_state) * range;
}
+} // namespace
-grpc_backoff_result grpc_backoff_step(grpc_backoff* backoff) {
- backoff->current_backoff = (grpc_millis)(GPR_MIN(
- backoff->current_backoff * backoff->multiplier, backoff->max_backoff));
- const double jitter = generate_uniform_random_number_between(
- &backoff->rng_state, -backoff->jitter * backoff->current_backoff,
- backoff->jitter * backoff->current_backoff);
- const grpc_millis current_timeout =
- GPR_MAX((grpc_millis)(backoff->current_backoff + jitter),
- backoff->min_connect_timeout);
- const grpc_millis next_timeout = GPR_MIN(
- (grpc_millis)(backoff->current_backoff + jitter), backoff->max_backoff);
- const grpc_millis now = grpc_core::ExecCtx::Get()->Now();
- const grpc_backoff_result result = {now + current_timeout,
- now + next_timeout};
- return result;
+BackOff::BackOff(const Options& options) : options_(options) {
+ rng_state_ = static_cast<uint32_t>(gpr_now(GPR_CLOCK_REALTIME).tv_nsec);
+}
+
+grpc_millis BackOff::Begin() {
+ current_backoff_ = options_.initial_backoff();
+ return current_backoff_ + grpc_core::ExecCtx::Get()->Now();
}
-void grpc_backoff_reset(grpc_backoff* backoff) {
- backoff->current_backoff = backoff->initial_backoff;
+grpc_millis BackOff::Step() {
+ current_backoff_ =
+ (grpc_millis)(std::min(current_backoff_ * options_.multiplier(),
+ (double)options_.max_backoff()));
+ const double jitter = generate_uniform_random_number_between(
+ &rng_state_, -options_.jitter() * current_backoff_,
+ options_.jitter() * current_backoff_);
+ const grpc_millis next_timeout = (grpc_millis)(current_backoff_ + jitter);
+ return next_timeout + grpc_core::ExecCtx::Get()->Now();
}
+
+void BackOff::Reset() { current_backoff_ = options_.initial_backoff(); }
+
+void BackOff::SetRandomSeed(uint32_t seed) { rng_state_ = seed; }
+
+} // namespace grpc_core
diff --git a/src/core/lib/backoff/backoff.h b/src/core/lib/backoff/backoff.h
index f61d14ec95..84ef9b82e4 100644
--- a/src/core/lib/backoff/backoff.h
+++ b/src/core/lib/backoff/backoff.h
@@ -21,53 +21,69 @@
#include "src/core/lib/iomgr/exec_ctx.h"
-typedef struct {
- /// const: how long to wait after the first failure before retrying
- grpc_millis initial_backoff;
-
- /// const: factor with which to multiply backoff after a failed retry
- double multiplier;
-
- /// const: amount to randomize backoffs
- double jitter;
-
- /// const: minimum time between retries
- grpc_millis min_connect_timeout;
-
- /// const: maximum time between retries
- grpc_millis max_backoff;
-
+namespace grpc_core {
+
+/// Implementation of the backoff mechanism described in
+/// doc/connection-backoff.md
+class BackOff {
+ public:
+ class Options;
+
+ /// Initialize backoff machinery - does not need to be destroyed
+ explicit BackOff(const Options& options);
+
+ /// Begin retry loop: returns the deadline to be used for the next attempt,
+ /// following the backoff strategy.
+ grpc_millis Begin();
+ /// Step a retry loop: returns the deadline to be used for the next attempt,
+ /// following the backoff strategy.
+ grpc_millis Step();
+ /// Reset the backoff, so the next grpc_backoff_step will be a
+ /// grpc_backoff_begin.
+ void Reset();
+
+ void SetRandomSeed(unsigned int seed);
+
+ class Options {
+ public:
+ Options& set_initial_backoff(grpc_millis initial_backoff) {
+ initial_backoff_ = initial_backoff;
+ return *this;
+ }
+ Options& set_multiplier(double multiplier) {
+ multiplier_ = multiplier;
+ return *this;
+ }
+ Options& set_jitter(double jitter) {
+ jitter_ = jitter;
+ return *this;
+ }
+ Options& set_max_backoff(grpc_millis max_backoff) {
+ max_backoff_ = max_backoff;
+ return *this;
+ }
+ /// how long to wait after the first failure before retrying
+ grpc_millis initial_backoff() const { return initial_backoff_; }
+ /// factor with which to multiply backoff after a failed retry
+ double multiplier() const { return multiplier_; }
+ /// amount to randomize backoffs
+ double jitter() const { return jitter_; }
+ /// maximum time between retries
+ grpc_millis max_backoff() const { return max_backoff_; }
+
+ private:
+ grpc_millis initial_backoff_;
+ double multiplier_;
+ double jitter_;
+ grpc_millis max_backoff_;
+ }; // class Options
+
+ private:
+ const Options options_;
/// current delay before retries
- grpc_millis current_backoff;
-
- /// random number generator
- uint32_t rng_state;
-} grpc_backoff;
-
-typedef struct {
- /// Deadline to be used for the current attempt.
- grpc_millis current_deadline;
-
- /// Deadline to be used for the next attempt, following the backoff strategy.
- grpc_millis next_attempt_start_time;
-} grpc_backoff_result;
-
-/// Initialize backoff machinery - does not need to be destroyed
-void grpc_backoff_init(grpc_backoff* backoff, grpc_millis initial_backoff,
- double multiplier, double jitter,
- grpc_millis min_connect_timeout,
- grpc_millis max_backoff);
-
-/// Begin retry loop: returns the deadlines to be used for the current attempt
-/// and the subsequent retry, if any.
-grpc_backoff_result grpc_backoff_begin(grpc_backoff* backoff);
-
-/// Step a retry loop: returns the deadlines to be used for the current attempt
-/// and the subsequent retry, if any.
-grpc_backoff_result grpc_backoff_step(grpc_backoff* backoff);
-
-/// Reset the backoff, so the next grpc_backoff_step will be a
-/// grpc_backoff_begin.
-void grpc_backoff_reset(grpc_backoff* backoff);
+ grpc_millis current_backoff_;
+ uint32_t rng_state_;
+};
+} // namespace grpc_core
#endif /* GRPC_CORE_LIB_BACKOFF_BACKOFF_H */
diff --git a/src/core/lib/iomgr/error.cc b/src/core/lib/iomgr/error.cc
index 42cd7c455d..67c3caf5ee 100644
--- a/src/core/lib/iomgr/error.cc
+++ b/src/core/lib/iomgr/error.cc
@@ -749,7 +749,7 @@ const char* grpc_error_string(grpc_error* err) {
if (!gpr_atm_rel_cas(&err->atomics.error_string, 0, (gpr_atm)out)) {
gpr_free(out);
- out = (char*)gpr_atm_no_barrier_load(&err->atomics.error_string);
+ out = (char*)gpr_atm_acq_load(&err->atomics.error_string);
}
GPR_TIMER_END("grpc_error_string", 0);
diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h
index 4759ee0791..8c72a439f6 100644
--- a/src/core/lib/iomgr/error.h
+++ b/src/core/lib/iomgr/error.h
@@ -165,6 +165,8 @@ void grpc_error_unref(grpc_error* err);
grpc_error* grpc_error_set_int(grpc_error* src, grpc_error_ints which,
intptr_t value) GRPC_MUST_USE_RESULT;
bool grpc_error_get_int(grpc_error* error, grpc_error_ints which, intptr_t* p);
+/// This call takes ownership of the slice; the error is responsible for
+/// eventually unref-ing it.
grpc_error* grpc_error_set_str(grpc_error* src, grpc_error_strs which,
grpc_slice str) GRPC_MUST_USE_RESULT;
/// Returns false if the specified string is not set.
@@ -174,7 +176,8 @@ bool grpc_error_get_str(grpc_error* error, grpc_error_strs which,
/// Add a child error: an error that is believed to have contributed to this
/// error occurring. Allows root causing high level errors from lower level
-/// errors that contributed to them.
+/// errors that contributed to them. The src error takes ownership of the
+/// child error.
grpc_error* grpc_error_add_child(grpc_error* src,
grpc_error* child) GRPC_MUST_USE_RESULT;
grpc_error* grpc_os_error(const char* file, int line, int err,
diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc
index ae9d47ece5..1ab7e516de 100644
--- a/src/core/lib/iomgr/ev_epoll1_linux.cc
+++ b/src/core/lib/iomgr/ev_epoll1_linux.cc
@@ -1232,8 +1232,6 @@ const grpc_event_engine_vtable* grpc_init_epoll1_linux(bool explicit_request) {
/* If GRPC_LINUX_EPOLL is not defined, it means epoll is not available. Return
* NULL */
const grpc_event_engine_vtable* grpc_init_epoll1_linux(bool explicit_request) {
- gpr_log(GPR_ERROR,
- "Skipping epoll1 becuase GRPC_LINUX_EPOLL is not defined.");
return nullptr;
}
#endif /* defined(GRPC_POSIX_SOCKET) */
diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
index b2817156a8..5f5f45a7a5 100644
--- a/src/core/lib/iomgr/ev_epollex_linux.cc
+++ b/src/core/lib/iomgr/ev_epollex_linux.cc
@@ -1449,8 +1449,6 @@ const grpc_event_engine_vtable* grpc_init_epollex_linux(
* NULL */
const grpc_event_engine_vtable* grpc_init_epollex_linux(
bool explicitly_requested) {
- gpr_log(GPR_ERROR,
- "Skipping epollex becuase GRPC_LINUX_EPOLL is not defined.");
return nullptr;
}
#endif /* defined(GRPC_POSIX_SOCKET) */
diff --git a/src/core/lib/iomgr/ev_epollsig_linux.cc b/src/core/lib/iomgr/ev_epollsig_linux.cc
index 7a8962f4a8..8072a6cbed 100644
--- a/src/core/lib/iomgr/ev_epollsig_linux.cc
+++ b/src/core/lib/iomgr/ev_epollsig_linux.cc
@@ -1732,8 +1732,6 @@ const grpc_event_engine_vtable* grpc_init_epollsig_linux(
* NULL */
const grpc_event_engine_vtable* grpc_init_epollsig_linux(
bool explicit_request) {
- gpr_log(GPR_ERROR,
- "Skipping epollsig becuase GRPC_LINUX_EPOLL is not defined.");
return nullptr;
}
#endif /* defined(GRPC_POSIX_SOCKET) */
diff --git a/src/core/lib/iomgr/ev_poll_posix.cc b/src/core/lib/iomgr/ev_poll_posix.cc
index 53de94fb6e..7ea1dfaa80 100644
--- a/src/core/lib/iomgr/ev_poll_posix.cc
+++ b/src/core/lib/iomgr/ev_poll_posix.cc
@@ -71,6 +71,7 @@ struct grpc_fd {
int shutdown;
int closed;
int released;
+ gpr_atm pollhup;
grpc_error* shutdown_error;
/* The watcher list.
@@ -242,7 +243,7 @@ struct grpc_pollset_set {
typedef struct poll_result {
gpr_refcount refcount;
- cv_node* watchers;
+ grpc_cv_node* watchers;
int watchcount;
struct pollfd* fds;
nfds_t nfds;
@@ -273,7 +274,7 @@ typedef struct poll_hash_table {
} poll_hash_table;
poll_hash_table poll_cache;
-cv_fd_table g_cvfds;
+grpc_cv_fd_table g_cvfds;
/*******************************************************************************
* fd_posix.c
@@ -335,6 +336,7 @@ static grpc_fd* fd_create(int fd, const char* name) {
r->on_done_closure = nullptr;
r->closed = 0;
r->released = 0;
+ gpr_atm_no_barrier_store(&r->pollhup, 0);
r->read_notifier_pollset = nullptr;
char* name2;
@@ -950,7 +952,8 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
pfds[0].events = POLLIN;
pfds[0].revents = 0;
for (i = 0; i < pollset->fd_count; i++) {
- if (fd_is_orphaned(pollset->fds[i])) {
+ if (fd_is_orphaned(pollset->fds[i]) ||
+ gpr_atm_no_barrier_load(&pollset->fds[i]->pollhup) == 1) {
GRPC_FD_UNREF(pollset->fds[i], "multipoller");
} else {
pollset->fds[fd_count++] = pollset->fds[i];
@@ -1017,6 +1020,12 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
pfds[i].fd, (pfds[i].revents & POLLIN_CHECK) != 0,
(pfds[i].revents & POLLOUT_CHECK) != 0, pfds[i].revents);
}
+ /* This is a mitigation to prevent poll() from spinning on a
+ ** POLLHUP https://github.com/grpc/grpc/pull/13665
+ */
+ if (pfds[i].revents & POLLHUP) {
+ gpr_atm_no_barrier_store(&watchers[i].fd->pollhup, 1);
+ }
fd_end_poll(&watchers[i], pfds[i].revents & POLLIN_CHECK,
pfds[i].revents & POLLOUT_CHECK, pollset);
}
@@ -1435,7 +1444,7 @@ static void decref_poll_result(poll_result* res) {
}
}
-void remove_cvn(cv_node** head, cv_node* target) {
+void remove_cvn(grpc_cv_node** head, grpc_cv_node* target) {
if (target->next) {
target->next->prev = target->prev;
}
@@ -1460,7 +1469,7 @@ static void run_poll(void* args) {
result->completed = 1;
result->retval = retval;
result->err = errno;
- cv_node* watcher = result->watchers;
+ grpc_cv_node* watcher = result->watchers;
while (watcher) {
gpr_cv_signal(watcher->cv);
watcher = watcher->next;
@@ -1494,17 +1503,17 @@ static void run_poll(void* args) {
static int cvfd_poll(struct pollfd* fds, nfds_t nfds, int timeout) {
unsigned int i;
int res, idx;
- cv_node* pollcv;
+ grpc_cv_node* pollcv;
int skip_poll = 0;
nfds_t nsockfds = 0;
poll_result* result = nullptr;
gpr_mu_lock(&g_cvfds.mu);
- pollcv = (cv_node*)gpr_malloc(sizeof(cv_node));
+ pollcv = (grpc_cv_node*)gpr_malloc(sizeof(grpc_cv_node));
pollcv->next = nullptr;
gpr_cv pollcv_cv;
gpr_cv_init(&pollcv_cv);
pollcv->cv = &pollcv_cv;
- cv_node* fd_cvs = (cv_node*)gpr_malloc(nfds * sizeof(cv_node));
+ grpc_cv_node* fd_cvs = (grpc_cv_node*)gpr_malloc(nfds * sizeof(grpc_cv_node));
for (i = 0; i < nfds; i++) {
fds[i].revents = 0;
@@ -1600,7 +1609,8 @@ static void global_cv_fd_table_init() {
gpr_cv_init(&g_cvfds.shutdown_cv);
gpr_ref_init(&g_cvfds.pollcount, 1);
g_cvfds.size = CV_DEFAULT_TABLE_SIZE;
- g_cvfds.cvfds = (fd_node*)gpr_malloc(sizeof(fd_node) * CV_DEFAULT_TABLE_SIZE);
+ g_cvfds.cvfds =
+ (grpc_fd_node*)gpr_malloc(sizeof(grpc_fd_node) * CV_DEFAULT_TABLE_SIZE);
g_cvfds.free_fds = nullptr;
thread_grace = gpr_time_from_millis(POLLCV_THREAD_GRACE_MS, GPR_TIMESPAN);
for (int i = 0; i < CV_DEFAULT_TABLE_SIZE; i++) {
diff --git a/src/core/lib/iomgr/tcp_client_posix.cc b/src/core/lib/iomgr/tcp_client_posix.cc
index 24ccab14b2..8cd5f8d618 100644
--- a/src/core/lib/iomgr/tcp_client_posix.cc
+++ b/src/core/lib/iomgr/tcp_client_posix.cc
@@ -212,6 +212,9 @@ finish:
fd = nullptr;
}
done = (--ac->refs == 0);
+ // Create a copy of the data from "ac" to be accessed after the unlock, as
+ // "ac" and its contents may be deallocated by the time they are read.
+ const grpc_slice addr_str_slice = grpc_slice_from_copied_string(ac->addr_str);
gpr_mu_unlock(&ac->mu);
if (error != GRPC_ERROR_NONE) {
char* error_descr;
@@ -225,9 +228,13 @@ finish:
gpr_free(error_descr);
gpr_free(desc);
error = grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS,
- grpc_slice_from_copied_string(ac->addr_str));
+ addr_str_slice /* takes ownership */);
+ } else {
+ grpc_slice_unref(addr_str_slice);
}
if (done) {
+ // This is safe even outside the lock, because "done", the sentinel, is
+ // populated *inside* the lock.
gpr_mu_destroy(&ac->mu);
gpr_free(ac->addr_str);
grpc_channel_args_destroy(ac->channel_args);
diff --git a/src/core/lib/iomgr/udp_server.cc b/src/core/lib/iomgr/udp_server.cc
index 55e0b165ec..4a97f3353d 100644
--- a/src/core/lib/iomgr/udp_server.cc
+++ b/src/core/lib/iomgr/udp_server.cc
@@ -72,6 +72,7 @@ struct grpc_udp_listener {
grpc_udp_server_read_cb read_cb;
grpc_udp_server_write_cb write_cb;
grpc_udp_server_orphan_cb orphan_cb;
+ grpc_udp_server_start_cb start_cb;
// To be scheduled on another thread to actually read/write.
grpc_closure do_read_closure;
grpc_closure do_write_closure;
@@ -353,7 +354,7 @@ static void do_read(void* arg, grpc_error* error) {
* read lock if available. */
gpr_mu_lock(&sp->server->mu);
/* Tell the registered callback that data is available to read. */
- if (!sp->already_shutdown && sp->read_cb(sp->emfd, sp->server->user_data)) {
+ if (!sp->already_shutdown && sp->read_cb(sp->emfd)) {
/* There maybe more packets to read. Schedule read_more_cb_ closure to run
* after finishing this event loop. */
GRPC_CLOSURE_SCHED(&sp->do_read_closure, GRPC_ERROR_NONE);
@@ -383,7 +384,7 @@ static void on_read(void* arg, grpc_error* error) {
/* Read once. If there is more data to read, off load the work to another
* thread to finish. */
GPR_ASSERT(sp->read_cb);
- if (sp->read_cb(sp->emfd, sp->server->user_data)) {
+ if (sp->read_cb(sp->emfd)) {
/* There maybe more packets to read. Schedule read_more_cb_ closure to run
* after finishing this event loop. */
GRPC_CLOSURE_INIT(&sp->do_read_closure, do_read, arg,
@@ -411,7 +412,7 @@ void fd_notify_on_write_wrapper(void* arg, grpc_error* error) {
static void do_write(void* arg, grpc_error* error) {
grpc_udp_listener* sp = reinterpret_cast<grpc_udp_listener*>(arg);
- gpr_mu_lock(&(sp->server->mu));
+ gpr_mu_lock(&sp->server->mu);
if (sp->already_shutdown) {
// If fd has been shutdown, don't write any more and re-arm notification.
grpc_fd_notify_on_write(sp->emfd, &sp->write_closure);
@@ -429,7 +430,7 @@ static void do_write(void* arg, grpc_error* error) {
static void on_write(void* arg, grpc_error* error) {
grpc_udp_listener* sp = (grpc_udp_listener*)arg;
- gpr_mu_lock(&(sp->server->mu));
+ gpr_mu_lock(&sp->server->mu);
if (error != GRPC_ERROR_NONE) {
if (0 == --sp->server->active_ports && sp->server->shutdown) {
gpr_mu_unlock(&sp->server->mu);
@@ -450,6 +451,7 @@ static void on_write(void* arg, grpc_error* error) {
static int add_socket_to_server(grpc_udp_server* s, int fd,
const grpc_resolved_address* addr,
+ grpc_udp_server_start_cb start_cb,
grpc_udp_server_read_cb read_cb,
grpc_udp_server_write_cb write_cb,
grpc_udp_server_orphan_cb orphan_cb) {
@@ -480,6 +482,7 @@ static int add_socket_to_server(grpc_udp_server* s, int fd,
sp->read_cb = read_cb;
sp->write_cb = write_cb;
sp->orphan_cb = orphan_cb;
+ sp->start_cb = start_cb;
sp->orphan_notified = false;
sp->already_shutdown = false;
GPR_ASSERT(sp->emfd);
@@ -492,6 +495,7 @@ static int add_socket_to_server(grpc_udp_server* s, int fd,
int grpc_udp_server_add_port(grpc_udp_server* s,
const grpc_resolved_address* addr,
+ grpc_udp_server_start_cb start_cb,
grpc_udp_server_read_cb read_cb,
grpc_udp_server_write_cb write_cb,
grpc_udp_server_orphan_cb orphan_cb) {
@@ -541,8 +545,8 @@ int grpc_udp_server_add_port(grpc_udp_server* s,
// TODO(rjshade): Test and propagate the returned grpc_error*:
GRPC_ERROR_UNREF(grpc_create_dualstack_socket_using_factory(
s->socket_factory, addr, SOCK_DGRAM, IPPROTO_UDP, &dsmode, &fd));
- allocated_port1 =
- add_socket_to_server(s, fd, addr, read_cb, write_cb, orphan_cb);
+ allocated_port1 = add_socket_to_server(s, fd, addr, start_cb, read_cb,
+ write_cb, orphan_cb);
if (fd >= 0 && dsmode == GRPC_DSMODE_DUALSTACK) {
goto done;
}
@@ -565,7 +569,7 @@ int grpc_udp_server_add_port(grpc_udp_server* s,
addr = &addr4_copy;
}
allocated_port2 =
- add_socket_to_server(s, fd, addr, read_cb, write_cb, orphan_cb);
+ add_socket_to_server(s, fd, addr, start_cb, read_cb, write_cb, orphan_cb);
done:
gpr_free(allocated_addr);
@@ -587,6 +591,7 @@ int grpc_udp_server_get_fd(grpc_udp_server* s, unsigned port_index) {
void grpc_udp_server_start(grpc_udp_server* s, grpc_pollset** pollsets,
size_t pollset_count, void* user_data) {
+ gpr_log(GPR_DEBUG, "grpc_udp_server_start");
size_t i;
gpr_mu_lock(&s->mu);
grpc_udp_listener* sp;
@@ -596,6 +601,7 @@ void grpc_udp_server_start(grpc_udp_server* s, grpc_pollset** pollsets,
sp = s->head;
while (sp != nullptr) {
+ sp->start_cb(sp->emfd, sp->server->user_data);
for (i = 0; i < pollset_count; i++) {
grpc_pollset_add_fd(pollsets[i], sp->emfd);
}
diff --git a/src/core/lib/iomgr/udp_server.h b/src/core/lib/iomgr/udp_server.h
index 02e3acb7f5..a469ab9be5 100644
--- a/src/core/lib/iomgr/udp_server.h
+++ b/src/core/lib/iomgr/udp_server.h
@@ -30,9 +30,12 @@ struct grpc_server;
/* Forward decl of grpc_udp_server */
typedef struct grpc_udp_server grpc_udp_server;
+/* Called when grpc server starts to listening on the grpc_fd. */
+typedef void (*grpc_udp_server_start_cb)(grpc_fd* emfd, void* user_data);
+
/* Called when data is available to read from the socket.
* Return true if there is more data to read from fd. */
-typedef bool (*grpc_udp_server_read_cb)(grpc_fd* emfd, void* user_data);
+typedef bool (*grpc_udp_server_read_cb)(grpc_fd* emfd);
/* Called when the socket is writeable. The given closure should be scheduled
* when the socket becomes blocked next time. */
@@ -65,6 +68,7 @@ int grpc_udp_server_get_fd(grpc_udp_server* s, unsigned port_index);
all of the multiple socket port matching logic in one place */
int grpc_udp_server_add_port(grpc_udp_server* s,
const grpc_resolved_address* addr,
+ grpc_udp_server_start_cb start_cb,
grpc_udp_server_read_cb read_cb,
grpc_udp_server_write_cb write_cb,
grpc_udp_server_orphan_cb orphan_cb);
diff --git a/src/core/lib/iomgr/wakeup_fd_cv.cc b/src/core/lib/iomgr/wakeup_fd_cv.cc
index 5c1f16d3fc..c785114212 100644
--- a/src/core/lib/iomgr/wakeup_fd_cv.cc
+++ b/src/core/lib/iomgr/wakeup_fd_cv.cc
@@ -34,7 +34,7 @@
#define MAX_TABLE_RESIZE 256
-extern cv_fd_table g_cvfds;
+extern grpc_cv_fd_table g_cvfds;
static grpc_error* cv_fd_init(grpc_wakeup_fd* fd_info) {
unsigned int i, newsize;
@@ -42,8 +42,8 @@ static grpc_error* cv_fd_init(grpc_wakeup_fd* fd_info) {
gpr_mu_lock(&g_cvfds.mu);
if (!g_cvfds.free_fds) {
newsize = GPR_MIN(g_cvfds.size * 2, g_cvfds.size + MAX_TABLE_RESIZE);
- g_cvfds.cvfds =
- (fd_node*)gpr_realloc(g_cvfds.cvfds, sizeof(fd_node) * newsize);
+ g_cvfds.cvfds = (grpc_fd_node*)gpr_realloc(g_cvfds.cvfds,
+ sizeof(grpc_fd_node) * newsize);
for (i = g_cvfds.size; i < newsize; i++) {
g_cvfds.cvfds[i].is_set = 0;
g_cvfds.cvfds[i].cvs = nullptr;
@@ -64,7 +64,7 @@ static grpc_error* cv_fd_init(grpc_wakeup_fd* fd_info) {
}
static grpc_error* cv_fd_wakeup(grpc_wakeup_fd* fd_info) {
- cv_node* cvn;
+ grpc_cv_node* cvn;
gpr_mu_lock(&g_cvfds.mu);
g_cvfds.cvfds[GRPC_FD_TO_IDX(fd_info->read_fd)].is_set = 1;
cvn = g_cvfds.cvfds[GRPC_FD_TO_IDX(fd_info->read_fd)].cvs;
diff --git a/src/core/lib/iomgr/wakeup_fd_cv.h b/src/core/lib/iomgr/wakeup_fd_cv.h
index 017e41bfa8..399620af76 100644
--- a/src/core/lib/iomgr/wakeup_fd_cv.h
+++ b/src/core/lib/iomgr/wakeup_fd_cv.h
@@ -40,27 +40,27 @@
#define GRPC_FD_TO_IDX(fd) (-(fd)-1)
#define GRPC_IDX_TO_FD(idx) (-(idx)-1)
-typedef struct cv_node {
+typedef struct grpc_cv_node {
gpr_cv* cv;
- struct cv_node* next;
- struct cv_node* prev;
-} cv_node;
+ struct grpc_cv_node* next;
+ struct grpc_cv_node* prev;
+} grpc_cv_node;
-typedef struct fd_node {
+typedef struct grpc_fd_node {
int is_set;
- cv_node* cvs;
- struct fd_node* next_free;
-} fd_node;
+ grpc_cv_node* cvs;
+ struct grpc_fd_node* next_free;
+} grpc_fd_node;
-typedef struct cv_fd_table {
+typedef struct grpc_cv_fd_table {
gpr_mu mu;
gpr_refcount pollcount;
gpr_cv shutdown_cv;
- fd_node* cvfds;
- fd_node* free_fds;
+ grpc_fd_node* cvfds;
+ grpc_fd_node* free_fds;
unsigned int size;
grpc_poll_function_type poll;
-} cv_fd_table;
+} grpc_cv_fd_table;
extern const grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable;
diff --git a/src/core/lib/support/debug_location.h b/src/core/lib/support/debug_location.h
index 0939da595d..9b3f9220fc 100644
--- a/src/core/lib/support/debug_location.h
+++ b/src/core/lib/support/debug_location.h
@@ -36,7 +36,7 @@ class DebugLocation {
const char* file_;
const int line_;
};
-#define DEBUG_LOCATION DebugLocation(__FILE__, __LINE__)
+#define DEBUG_LOCATION ::grpc_core::DebugLocation(__FILE__, __LINE__)
#else
class DebugLocation {
public:
@@ -44,7 +44,7 @@ class DebugLocation {
const char* file() const { return nullptr; }
int line() const { return -1; }
};
-#define DEBUG_LOCATION DebugLocation()
+#define DEBUG_LOCATION ::grpc_core::DebugLocation()
#endif
} // namespace grpc_core
diff --git a/src/node/health_check/package.json b/src/node/health_check/package.json
deleted file mode 100644
index fca3a2a7a6..0000000000
--- a/src/node/health_check/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "grpc-health-check",
- "version": "1.7.2",
- "author": "Google Inc.",
- "description": "Health check service for use with gRPC",
- "repository": {
- "type": "git",
- "url": "https://github.com/grpc/grpc.git"
- },
- "bugs": "https://github.com/grpc/grpc/issues",
- "contributors": [
- {
- "name": "Michael Lumish",
- "email": "mlumish@google.com"
- }
- ],
- "dependencies": {
- "grpc": "^1.7.2",
- "lodash": "^3.9.3",
- "google-protobuf": "^3.0.0"
- },
- "files": [
- "LICENSE",
- "health.js",
- "v1"
- ],
- "main": "src/node/index.js",
- "license": "Apache-2.0"
-}
diff --git a/src/node/tools/package.json b/src/node/tools/package.json
deleted file mode 100644
index 99fd854067..0000000000
--- a/src/node/tools/package.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "grpc-tools",
- "version": "1.7.2",
- "author": "Google Inc.",
- "description": "Tools for developing with gRPC on Node.js",
- "homepage": "https://grpc.io/",
- "repository": {
- "type": "git",
- "url": "https://github.com/grpc/grpc.git"
- },
- "bugs": "https://github.com/grpc/grpc/issues",
- "contributors": [
- {
- "name": "Michael Lumish",
- "email": "mlumish@google.com"
- }
- ],
- "bin": {
- "grpc_tools_node_protoc": "./bin/protoc.js",
- "grpc_tools_node_protoc_plugin": "./bin/protoc_plugin.js"
- },
- "scripts": {
- "install": "./node_modules/.bin/node-pre-gyp install"
- },
- "bundledDependencies": ["node-pre-gyp"],
- "binary": {
- "module_name": "grpc_tools",
- "host": "https://storage.googleapis.com/",
- "remote_path": "grpc-precompiled-binaries/node/{name}/v{version}",
- "package_name": "{platform}-{arch}.tar.gz",
- "module_path": "bin"
- },
- "files": [
- "index.js",
- "bin/protoc.js",
- "bin/protoc_plugin.js",
- "bin/google/protobuf",
- "LICENSE"
- ],
- "main": "index.js"
-}
diff --git a/src/objective-c/tests/run_tests.sh b/src/objective-c/tests/run_tests.sh
index cf0b07e8c0..cec34787cf 100755
--- a/src/objective-c/tests/run_tests.sh
+++ b/src/objective-c/tests/run_tests.sh
@@ -34,36 +34,50 @@ $BINDIR/interop_server --port=5051 --max_send_message_size=8388608 --use_tls &
# Kill them when this script exits.
trap 'kill -9 `jobs -p` ; echo "EXIT TIME: $(date)"' EXIT
-# Boot Xcode first with several retries since Xcode might fail due to a bug:
-# http://www.openradar.me/29785686
-xcrun simctl list | egrep 'iPhone 6 \('
-udid=`xcrun simctl list | egrep 'iPhone 6 \(.*\) \(.*\)' | sed -E 's/ *iPhone 6 \(([^\)]*)\).*/\1/g' | head -n 1`
-retries=0
-while [ $retries -lt 3 ] && ! open -a Simulator --args -CurrentDeviceUDID $udid ; do
-retries=$(($retries+1))
-done
-if [ $retries == 3 ]; then
- echo "Xcode simulator failed to start after 3 retries."
- exit 1
-fi
+set -o pipefail
# xcodebuild is very verbose. We filter its output and tell Bash to fail if any
# element of the pipe fails.
# TODO(jcanizales): Use xctool instead? Issue #2540.
-set -o pipefail
XCODEBUILD_FILTER='(^CompileC |^Ld |^ *[^ ]*clang |^ *cd |^ *export |^Libtool |^ *[^ ]*libtool |^CpHeader |^ *builtin-copy )'
+
echo "TIME: $(date)"
-xcodebuild \
- -workspace Tests.xcworkspace \
- -scheme AllTests \
- -destination name="iPhone 6" \
- HOST_PORT_LOCALSSL=localhost:5051 \
- HOST_PORT_LOCAL=localhost:5050 \
- HOST_PORT_REMOTE=grpc-test.sandbox.googleapis.com \
- test \
- | egrep -v "$XCODEBUILD_FILTER" \
- | egrep -v '^$' \
- | egrep -v "(GPBDictionary|GPBArray)" -
+
+# Retry the test for up to 3 times when return code is 65, due to Xcode issue:
+# http://www.openradar.me/29785686
+# The issue seems to be a connectivity issue to Xcode simulator so only retry
+# the first xcodebuild command
+retries=0
+while [ $retries -lt 3 ]; do
+ return_code=0
+ out=$(xcodebuild \
+ -workspace Tests.xcworkspace \
+ -scheme AllTests \
+ -destination name="iPhone 6" \
+ HOST_PORT_LOCALSSL=localhost:5051 \
+ HOST_PORT_LOCAL=localhost:5050 \
+ HOST_PORT_REMOTE=grpc-test.sandbox.googleapis.com \
+ test 2>&1 \
+ | egrep -v "$XCODEBUILD_FILTER" \
+ | egrep -v '^$' \
+ | egrep -v "(GPBDictionary|GPBArray)" - ) || return_code=$?
+ if [ $return_code == 65 ] && [[ $out == *"DTXProxyChannel error 1"* ]]; then
+ echo "$out"
+ echo "Failed with code 65 (DTXProxyChannel error 1); retry."
+ retries=$(($retries+1))
+ elif [ $return_code == 0 ]; then
+ echo "$out"
+ break
+ else
+ echo "$out"
+ echo "Failed with code $return_code."
+ exit 1
+ fi
+done
+if [ $retries == 3 ]; then
+ echo "Failed with code 65 for 3 times; abort."
+ exit 1
+fi
echo "TIME: $(date)"
xcodebuild \
@@ -95,3 +109,5 @@ xcodebuild \
| egrep -v "$XCODEBUILD_FILTER" \
| egrep -v '^$' \
| egrep -v "(GPBDictionary|GPBArray)" -
+
+exit 0
diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py
index d7456a3dd1..3572737c87 100644
--- a/src/python/grpcio/grpc/_channel.py
+++ b/src/python/grpcio/grpc/_channel.py
@@ -129,12 +129,12 @@ def _abort(state, code, details):
def _handle_event(event, state, response_deserializer):
callbacks = []
for batch_operation in event.batch_operations:
- operation_type = batch_operation.type
+ operation_type = batch_operation.type()
state.due.remove(operation_type)
if operation_type == cygrpc.OperationType.receive_initial_metadata:
- state.initial_metadata = batch_operation.received_metadata
+ state.initial_metadata = batch_operation.initial_metadata()
elif operation_type == cygrpc.OperationType.receive_message:
- serialized_response = batch_operation.received_message.bytes()
+ serialized_response = batch_operation.message()
if serialized_response is not None:
response = _common.deserialize(serialized_response,
response_deserializer)
@@ -144,18 +144,17 @@ def _handle_event(event, state, response_deserializer):
else:
state.response = response
elif operation_type == cygrpc.OperationType.receive_status_on_client:
- state.trailing_metadata = batch_operation.received_metadata
+ state.trailing_metadata = batch_operation.trailing_metadata()
if state.code is None:
code = _common.CYGRPC_STATUS_CODE_TO_STATUS_CODE.get(
- batch_operation.received_status_code)
+ batch_operation.code())
if code is None:
state.code = grpc.StatusCode.UNKNOWN
state.details = _unknown_code_details(
- batch_operation.received_status_code,
- batch_operation.received_status_details)
+ code, batch_operation.details())
else:
state.code = code
- state.details = batch_operation.received_status_details
+ state.details = batch_operation.details()
callbacks.extend(state.callbacks)
state.callbacks = None
return callbacks
@@ -200,7 +199,7 @@ def _consume_request_iterator(request_iterator, state, call,
_abort(state, grpc.StatusCode.INTERNAL, details)
return
else:
- operations = (cygrpc.operation_send_message(
+ operations = (cygrpc.SendMessageOperation(
serialized_request, _EMPTY_FLAGS),)
call.start_client_batch(operations, event_handler)
state.due.add(cygrpc.OperationType.send_message)
@@ -216,7 +215,7 @@ def _consume_request_iterator(request_iterator, state, call,
with state.condition:
if state.code is None:
operations = (
- cygrpc.operation_send_close_from_client(_EMPTY_FLAGS),)
+ cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS),)
call.start_client_batch(operations, event_handler)
state.due.add(cygrpc.OperationType.send_close_from_client)
@@ -319,7 +318,7 @@ class _Rendezvous(grpc.RpcError, grpc.Future, grpc.Call):
event_handler = _event_handler(self._state, self._call,
self._response_deserializer)
self._call.start_client_batch(
- (cygrpc.operation_receive_message(_EMPTY_FLAGS),),
+ (cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),),
event_handler)
self._state.due.add(cygrpc.OperationType.receive_message)
elif self._state.code is grpc.StatusCode.OK:
@@ -453,12 +452,12 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable):
else:
state = _RPCState(_UNARY_UNARY_INITIAL_DUE, None, None, None, None)
operations = (
- cygrpc.operation_send_initial_metadata(metadata, _EMPTY_FLAGS),
- cygrpc.operation_send_message(serialized_request, _EMPTY_FLAGS),
- cygrpc.operation_send_close_from_client(_EMPTY_FLAGS),
- cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),
- cygrpc.operation_receive_message(_EMPTY_FLAGS),
- cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),)
+ cygrpc.SendInitialMetadataOperation(metadata, _EMPTY_FLAGS),
+ cygrpc.SendMessageOperation(serialized_request, _EMPTY_FLAGS),
+ cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),)
return state, operations, deadline, deadline_timespec, None
def _blocking(self, request, timeout, metadata, credentials):
@@ -536,14 +535,14 @@ class _UnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
self._response_deserializer)
with state.condition:
call.start_client_batch(
- (cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),),
+ (cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),),
event_handler)
operations = (
- cygrpc.operation_send_initial_metadata(
- metadata, _EMPTY_FLAGS), cygrpc.operation_send_message(
+ cygrpc.SendInitialMetadataOperation(
+ metadata, _EMPTY_FLAGS), cygrpc.SendMessageOperation(
serialized_request, _EMPTY_FLAGS),
- cygrpc.operation_send_close_from_client(_EMPTY_FLAGS),
- cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),)
+ cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),)
call_error = call.start_client_batch(operations, event_handler)
if call_error != cygrpc.CallError.ok:
_call_error_set_RPCstate(state, call_error, metadata)
@@ -573,12 +572,11 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable):
call.set_credentials(credentials._credentials)
with state.condition:
call.start_client_batch(
- (cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),),
- None)
+ (cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),), None)
operations = (
- cygrpc.operation_send_initial_metadata(metadata, _EMPTY_FLAGS),
- cygrpc.operation_receive_message(_EMPTY_FLAGS),
- cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),)
+ cygrpc.SendInitialMetadataOperation(metadata, _EMPTY_FLAGS),
+ cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),)
call_error = call.start_client_batch(operations, None)
_check_call_error(call_error, metadata)
_consume_request_iterator(request_iterator, state, call,
@@ -624,12 +622,12 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable):
event_handler = _event_handler(state, call, self._response_deserializer)
with state.condition:
call.start_client_batch(
- (cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),),
+ (cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),),
event_handler)
operations = (
- cygrpc.operation_send_initial_metadata(metadata, _EMPTY_FLAGS),
- cygrpc.operation_receive_message(_EMPTY_FLAGS),
- cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),)
+ cygrpc.SendInitialMetadataOperation(metadata, _EMPTY_FLAGS),
+ cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),)
call_error = call.start_client_batch(operations, event_handler)
if call_error != cygrpc.CallError.ok:
_call_error_set_RPCstate(state, call_error, metadata)
@@ -664,11 +662,11 @@ class _StreamStreamMultiCallable(grpc.StreamStreamMultiCallable):
event_handler = _event_handler(state, call, self._response_deserializer)
with state.condition:
call.start_client_batch(
- (cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),),
+ (cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),),
event_handler)
operations = (
- cygrpc.operation_send_initial_metadata(metadata, _EMPTY_FLAGS),
- cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),)
+ cygrpc.SendInitialMetadataOperation(metadata, _EMPTY_FLAGS),
+ cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),)
call_error = call.start_client_batch(operations, event_handler)
if call_error != cygrpc.CallError.ok:
_call_error_set_RPCstate(state, call_error, metadata)
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi
index 6361669757..0892215b6d 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi
@@ -26,16 +26,13 @@ cdef class Call:
def _start_batch(self, operations, tag, retain_self):
if not self.is_valid:
raise ValueError("invalid call object cannot be used from Python")
- cdef OperationTag operation_tag = OperationTag(tag, operations)
- if retain_self:
- operation_tag.operation_call = self
- else:
- operation_tag.operation_call = None
- operation_tag.store_ops()
- cpython.Py_INCREF(operation_tag)
+ cdef _BatchOperationTag batch_operation_tag = _BatchOperationTag(
+ tag, operations, self if retain_self else None)
+ batch_operation_tag.prepare()
+ cpython.Py_INCREF(batch_operation_tag)
return grpc_call_start_batch(
- self.c_call, operation_tag.c_ops, operation_tag.c_nops,
- <cpython.PyObject *>operation_tag, NULL)
+ self.c_call, batch_operation_tag.c_ops, batch_operation_tag.c_nops,
+ <cpython.PyObject *>batch_operation_tag, NULL)
def start_client_batch(self, operations, tag):
# We don't reference this call in the operations tag because
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi
index 644df674cc..443d534d7e 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi
@@ -76,12 +76,12 @@ cdef class Channel:
def watch_connectivity_state(
self, grpc_connectivity_state last_observed_state,
Timespec deadline not None, CompletionQueue queue not None, tag):
- cdef OperationTag operation_tag = OperationTag(tag, None)
- cpython.Py_INCREF(operation_tag)
+ cdef _ConnectivityTag connectivity_tag = _ConnectivityTag(tag)
+ cpython.Py_INCREF(connectivity_tag)
with nogil:
grpc_channel_watch_connectivity_state(
self.c_channel, last_observed_state, deadline.c_time,
- queue.c_completion_queue, <cpython.PyObject *>operation_tag)
+ queue.c_completion_queue, <cpython.PyObject *>connectivity_tag)
def target(self):
cdef char *target = NULL
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
index 140fc357b9..e259789b35 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
@@ -37,42 +37,20 @@ cdef class CompletionQueue:
self.is_shutdown = False
cdef _interpret_event(self, grpc_event event):
- cdef OperationTag tag = None
- cdef object user_tag = None
- cdef Call operation_call = None
- cdef CallDetails request_call_details = None
- cdef object request_metadata = None
- cdef object batch_operations = None
+ cdef _Tag tag = None
if event.type == GRPC_QUEUE_TIMEOUT:
- return Event(
- event.type, False, None, None, None, None, False, None)
+ # NOTE(nathaniel): For now we coopt ConnectivityEvent here.
+ return ConnectivityEvent(GRPC_QUEUE_TIMEOUT, False, None)
elif event.type == GRPC_QUEUE_SHUTDOWN:
self.is_shutdown = True
- return Event(
- event.type, True, None, None, None, None, False, None)
+ # NOTE(nathaniel): For now we coopt ConnectivityEvent here.
+ return ConnectivityEvent(GRPC_QUEUE_TIMEOUT, True, None)
else:
- if event.tag != NULL:
- tag = <OperationTag>event.tag
- # We receive event tags only after they've been inc-ref'd elsewhere in
- # the code.
- cpython.Py_DECREF(tag)
- if tag.shutting_down_server is not None:
- tag.shutting_down_server.notify_shutdown_complete()
- user_tag = tag.user_tag
- operation_call = tag.operation_call
- request_call_details = tag.request_call_details
- if tag.is_new_request:
- request_metadata = _metadata(&tag._c_request_metadata)
- grpc_metadata_array_destroy(&tag._c_request_metadata)
- batch_operations = tag.release_ops()
- if tag.is_new_request:
- # Stuff in the tag not explicitly handled by us needs to live through
- # the life of the call
- operation_call.references.extend(tag.references)
- return Event(
- event.type, event.success, user_tag, operation_call,
- request_call_details, request_metadata, tag.is_new_request,
- batch_operations)
+ tag = <_Tag>event.tag
+ # We receive event tags only after they've been inc-ref'd elsewhere in
+ # the code.
+ cpython.Py_DECREF(tag)
+ return tag.event(event)
def poll(self, Timespec deadline=None):
# We name this 'poll' to avoid problems with CPython's expectations for
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/event.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/event.pxd.pxi
new file mode 100644
index 0000000000..686199ecf4
--- /dev/null
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/event.pxd.pxi
@@ -0,0 +1,45 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+cdef class ConnectivityEvent:
+
+ cdef readonly grpc_completion_type completion_type
+ cdef readonly bint success
+ cdef readonly object tag
+
+
+cdef class RequestCallEvent:
+
+ cdef readonly grpc_completion_type completion_type
+ cdef readonly bint success
+ cdef readonly object tag
+ cdef readonly Call call
+ cdef readonly CallDetails call_details
+ cdef readonly tuple invocation_metadata
+
+
+cdef class BatchOperationEvent:
+
+ cdef readonly grpc_completion_type completion_type
+ cdef readonly bint success
+ cdef readonly object tag
+ cdef readonly object batch_operations
+
+
+cdef class ServerShutdownEvent:
+
+ cdef readonly grpc_completion_type completion_type
+ cdef readonly bint success
+ cdef readonly object tag
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/event.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/event.pyx.pxi
new file mode 100644
index 0000000000..af26d27318
--- /dev/null
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/event.pyx.pxi
@@ -0,0 +1,55 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+cdef class ConnectivityEvent:
+
+ def __cinit__(
+ self, grpc_completion_type completion_type, bint success, object tag):
+ self.completion_type = completion_type
+ self.success = success
+ self.tag = tag
+
+
+cdef class RequestCallEvent:
+
+ def __cinit__(
+ self, grpc_completion_type completion_type, bint success, object tag,
+ Call call, CallDetails call_details, tuple invocation_metadata):
+ self.completion_type = completion_type
+ self.success = success
+ self.tag = tag
+ self.call = call
+ self.call_details = call_details
+ self.invocation_metadata = invocation_metadata
+
+
+cdef class BatchOperationEvent:
+
+ def __cinit__(
+ self, grpc_completion_type completion_type, bint success, object tag,
+ object batch_operations):
+ self.completion_type = completion_type
+ self.success = success
+ self.tag = tag
+ self.batch_operations = batch_operations
+
+
+cdef class ServerShutdownEvent:
+
+ def __cinit__(
+ self, grpc_completion_type completion_type, bint success, object tag):
+ self.completion_type = completion_type
+ self.success = success
+ self.tag = tag
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
index 6a72bbf693..6ee833697d 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
@@ -17,6 +17,7 @@ cimport libc.time
# Typedef types with approximately the same semantics to provide their names to
# Cython
+ctypedef unsigned char uint8_t
ctypedef int int32_t
ctypedef unsigned uint32_t
ctypedef long int64_t
@@ -25,6 +26,7 @@ ctypedef long int64_t
cdef extern from "grpc/support/alloc.h":
void *gpr_malloc(size_t size) nogil
+ void *gpr_zalloc(size_t size) nogil
void gpr_free(void *ptr) nogil
void *gpr_realloc(void *p, size_t size) nogil
@@ -183,6 +185,18 @@ cdef extern from "grpc/grpc.h":
size_t arguments_length "num_args"
grpc_arg *arguments "args"
+ ctypedef enum grpc_compression_level:
+ GRPC_COMPRESS_LEVEL_NONE
+ GRPC_COMPRESS_LEVEL_LOW
+ GRPC_COMPRESS_LEVEL_MED
+ GRPC_COMPRESS_LEVEL_HIGH
+
+ ctypedef enum grpc_stream_compression_level:
+ GRPC_STREAM_COMPRESS_LEVEL_NONE
+ GRPC_STREAM_COMPRESS_LEVEL_LOW
+ GRPC_STREAM_COMPRESS_LEVEL_MED
+ GRPC_STREAM_COMPRESS_LEVEL_HIGH
+
ctypedef enum grpc_call_error:
GRPC_CALL_OK
GRPC_CALL_ERROR
@@ -258,9 +272,19 @@ cdef extern from "grpc/grpc.h":
GRPC_OP_RECV_STATUS_ON_CLIENT
GRPC_OP_RECV_CLOSE_ON_SERVER
+ ctypedef struct grpc_op_send_initial_metadata_maybe_compression_level:
+ uint8_t is_set
+ grpc_compression_level level
+
+ ctypedef struct grpc_op_send_initial_metadata_maybe_stream_compression_level:
+ uint8_t is_set
+ grpc_stream_compression_level level
+
ctypedef struct grpc_op_data_send_initial_metadata:
size_t count
grpc_metadata *metadata
+ grpc_op_send_initial_metadata_maybe_compression_level maybe_compression_level
+ grpc_op_send_initial_metadata_maybe_stream_compression_level maybe_stream_compression_level
ctypedef struct grpc_op_data_send_status_from_server:
size_t trailing_metadata_count
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/operation.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/operation.pxd.pxi
new file mode 100644
index 0000000000..bfbe27785b
--- /dev/null
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/operation.pxd.pxi
@@ -0,0 +1,109 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+cdef class Operation:
+
+ cdef void c(self)
+ cdef void un_c(self)
+
+ # TODO(https://github.com/grpc/grpc/issues/7950): Eliminate this!
+ cdef grpc_op c_op
+
+
+cdef class SendInitialMetadataOperation(Operation):
+
+ cdef readonly object _initial_metadata;
+ cdef readonly int _flags
+ cdef grpc_metadata *_c_initial_metadata
+ cdef size_t _c_initial_metadata_count
+
+ cdef void c(self)
+ cdef void un_c(self)
+
+
+cdef class SendMessageOperation(Operation):
+
+ cdef readonly bytes _message
+ cdef readonly int _flags
+ cdef grpc_byte_buffer *_c_message_byte_buffer
+
+ cdef void c(self)
+ cdef void un_c(self)
+
+
+cdef class SendCloseFromClientOperation(Operation):
+
+ cdef readonly int _flags
+
+ cdef void c(self)
+ cdef void un_c(self)
+
+
+cdef class SendStatusFromServerOperation(Operation):
+
+ cdef readonly object _trailing_metadata
+ cdef readonly object _code
+ cdef readonly object _details
+ cdef readonly int _flags
+ cdef grpc_metadata *_c_trailing_metadata
+ cdef size_t _c_trailing_metadata_count
+ cdef grpc_slice _c_details
+
+ cdef void c(self)
+ cdef void un_c(self)
+
+
+cdef class ReceiveInitialMetadataOperation(Operation):
+
+ cdef readonly int _flags
+ cdef tuple _initial_metadata
+ cdef grpc_metadata_array _c_initial_metadata
+
+ cdef void c(self)
+ cdef void un_c(self)
+
+
+cdef class ReceiveMessageOperation(Operation):
+
+ cdef readonly int _flags
+ cdef grpc_byte_buffer *_c_message_byte_buffer
+ cdef bytes _message
+
+ cdef void c(self)
+ cdef void un_c(self)
+
+
+cdef class ReceiveStatusOnClientOperation(Operation):
+
+ cdef readonly int _flags
+ cdef grpc_metadata_array _c_trailing_metadata
+ cdef grpc_status_code _c_code
+ cdef grpc_slice _c_details
+ cdef tuple _trailing_metadata
+ cdef object _code
+ cdef str _details
+
+ cdef void c(self)
+ cdef void un_c(self)
+
+
+cdef class ReceiveCloseOnServerOperation(Operation):
+
+ cdef readonly int _flags
+ cdef object _cancelled
+ cdef int _c_cancelled
+
+ cdef void c(self)
+ cdef void un_c(self)
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/operation.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/operation.pyx.pxi
new file mode 100644
index 0000000000..3c91abf722
--- /dev/null
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/operation.pyx.pxi
@@ -0,0 +1,238 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+cdef class Operation:
+
+ cdef void c(self):
+ raise NotImplementedError()
+
+ cdef void un_c(self):
+ raise NotImplementedError()
+
+
+cdef class SendInitialMetadataOperation(Operation):
+
+ def __cinit__(self, initial_metadata, flags):
+ self._initial_metadata = initial_metadata
+ self._flags = flags
+
+ def type(self):
+ return GRPC_OP_SEND_INITIAL_METADATA
+
+ cdef void c(self):
+ self.c_op.type = GRPC_OP_SEND_INITIAL_METADATA
+ self.c_op.flags = self._flags
+ _store_c_metadata(
+ self._initial_metadata, &self._c_initial_metadata,
+ &self._c_initial_metadata_count)
+ self.c_op.data.send_initial_metadata.metadata = self._c_initial_metadata
+ self.c_op.data.send_initial_metadata.count = self._c_initial_metadata_count
+ self.c_op.data.send_initial_metadata.maybe_compression_level.is_set = 0
+ self.c_op.data.send_initial_metadata.maybe_stream_compression_level.is_set = 0
+
+ cdef void un_c(self):
+ _release_c_metadata(
+ self._c_initial_metadata, self._c_initial_metadata_count)
+
+
+cdef class SendMessageOperation(Operation):
+
+ def __cinit__(self, bytes message, int flags):
+ self._message = message
+ self._flags = flags
+
+ def type(self):
+ return GRPC_OP_SEND_MESSAGE
+
+ cdef void c(self):
+ self.c_op.type = GRPC_OP_SEND_MESSAGE
+ self.c_op.flags = self._flags
+ cdef grpc_slice message_slice = grpc_slice_from_copied_buffer(
+ self._message, len(self._message))
+ self._c_message_byte_buffer = grpc_raw_byte_buffer_create(
+ &message_slice, 1)
+ grpc_slice_unref(message_slice)
+ self.c_op.data.send_message.send_message = self._c_message_byte_buffer
+
+ cdef void un_c(self):
+ grpc_byte_buffer_destroy(self._c_message_byte_buffer)
+
+
+cdef class SendCloseFromClientOperation(Operation):
+
+ def __cinit__(self, int flags):
+ self._flags = flags
+
+ def type(self):
+ return GRPC_OP_SEND_CLOSE_FROM_CLIENT
+
+ cdef void c(self):
+ self.c_op.type = GRPC_OP_SEND_CLOSE_FROM_CLIENT
+ self.c_op.flags = self._flags
+
+ cdef void un_c(self):
+ pass
+
+
+cdef class SendStatusFromServerOperation(Operation):
+
+ def __cinit__(self, trailing_metadata, code, object details, int flags):
+ self._trailing_metadata = trailing_metadata
+ self._code = code
+ self._details = details
+ self._flags = flags
+
+ def type(self):
+ return GRPC_OP_SEND_STATUS_FROM_SERVER
+
+ cdef void c(self):
+ self.c_op.type = GRPC_OP_SEND_STATUS_FROM_SERVER
+ self.c_op.flags = self._flags
+ _store_c_metadata(
+ self._trailing_metadata, &self._c_trailing_metadata,
+ &self._c_trailing_metadata_count)
+ self.c_op.data.send_status_from_server.trailing_metadata = (
+ self._c_trailing_metadata)
+ self.c_op.data.send_status_from_server.trailing_metadata_count = (
+ self._c_trailing_metadata_count)
+ self.c_op.data.send_status_from_server.status = self._code
+ self._c_details = _slice_from_bytes(_encode(self._details))
+ self.c_op.data.send_status_from_server.status_details = &self._c_details
+
+ cdef void un_c(self):
+ grpc_slice_unref(self._c_details)
+ _release_c_metadata(
+ self._c_trailing_metadata, self._c_trailing_metadata_count)
+
+
+cdef class ReceiveInitialMetadataOperation(Operation):
+
+ def __cinit__(self, flags):
+ self._flags = flags
+
+ def type(self):
+ return GRPC_OP_RECV_INITIAL_METADATA
+
+ cdef void c(self):
+ self.c_op.type = GRPC_OP_RECV_INITIAL_METADATA
+ self.c_op.flags = self._flags
+ grpc_metadata_array_init(&self._c_initial_metadata)
+ self.c_op.data.receive_initial_metadata.receive_initial_metadata = (
+ &self._c_initial_metadata)
+
+ cdef void un_c(self):
+ self._initial_metadata = _metadata(&self._c_initial_metadata)
+ grpc_metadata_array_destroy(&self._c_initial_metadata)
+
+ def initial_metadata(self):
+ return self._initial_metadata
+
+
+cdef class ReceiveMessageOperation(Operation):
+
+ def __cinit__(self, flags):
+ self._flags = flags
+
+ def type(self):
+ return GRPC_OP_RECV_MESSAGE
+
+ cdef void c(self):
+ self.c_op.type = GRPC_OP_RECV_MESSAGE
+ self.c_op.flags = self._flags
+ self.c_op.data.receive_message.receive_message = (
+ &self._c_message_byte_buffer)
+
+ cdef void un_c(self):
+ cdef grpc_byte_buffer_reader message_reader
+ cdef bint message_reader_status
+ cdef grpc_slice message_slice
+ cdef size_t message_slice_length
+ cdef void *message_slice_pointer
+ if self._c_message_byte_buffer != NULL:
+ message_reader_status = grpc_byte_buffer_reader_init(
+ &message_reader, self._c_message_byte_buffer)
+ if message_reader_status:
+ message = bytearray()
+ while grpc_byte_buffer_reader_next(&message_reader, &message_slice):
+ message_slice_pointer = grpc_slice_start_ptr(message_slice)
+ message_slice_length = grpc_slice_length(message_slice)
+ message += (<char *>message_slice_pointer)[:message_slice_length]
+ grpc_slice_unref(message_slice)
+ grpc_byte_buffer_reader_destroy(&message_reader)
+ self._message = bytes(message)
+ else:
+ self._message = None
+ grpc_byte_buffer_destroy(self._c_message_byte_buffer)
+ else:
+ self._message = None
+
+ def message(self):
+ return self._message
+
+
+cdef class ReceiveStatusOnClientOperation(Operation):
+
+ def __cinit__(self, flags):
+ self._flags = flags
+
+ def type(self):
+ return GRPC_OP_RECV_STATUS_ON_CLIENT
+
+ cdef void c(self):
+ self.c_op.type = GRPC_OP_RECV_STATUS_ON_CLIENT
+ self.c_op.flags = self._flags
+ grpc_metadata_array_init(&self._c_trailing_metadata)
+ self.c_op.data.receive_status_on_client.trailing_metadata = (
+ &self._c_trailing_metadata)
+ self.c_op.data.receive_status_on_client.status = (
+ &self._c_code)
+ self.c_op.data.receive_status_on_client.status_details = (
+ &self._c_details)
+
+ cdef void un_c(self):
+ self._trailing_metadata = _metadata(&self._c_trailing_metadata)
+ grpc_metadata_array_destroy(&self._c_trailing_metadata)
+ self._code = self._c_code
+ self._details = _decode(_slice_bytes(self._c_details))
+ grpc_slice_unref(self._c_details)
+
+ def trailing_metadata(self):
+ return self._trailing_metadata
+
+ def code(self):
+ return self._code
+
+ def details(self):
+ return self._details
+
+
+cdef class ReceiveCloseOnServerOperation(Operation):
+
+ def __cinit__(self, flags):
+ self._flags = flags
+
+ def type(self):
+ return GRPC_OP_RECV_CLOSE_ON_SERVER
+
+ cdef void c(self):
+ self.c_op.type = GRPC_OP_RECV_CLOSE_ON_SERVER
+ self.c_op.flags = self._flags
+ self.c_op.data.receive_close_on_server.cancelled = &self._c_cancelled
+
+ cdef void un_c(self):
+ self._cancelled = bool(self._c_cancelled)
+
+ def cancelled(self):
+ return self._cancelled
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi
index 594fdb1a8b..7b2482d947 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi
@@ -28,48 +28,6 @@ cdef class CallDetails:
cdef grpc_call_details c_details
-cdef class OperationTag:
-
- cdef object user_tag
- cdef list references
- # This allows CompletionQueue to notify the Python Server object that the
- # underlying GRPC core server has shutdown
- cdef Server shutting_down_server
- cdef Call operation_call
- cdef CallDetails request_call_details
- cdef grpc_metadata_array _c_request_metadata
- cdef grpc_op *c_ops
- cdef size_t c_nops
- cdef readonly object _operations
- cdef bint is_new_request
-
- cdef void store_ops(self)
- cdef object release_ops(self)
-
-
-cdef class Event:
-
- cdef readonly grpc_completion_type type
- cdef readonly bint success
- cdef readonly object tag
-
- # For Server.request_call
- cdef readonly bint is_new_request
- cdef readonly CallDetails request_call_details
- cdef readonly object request_metadata
-
- # For server calls
- cdef readonly Call operation_call
-
- # For Call.start_batch
- cdef readonly object batch_operations
-
-
-cdef class ByteBuffer:
-
- cdef grpc_byte_buffer *c_byte_buffer
-
-
cdef class SslPemKeyCertPair:
cdef grpc_ssl_pem_key_cert_pair c_pair
@@ -89,22 +47,6 @@ cdef class ChannelArgs:
cdef list args
-cdef class Operation:
-
- cdef grpc_op c_op
- cdef bint _c_metadata_needs_release
- cdef size_t _c_metadata_count
- cdef grpc_metadata *_c_metadata
- cdef ByteBuffer _received_message
- cdef bint _c_metadata_array_needs_destruction
- cdef grpc_metadata_array _c_metadata_array
- cdef grpc_status_code _received_status_code
- cdef grpc_slice _status_details
- cdef int _received_cancelled
- cdef readonly bint is_valid
- cdef object references
-
-
cdef class CompressionOptions:
cdef grpc_compression_options c_options
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
index 26eaf50eb4..bc2cd0338e 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
@@ -218,111 +218,6 @@ cdef class CallDetails:
return timespec
-cdef class OperationTag:
-
- def __cinit__(self, user_tag, operations):
- self.user_tag = user_tag
- self.references = []
- self._operations = operations
-
- cdef void store_ops(self):
- self.c_nops = 0 if self._operations is None else len(self._operations)
- if 0 < self.c_nops:
- self.c_ops = <grpc_op *>gpr_malloc(sizeof(grpc_op) * self.c_nops)
- for index in range(self.c_nops):
- self.c_ops[index] = (<Operation>(self._operations[index])).c_op
-
- cdef object release_ops(self):
- if 0 < self.c_nops:
- for index, operation in enumerate(self._operations):
- (<Operation>operation).c_op = self.c_ops[index]
- gpr_free(self.c_ops)
- return self._operations
- else:
- return ()
-
-
-cdef class Event:
-
- def __cinit__(self, grpc_completion_type type, bint success,
- object tag, Call operation_call,
- CallDetails request_call_details,
- object request_metadata,
- bint is_new_request,
- object batch_operations):
- self.type = type
- self.success = success
- self.tag = tag
- self.operation_call = operation_call
- self.request_call_details = request_call_details
- self.request_metadata = request_metadata
- self.batch_operations = batch_operations
- self.is_new_request = is_new_request
-
-
-cdef class ByteBuffer:
-
- def __cinit__(self, bytes data):
- grpc_init()
- if data is None:
- self.c_byte_buffer = NULL
- return
-
- cdef char *c_data = data
- cdef grpc_slice data_slice
- cdef size_t data_length = len(data)
- with nogil:
- data_slice = grpc_slice_from_copied_buffer(c_data, data_length)
- with nogil:
- self.c_byte_buffer = grpc_raw_byte_buffer_create(
- &data_slice, 1)
- with nogil:
- grpc_slice_unref(data_slice)
-
- def bytes(self):
- cdef grpc_byte_buffer_reader reader
- cdef grpc_slice data_slice
- cdef size_t data_slice_length
- cdef void *data_slice_pointer
- cdef bint reader_status
- if self.c_byte_buffer != NULL:
- with nogil:
- reader_status = grpc_byte_buffer_reader_init(
- &reader, self.c_byte_buffer)
- if not reader_status:
- return None
- result = bytearray()
- with nogil:
- while grpc_byte_buffer_reader_next(&reader, &data_slice):
- data_slice_pointer = grpc_slice_start_ptr(data_slice)
- data_slice_length = grpc_slice_length(data_slice)
- with gil:
- result += (<char *>data_slice_pointer)[:data_slice_length]
- grpc_slice_unref(data_slice)
- with nogil:
- grpc_byte_buffer_reader_destroy(&reader)
- return bytes(result)
- else:
- return None
-
- def __len__(self):
- cdef size_t result
- if self.c_byte_buffer != NULL:
- with nogil:
- result = grpc_byte_buffer_length(self.c_byte_buffer)
- return result
- else:
- return 0
-
- def __str__(self):
- return self.bytes()
-
- def __dealloc__(self):
- if self.c_byte_buffer != NULL:
- grpc_byte_buffer_destroy(self.c_byte_buffer)
- grpc_shutdown()
-
-
cdef class SslPemKeyCertPair:
def __cinit__(self, bytes private_key, bytes certificate_chain):
@@ -407,185 +302,6 @@ cdef class ChannelArgs:
return self.args[i]
-cdef class Operation:
-
- def __cinit__(self):
- grpc_init()
- self.references = []
- self._c_metadata_needs_release = False
- self._c_metadata_array_needs_destruction = False
- self._status_details = grpc_empty_slice()
- self.is_valid = False
-
- @property
- def type(self):
- return self.c_op.type
-
- @property
- def flags(self):
- return self.c_op.flags
-
- @property
- def has_status(self):
- return self.c_op.type == GRPC_OP_RECV_STATUS_ON_CLIENT
-
- @property
- def received_message(self):
- if self.c_op.type != GRPC_OP_RECV_MESSAGE:
- raise TypeError("self must be an operation receiving a message")
- return self._received_message
-
- @property
- def received_message_or_none(self):
- if self.c_op.type != GRPC_OP_RECV_MESSAGE:
- return None
- return self._received_message
-
- @property
- def received_metadata(self):
- if (self.c_op.type != GRPC_OP_RECV_INITIAL_METADATA and
- self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT):
- raise TypeError("self must be an operation receiving metadata")
- return _metadata(&self._c_metadata_array)
-
- @property
- def received_status_code(self):
- if self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT:
- raise TypeError("self must be an operation receiving a status code")
- return self._received_status_code
-
- @property
- def received_status_code_or_none(self):
- if self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT:
- return None
- return self._received_status_code
-
- @property
- def received_status_details(self):
- if self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT:
- raise TypeError("self must be an operation receiving status details")
- return _slice_bytes(self._status_details)
-
- @property
- def received_status_details_or_none(self):
- if self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT:
- return None
- return _slice_bytes(self._status_details)
-
- @property
- def received_cancelled(self):
- if self.c_op.type != GRPC_OP_RECV_CLOSE_ON_SERVER:
- raise TypeError("self must be an operation receiving cancellation "
- "information")
- return False if self._received_cancelled == 0 else True
-
- @property
- def received_cancelled_or_none(self):
- if self.c_op.type != GRPC_OP_RECV_CLOSE_ON_SERVER:
- return None
- return False if self._received_cancelled == 0 else True
-
- def __dealloc__(self):
- if self._c_metadata_needs_release:
- _release_c_metadata(self._c_metadata, self._c_metadata_count)
- if self._c_metadata_array_needs_destruction:
- grpc_metadata_array_destroy(&self._c_metadata_array)
- grpc_slice_unref(self._status_details)
- grpc_shutdown()
-
-def operation_send_initial_metadata(metadata, int flags):
- cdef Operation op = Operation()
- op.c_op.type = GRPC_OP_SEND_INITIAL_METADATA
- op.c_op.flags = flags
- _store_c_metadata(metadata, &op._c_metadata, &op._c_metadata_count)
- op._c_metadata_needs_release = True
- op.c_op.data.send_initial_metadata.count = op._c_metadata_count
- op.c_op.data.send_initial_metadata.metadata = op._c_metadata
- op.is_valid = True
- return op
-
-def operation_send_message(data, int flags):
- cdef Operation op = Operation()
- op.c_op.type = GRPC_OP_SEND_MESSAGE
- op.c_op.flags = flags
- byte_buffer = ByteBuffer(data)
- op.c_op.data.send_message.send_message = byte_buffer.c_byte_buffer
- op.references.append(byte_buffer)
- op.is_valid = True
- return op
-
-def operation_send_close_from_client(int flags):
- cdef Operation op = Operation()
- op.c_op.type = GRPC_OP_SEND_CLOSE_FROM_CLIENT
- op.c_op.flags = flags
- op.is_valid = True
- return op
-
-def operation_send_status_from_server(
- metadata, grpc_status_code code, bytes details, int flags):
- cdef Operation op = Operation()
- op.c_op.type = GRPC_OP_SEND_STATUS_FROM_SERVER
- op.c_op.flags = flags
- _store_c_metadata(metadata, &op._c_metadata, &op._c_metadata_count)
- op._c_metadata_needs_release = True
- op.c_op.data.send_status_from_server.trailing_metadata_count = (
- op._c_metadata_count)
- op.c_op.data.send_status_from_server.trailing_metadata = op._c_metadata
- op.c_op.data.send_status_from_server.status = code
- grpc_slice_unref(op._status_details)
- op._status_details = _slice_from_bytes(details)
- op.c_op.data.send_status_from_server.status_details = &op._status_details
- op.is_valid = True
- return op
-
-def operation_receive_initial_metadata(int flags):
- cdef Operation op = Operation()
- op.c_op.type = GRPC_OP_RECV_INITIAL_METADATA
- op.c_op.flags = flags
- grpc_metadata_array_init(&op._c_metadata_array)
- op.c_op.data.receive_initial_metadata.receive_initial_metadata = (
- &op._c_metadata_array)
- op._c_metadata_array_needs_destruction = True
- op.is_valid = True
- return op
-
-def operation_receive_message(int flags):
- cdef Operation op = Operation()
- op.c_op.type = GRPC_OP_RECV_MESSAGE
- op.c_op.flags = flags
- op._received_message = ByteBuffer(None)
- # n.b. the c_op.data.receive_message field needs to be deleted by us,
- # anyway, so we just let that be handled by the ByteBuffer() we allocated
- # the line before.
- op.c_op.data.receive_message.receive_message = (
- &op._received_message.c_byte_buffer)
- op.is_valid = True
- return op
-
-def operation_receive_status_on_client(int flags):
- cdef Operation op = Operation()
- op.c_op.type = GRPC_OP_RECV_STATUS_ON_CLIENT
- op.c_op.flags = flags
- grpc_metadata_array_init(&op._c_metadata_array)
- op.c_op.data.receive_status_on_client.trailing_metadata = (
- &op._c_metadata_array)
- op._c_metadata_array_needs_destruction = True
- op.c_op.data.receive_status_on_client.status = (
- &op._received_status_code)
- op.c_op.data.receive_status_on_client.status_details = (
- &op._status_details)
- op.is_valid = True
- return op
-
-def operation_receive_close_on_server(int flags):
- cdef Operation op = Operation()
- op.c_op.type = GRPC_OP_RECV_CLOSE_ON_SERVER
- op.c_op.flags = flags
- op.c_op.data.receive_close_on_server.cancelled = &op._received_cancelled
- op.is_valid = True
- return op
-
-
cdef class CompressionOptions:
def __cinit__(self):
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi
index f8d7892858..c19beccde6 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi
@@ -78,19 +78,15 @@ cdef class Server:
raise ValueError("server must be started and not shutting down")
if server_queue not in self.registered_completion_queues:
raise ValueError("server_queue must be a registered completion queue")
- cdef OperationTag operation_tag = OperationTag(tag, None)
- operation_tag.operation_call = Call()
- operation_tag.request_call_details = CallDetails()
- grpc_metadata_array_init(&operation_tag._c_request_metadata)
- operation_tag.references.extend([self, call_queue, server_queue])
- operation_tag.is_new_request = True
- cpython.Py_INCREF(operation_tag)
+ cdef _RequestCallTag request_call_tag = _RequestCallTag(tag)
+ request_call_tag.prepare()
+ cpython.Py_INCREF(request_call_tag)
return grpc_server_request_call(
- self.c_server, &operation_tag.operation_call.c_call,
- &operation_tag.request_call_details.c_details,
- &operation_tag._c_request_metadata,
+ self.c_server, &request_call_tag.call.c_call,
+ &request_call_tag.call_details.c_details,
+ &request_call_tag.c_invocation_metadata,
call_queue.c_completion_queue, server_queue.c_completion_queue,
- <cpython.PyObject *>operation_tag)
+ <cpython.PyObject *>request_call_tag)
def register_completion_queue(
self, CompletionQueue queue not None):
@@ -131,16 +127,14 @@ cdef class Server:
cdef _c_shutdown(self, CompletionQueue queue, tag):
self.is_shutting_down = True
- operation_tag = OperationTag(tag, None)
- operation_tag.shutting_down_server = self
- cpython.Py_INCREF(operation_tag)
+ cdef _ServerShutdownTag server_shutdown_tag = _ServerShutdownTag(tag, self)
+ cpython.Py_INCREF(server_shutdown_tag)
with nogil:
grpc_server_shutdown_and_notify(
self.c_server, queue.c_completion_queue,
- <cpython.PyObject *>operation_tag)
+ <cpython.PyObject *>server_shutdown_tag)
def shutdown(self, CompletionQueue queue not None, tag):
- cdef OperationTag operation_tag
if queue.is_shutting_down:
raise ValueError("queue must be live")
elif not self.is_started:
@@ -153,7 +147,8 @@ cdef class Server:
self._c_shutdown(queue, tag)
cdef notify_shutdown_complete(self):
- # called only by a completion queue on receiving our shutdown operation tag
+ # called only after our server shutdown tag has emerged from a completion
+ # queue.
self.is_shutdown = True
def cancel_all_calls(self):
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/tag.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/tag.pxd.pxi
new file mode 100644
index 0000000000..f9a3b5e8f4
--- /dev/null
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/tag.pxd.pxi
@@ -0,0 +1,58 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+cdef class _Tag:
+
+ cdef object event(self, grpc_event c_event)
+
+
+cdef class _ConnectivityTag(_Tag):
+
+ cdef readonly object _user_tag
+
+ cdef ConnectivityEvent event(self, grpc_event c_event)
+
+
+cdef class _RequestCallTag(_Tag):
+
+ cdef readonly object _user_tag
+ cdef Call call
+ cdef CallDetails call_details
+ cdef grpc_metadata_array c_invocation_metadata
+
+ cdef void prepare(self)
+ cdef RequestCallEvent event(self, grpc_event c_event)
+
+
+cdef class _BatchOperationTag(_Tag):
+
+ cdef object _user_tag
+ cdef readonly object _operations
+ cdef readonly object _retained_call
+ cdef grpc_op *c_ops
+ cdef size_t c_nops
+
+ cdef void prepare(self)
+ cdef BatchOperationEvent event(self, grpc_event c_event)
+
+
+cdef class _ServerShutdownTag(_Tag):
+
+ cdef readonly object _user_tag
+ # This allows CompletionQueue to notify the Python Server object that the
+ # underlying GRPC core server has shutdown
+ cdef readonly Server _shutting_down_server
+
+ cdef ServerShutdownEvent event(self, grpc_event c_event)
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/tag.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/tag.pyx.pxi
new file mode 100644
index 0000000000..aaca458442
--- /dev/null
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/tag.pyx.pxi
@@ -0,0 +1,87 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+cdef class _Tag:
+
+ cdef object event(self, grpc_event c_event):
+ raise NotImplementedError()
+
+
+cdef class _ConnectivityTag(_Tag):
+
+ def __cinit__(self, user_tag):
+ self._user_tag = user_tag
+
+ cdef ConnectivityEvent event(self, grpc_event c_event):
+ return ConnectivityEvent(c_event.type, c_event.success, self._user_tag)
+
+
+cdef class _RequestCallTag(_Tag):
+
+ def __cinit__(self, user_tag):
+ self._user_tag = user_tag
+ self.call = None
+ self.call_details = None
+
+ cdef void prepare(self):
+ self.call = Call()
+ self.call_details = CallDetails()
+ grpc_metadata_array_init(&self.c_invocation_metadata)
+
+ cdef RequestCallEvent event(self, grpc_event c_event):
+ cdef tuple invocation_metadata = _metadata(&self.c_invocation_metadata)
+ grpc_metadata_array_destroy(&self.c_invocation_metadata)
+ return RequestCallEvent(
+ c_event.type, c_event.success, self._user_tag, self.call,
+ self.call_details, invocation_metadata)
+
+
+cdef class _BatchOperationTag:
+
+ def __cinit__(self, user_tag, operations, call):
+ self._user_tag = user_tag
+ self._operations = operations
+ self._retained_call = call
+
+ cdef void prepare(self):
+ self.c_nops = 0 if self._operations is None else len(self._operations)
+ if 0 < self.c_nops:
+ self.c_ops = <grpc_op *>gpr_malloc(sizeof(grpc_op) * self.c_nops)
+ for index, operation in enumerate(self._operations):
+ (<Operation>operation).c()
+ self.c_ops[index] = (<Operation>operation).c_op
+
+ cdef BatchOperationEvent event(self, grpc_event c_event):
+ if 0 < self.c_nops:
+ for index, operation in enumerate(self._operations):
+ (<Operation>operation).c_op = self.c_ops[index]
+ (<Operation>operation).un_c()
+ gpr_free(self.c_ops)
+ return BatchOperationEvent(
+ c_event.type, c_event.success, self._user_tag, self._operations)
+ else:
+ return BatchOperationEvent(
+ c_event.type, c_event.success, self._user_tag, ())
+
+
+cdef class _ServerShutdownTag(_Tag):
+
+ def __cinit__(self, user_tag, shutting_down_server):
+ self._user_tag = user_tag
+ self._shutting_down_server = shutting_down_server
+
+ cdef ServerShutdownEvent event(self, grpc_event c_event):
+ self._shutting_down_server.notify_shutdown_complete()
+ return ServerShutdownEvent(c_event.type, c_event.success, self._user_tag) \ No newline at end of file
diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pxd b/src/python/grpcio/grpc/_cython/cygrpc.pxd
index 6fc5638d5d..b32fa518fc 100644
--- a/src/python/grpcio/grpc/_cython/cygrpc.pxd
+++ b/src/python/grpcio/grpc/_cython/cygrpc.pxd
@@ -18,7 +18,10 @@ include "_cygrpc/call.pxd.pxi"
include "_cygrpc/channel.pxd.pxi"
include "_cygrpc/credentials.pxd.pxi"
include "_cygrpc/completion_queue.pxd.pxi"
+include "_cygrpc/event.pxd.pxi"
include "_cygrpc/metadata.pxd.pxi"
+include "_cygrpc/operation.pxd.pxi"
include "_cygrpc/records.pxd.pxi"
include "_cygrpc/security.pxd.pxi"
include "_cygrpc/server.pxd.pxi"
+include "_cygrpc/tag.pxd.pxi"
diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pyx b/src/python/grpcio/grpc/_cython/cygrpc.pyx
index d605229822..5106394708 100644
--- a/src/python/grpcio/grpc/_cython/cygrpc.pyx
+++ b/src/python/grpcio/grpc/_cython/cygrpc.pyx
@@ -25,10 +25,13 @@ include "_cygrpc/call.pyx.pxi"
include "_cygrpc/channel.pyx.pxi"
include "_cygrpc/credentials.pyx.pxi"
include "_cygrpc/completion_queue.pyx.pxi"
+include "_cygrpc/event.pyx.pxi"
include "_cygrpc/metadata.pyx.pxi"
+include "_cygrpc/operation.pyx.pxi"
include "_cygrpc/records.pyx.pxi"
include "_cygrpc/security.pyx.pxi"
include "_cygrpc/server.pyx.pxi"
+include "_cygrpc/tag.pyx.pxi"
#
# initialize gRPC
diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py
index 02d3af8706..22244b9cec 100644
--- a/src/python/grpcio/grpc/_server.py
+++ b/src/python/grpcio/grpc/_server.py
@@ -50,7 +50,7 @@ _UNEXPECTED_EXIT_SERVER_GRACE = 1.0
def _serialized_request(request_event):
- return request_event.batch_operations[0].received_message.bytes()
+ return request_event.batch_operations[0].message()
def _application_code(code):
@@ -130,13 +130,13 @@ def _abort(state, call, code, details):
effective_code = _abortion_code(state, code)
effective_details = details if state.details is None else state.details
if state.initial_metadata_allowed:
- operations = (cygrpc.operation_send_initial_metadata(
- (), _EMPTY_FLAGS), cygrpc.operation_send_status_from_server(
+ operations = (cygrpc.SendInitialMetadataOperation(
+ None, _EMPTY_FLAGS), cygrpc.SendStatusFromServerOperation(
state.trailing_metadata, effective_code, effective_details,
_EMPTY_FLAGS),)
token = _SEND_INITIAL_METADATA_AND_SEND_STATUS_FROM_SERVER_TOKEN
else:
- operations = (cygrpc.operation_send_status_from_server(
+ operations = (cygrpc.SendStatusFromServerOperation(
state.trailing_metadata, effective_code, effective_details,
_EMPTY_FLAGS),)
token = _SEND_STATUS_FROM_SERVER_TOKEN
@@ -150,8 +150,7 @@ def _receive_close_on_server(state):
def receive_close_on_server(receive_close_on_server_event):
with state.condition:
- if receive_close_on_server_event.batch_operations[
- 0].received_cancelled:
+ if receive_close_on_server_event.batch_operations[0].cancelled():
state.client = _CANCELLED
elif state.client is _OPEN:
state.client = _CLOSED
@@ -218,11 +217,10 @@ class _Context(grpc.ServicerContext):
def time_remaining(self):
return max(
- float(self._rpc_event.request_call_details.deadline) - time.time(),
- 0)
+ float(self._rpc_event.call_details.deadline) - time.time(), 0)
def cancel(self):
- self._rpc_event.operation_call.cancel()
+ self._rpc_event.call.cancel()
def add_callback(self, callback):
with self._state.condition:
@@ -237,23 +235,23 @@ class _Context(grpc.ServicerContext):
self._state.disable_next_compression = True
def invocation_metadata(self):
- return self._rpc_event.request_metadata
+ return self._rpc_event.invocation_metadata
def peer(self):
- return _common.decode(self._rpc_event.operation_call.peer())
+ return _common.decode(self._rpc_event.call.peer())
def peer_identities(self):
- return cygrpc.peer_identities(self._rpc_event.operation_call)
+ return cygrpc.peer_identities(self._rpc_event.call)
def peer_identity_key(self):
- id_key = cygrpc.peer_identity_key(self._rpc_event.operation_call)
+ id_key = cygrpc.peer_identity_key(self._rpc_event.call)
return id_key if id_key is None else _common.decode(id_key)
def auth_context(self):
return {
_common.decode(key): value
for key, value in six.iteritems(
- cygrpc.auth_context(self._rpc_event.operation_call))
+ cygrpc.auth_context(self._rpc_event.call))
}
def send_initial_metadata(self, initial_metadata):
@@ -262,9 +260,9 @@ class _Context(grpc.ServicerContext):
_raise_rpc_error(self._state)
else:
if self._state.initial_metadata_allowed:
- operation = cygrpc.operation_send_initial_metadata(
+ operation = cygrpc.SendInitialMetadataOperation(
initial_metadata, _EMPTY_FLAGS)
- self._rpc_event.operation_call.start_server_batch(
+ self._rpc_event.call.start_server_batch(
(operation,), _send_initial_metadata(self._state))
self._state.initial_metadata_allowed = False
self._state.due.add(_SEND_INITIAL_METADATA_TOKEN)
@@ -305,7 +303,7 @@ class _RequestIterator(object):
raise StopIteration()
else:
self._call.start_server_batch(
- (cygrpc.operation_receive_message(_EMPTY_FLAGS),),
+ (cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),),
_receive_message(self._state, self._call,
self._request_deserializer))
self._state.due.add(_RECEIVE_MESSAGE_TOKEN)
@@ -347,9 +345,9 @@ def _unary_request(rpc_event, state, request_deserializer):
if state.client is _CANCELLED or state.statused:
return None
else:
- rpc_event.operation_call.start_server_batch(
- (cygrpc.operation_receive_message(_EMPTY_FLAGS),),
- _receive_message(state, rpc_event.operation_call,
+ rpc_event.call.start_server_batch(
+ (cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),),
+ _receive_message(state, rpc_event.call,
request_deserializer))
state.due.add(_RECEIVE_MESSAGE_TOKEN)
while True:
@@ -357,8 +355,8 @@ def _unary_request(rpc_event, state, request_deserializer):
if state.request is None:
if state.client is _CLOSED:
details = '"{}" requires exactly one request message.'.format(
- rpc_event.request_call_details.method)
- _abort(state, rpc_event.operation_call,
+ rpc_event.call_details.method)
+ _abort(state, rpc_event.call,
cygrpc.StatusCode.unimplemented,
_common.encode(details))
return None
@@ -379,13 +377,13 @@ def _call_behavior(rpc_event, state, behavior, argument, request_deserializer):
except Exception as exception: # pylint: disable=broad-except
with state.condition:
if exception is state.abortion:
- _abort(state, rpc_event.operation_call,
- cygrpc.StatusCode.unknown, b'RPC Aborted')
+ _abort(state, rpc_event.call, cygrpc.StatusCode.unknown,
+ b'RPC Aborted')
elif exception not in state.rpc_errors:
details = 'Exception calling application: {}'.format(exception)
logging.exception(details)
- _abort(state, rpc_event.operation_call,
- cygrpc.StatusCode.unknown, _common.encode(details))
+ _abort(state, rpc_event.call, cygrpc.StatusCode.unknown,
+ _common.encode(details))
return None, False
@@ -397,13 +395,13 @@ def _take_response_from_response_iterator(rpc_event, state, response_iterator):
except Exception as exception: # pylint: disable=broad-except
with state.condition:
if exception is state.abortion:
- _abort(state, rpc_event.operation_call,
- cygrpc.StatusCode.unknown, b'RPC Aborted')
+ _abort(state, rpc_event.call, cygrpc.StatusCode.unknown,
+ b'RPC Aborted')
elif exception not in state.rpc_errors:
details = 'Exception iterating responses: {}'.format(exception)
logging.exception(details)
- _abort(state, rpc_event.operation_call,
- cygrpc.StatusCode.unknown, _common.encode(details))
+ _abort(state, rpc_event.call, cygrpc.StatusCode.unknown,
+ _common.encode(details))
return None, False
@@ -411,7 +409,7 @@ def _serialize_response(rpc_event, state, response, response_serializer):
serialized_response = _common.serialize(response, response_serializer)
if serialized_response is None:
with state.condition:
- _abort(state, rpc_event.operation_call, cygrpc.StatusCode.internal,
+ _abort(state, rpc_event.call, cygrpc.StatusCode.internal,
b'Failed to serialize response!')
return None
else:
@@ -424,17 +422,18 @@ def _send_response(rpc_event, state, serialized_response):
return False
else:
if state.initial_metadata_allowed:
- operations = (cygrpc.operation_send_initial_metadata(
- (), _EMPTY_FLAGS), cygrpc.operation_send_message(
- serialized_response, _EMPTY_FLAGS),)
+ operations = (cygrpc.SendInitialMetadataOperation(None,
+ _EMPTY_FLAGS),
+ cygrpc.SendMessageOperation(serialized_response,
+ _EMPTY_FLAGS),)
state.initial_metadata_allowed = False
token = _SEND_INITIAL_METADATA_AND_SEND_MESSAGE_TOKEN
else:
- operations = (cygrpc.operation_send_message(serialized_response,
- _EMPTY_FLAGS),)
+ operations = (cygrpc.SendMessageOperation(serialized_response,
+ _EMPTY_FLAGS),)
token = _SEND_MESSAGE_TOKEN
- rpc_event.operation_call.start_server_batch(
- operations, _send_message(state, token))
+ rpc_event.call.start_server_batch(operations,
+ _send_message(state, token))
state.due.add(token)
while True:
state.condition.wait()
@@ -448,17 +447,17 @@ def _status(rpc_event, state, serialized_response):
code = _completion_code(state)
details = _details(state)
operations = [
- cygrpc.operation_send_status_from_server(
+ cygrpc.SendStatusFromServerOperation(
state.trailing_metadata, code, details, _EMPTY_FLAGS),
]
if state.initial_metadata_allowed:
operations.append(
- cygrpc.operation_send_initial_metadata((), _EMPTY_FLAGS))
+ cygrpc.SendInitialMetadataOperation(None, _EMPTY_FLAGS))
if serialized_response is not None:
operations.append(
- cygrpc.operation_send_message(serialized_response,
- _EMPTY_FLAGS))
- rpc_event.operation_call.start_server_batch(
+ cygrpc.SendMessageOperation(serialized_response,
+ _EMPTY_FLAGS))
+ rpc_event.call.start_server_batch(
operations,
_send_status_from_server(state, _SEND_STATUS_FROM_SERVER_TOKEN))
state.statused = True
@@ -525,7 +524,7 @@ def _handle_unary_stream(rpc_event, state, method_handler, thread_pool):
def _handle_stream_unary(rpc_event, state, method_handler, thread_pool):
- request_iterator = _RequestIterator(state, rpc_event.operation_call,
+ request_iterator = _RequestIterator(state, rpc_event.call,
method_handler.request_deserializer)
return thread_pool.submit(
_unary_response_in_pool, rpc_event, state, method_handler.stream_unary,
@@ -534,7 +533,7 @@ def _handle_stream_unary(rpc_event, state, method_handler, thread_pool):
def _handle_stream_stream(rpc_event, state, method_handler, thread_pool):
- request_iterator = _RequestIterator(state, rpc_event.operation_call,
+ request_iterator = _RequestIterator(state, rpc_event.call,
method_handler.request_deserializer)
return thread_pool.submit(
_stream_response_in_pool, rpc_event, state,
@@ -552,8 +551,8 @@ def _find_method_handler(rpc_event, generic_handlers, interceptor_pipeline):
return None
handler_call_details = _HandlerCallDetails(
- _common.decode(rpc_event.request_call_details.method),
- rpc_event.request_metadata)
+ _common.decode(rpc_event.call_details.method),
+ rpc_event.invocation_metadata)
if interceptor_pipeline is not None:
return interceptor_pipeline.execute(query_handlers,
@@ -563,21 +562,21 @@ def _find_method_handler(rpc_event, generic_handlers, interceptor_pipeline):
def _reject_rpc(rpc_event, status, details):
- operations = (cygrpc.operation_send_initial_metadata((), _EMPTY_FLAGS),
- cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS),
- cygrpc.operation_send_status_from_server((), status, details,
- _EMPTY_FLAGS),)
+ operations = (cygrpc.SendInitialMetadataOperation(None, _EMPTY_FLAGS),
+ cygrpc.ReceiveCloseOnServerOperation(_EMPTY_FLAGS),
+ cygrpc.SendStatusFromServerOperation(None, status, details,
+ _EMPTY_FLAGS),)
rpc_state = _RPCState()
- rpc_event.operation_call.start_server_batch(
- operations, lambda ignored_event: (rpc_state, (),))
+ rpc_event.call.start_server_batch(operations,
+ lambda ignored_event: (rpc_state, (),))
return rpc_state
def _handle_with_method_handler(rpc_event, method_handler, thread_pool):
state = _RPCState()
with state.condition:
- rpc_event.operation_call.start_server_batch(
- (cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS),),
+ rpc_event.call.start_server_batch(
+ (cygrpc.ReceiveCloseOnServerOperation(_EMPTY_FLAGS),),
_receive_close_on_server(state))
state.due.add(_RECEIVE_CLOSE_ON_SERVER_TOKEN)
if method_handler.request_streaming:
@@ -600,7 +599,7 @@ def _handle_call(rpc_event, generic_handlers, interceptor_pipeline, thread_pool,
concurrency_exceeded):
if not rpc_event.success:
return None, None
- if rpc_event.request_call_details.method is not None:
+ if rpc_event.call_details.method is not None:
try:
method_handler = _find_method_handler(rpc_event, generic_handlers,
interceptor_pipeline)
diff --git a/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py b/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py
index ac31e72409..3cbbb8de33 100644
--- a/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py
+++ b/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py
@@ -16,12 +16,11 @@
import unittest
import grpc
-from grpc.framework.foundation import logging_pool
from grpc_health.v1 import health
from grpc_health.v1 import health_pb2
from grpc_health.v1 import health_pb2_grpc
-from tests.unit.framework.common import test_constants
+from tests.unit import test_common
class HealthServicerTest(unittest.TestCase):
@@ -35,8 +34,7 @@ class HealthServicerTest(unittest.TestCase):
health_pb2.HealthCheckResponse.UNKNOWN)
servicer.set('grpc.test.TestServiceNotServing',
health_pb2.HealthCheckResponse.NOT_SERVING)
- server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
- self._server = grpc.server(server_pool)
+ self._server = test_common.test_server()
port = self._server.add_insecure_port('[::]:0')
health_pb2_grpc.add_HealthServicer_to_server(servicer, self._server)
self._server.start()
diff --git a/src/python/grpcio_tests/tests/interop/_insecure_intraop_test.py b/src/python/grpcio_tests/tests/interop/_insecure_intraop_test.py
index 4136739f05..8d464b2d4b 100644
--- a/src/python/grpcio_tests/tests/interop/_insecure_intraop_test.py
+++ b/src/python/grpcio_tests/tests/interop/_insecure_intraop_test.py
@@ -13,7 +13,6 @@
# limitations under the License.
"""Insecure client-server interoperability as a unit test."""
-from concurrent import futures
import unittest
import grpc
@@ -22,13 +21,14 @@ from src.proto.grpc.testing import test_pb2_grpc
from tests.interop import _intraop_test_case
from tests.interop import methods
from tests.interop import server
+from tests.unit import test_common
class InsecureIntraopTest(_intraop_test_case.IntraopTestCase,
unittest.TestCase):
def setUp(self):
- self.server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
+ self.server = test_common.test_server()
test_pb2_grpc.add_TestServiceServicer_to_server(methods.TestService(),
self.server)
port = self.server.add_insecure_port('[::]:0')
diff --git a/src/python/grpcio_tests/tests/interop/_secure_intraop_test.py b/src/python/grpcio_tests/tests/interop/_secure_intraop_test.py
index 6514d77371..6ce8b3715b 100644
--- a/src/python/grpcio_tests/tests/interop/_secure_intraop_test.py
+++ b/src/python/grpcio_tests/tests/interop/_secure_intraop_test.py
@@ -13,7 +13,6 @@
# limitations under the License.
"""Secure client-server interoperability as a unit test."""
-from concurrent import futures
import unittest
import grpc
@@ -22,6 +21,7 @@ from src.proto.grpc.testing import test_pb2_grpc
from tests.interop import _intraop_test_case
from tests.interop import methods
from tests.interop import resources
+from tests.unit import test_common
_SERVER_HOST_OVERRIDE = 'foo.test.google.fr'
@@ -29,7 +29,7 @@ _SERVER_HOST_OVERRIDE = 'foo.test.google.fr'
class SecureIntraopTest(_intraop_test_case.IntraopTestCase, unittest.TestCase):
def setUp(self):
- self.server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
+ self.server = test_common.test_server()
test_pb2_grpc.add_TestServiceServicer_to_server(methods.TestService(),
self.server)
port = self.server.add_secure_port(
diff --git a/src/python/grpcio_tests/tests/interop/server.py b/src/python/grpcio_tests/tests/interop/server.py
index eeb41a21d2..dd4f5146e9 100644
--- a/src/python/grpcio_tests/tests/interop/server.py
+++ b/src/python/grpcio_tests/tests/interop/server.py
@@ -23,6 +23,7 @@ from src.proto.grpc.testing import test_pb2_grpc
from tests.interop import methods
from tests.interop import resources
+from tests.unit import test_common
_ONE_DAY_IN_SECONDS = 60 * 60 * 24
@@ -38,7 +39,7 @@ def serve():
help='require a secure connection')
args = parser.parse_args()
- server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
+ server = test_common.test_server()
test_pb2_grpc.add_TestServiceServicer_to_server(methods.TestService(),
server)
if args.use_tls:
diff --git a/src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py b/src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py
index 5b84001aab..8fc539e641 100644
--- a/src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py
+++ b/src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py
@@ -13,7 +13,6 @@
# limitations under the License.
import collections
-from concurrent import futures
import contextlib
import distutils.spawn
import errno
@@ -28,6 +27,7 @@ import unittest
from six import moves
import grpc
+from tests.unit import test_common
from tests.unit.framework.common import test_constants
import tests.protoc_plugin.protos.payload.test_payload_pb2 as payload_pb2
@@ -155,8 +155,7 @@ def _CreateService():
def HalfDuplexCall(self, request_iter, context):
return servicer_methods.HalfDuplexCall(request_iter, context)
- server = grpc.server(
- futures.ThreadPoolExecutor(max_workers=test_constants.POOL_SIZE))
+ server = test_common.test_server()
getattr(service_pb2_grpc, ADD_SERVICER_TO_SERVER_IDENTIFIER)(Servicer(),
server)
port = server.add_insecure_port('[::]:0')
@@ -177,8 +176,7 @@ def _CreateIncompleteService():
class Servicer(getattr(service_pb2_grpc, SERVICER_IDENTIFIER)):
pass
- server = grpc.server(
- futures.ThreadPoolExecutor(max_workers=test_constants.POOL_SIZE))
+ server = test_common.test_server()
getattr(service_pb2_grpc, ADD_SERVICER_TO_SERVER_IDENTIFIER)(Servicer(),
server)
port = server.add_insecure_port('[::]:0')
diff --git a/src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py b/src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py
index 7868cdbfb3..c732e55108 100644
--- a/src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py
+++ b/src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py
@@ -13,7 +13,6 @@
# limitations under the License.
import abc
-from concurrent import futures
import contextlib
import importlib
import os
@@ -29,7 +28,7 @@ import six
import grpc
from grpc_tools import protoc
-from tests.unit.framework.common import test_constants
+from tests.unit import test_common
_MESSAGES_IMPORT = b'import "messages.proto";'
_SPLIT_NAMESPACE = b'package grpc_protoc_plugin.invocation_testing.split;'
@@ -256,9 +255,7 @@ class _Test(six.with_metaclass(abc.ABCMeta, unittest.TestCase)):
self._protoc()
for services_module in self._services_modules():
- server = grpc.server(
- futures.ThreadPoolExecutor(
- max_workers=test_constants.POOL_SIZE))
+ server = test_common.test_server()
services_module.add_TestServiceServicer_to_server(
_Servicer(self._messages_pb2.Response), server)
port = server.add_insecure_port('[::]:0')
diff --git a/src/python/grpcio_tests/tests/qps/qps_worker.py b/src/python/grpcio_tests/tests/qps/qps_worker.py
index 3e46c0b8c2..54f69db109 100644
--- a/src/python/grpcio_tests/tests/qps/qps_worker.py
+++ b/src/python/grpcio_tests/tests/qps/qps_worker.py
@@ -16,15 +16,15 @@
import argparse
import time
-from concurrent import futures
import grpc
from src.proto.grpc.testing import services_pb2_grpc
from tests.qps import worker_server
+from tests.unit import test_common
def run_worker_server(port):
- server = grpc.server(futures.ThreadPoolExecutor(max_workers=5))
+ server = test_common.test_server()
servicer = worker_server.WorkerServer()
services_pb2_grpc.add_WorkerServiceServicer_to_server(servicer, server)
server.add_insecure_port('[::]:{}'.format(port))
diff --git a/src/python/grpcio_tests/tests/qps/worker_server.py b/src/python/grpcio_tests/tests/qps/worker_server.py
index adb10cbcec..fef4fb0459 100644
--- a/src/python/grpcio_tests/tests/qps/worker_server.py
+++ b/src/python/grpcio_tests/tests/qps/worker_server.py
@@ -28,6 +28,7 @@ from tests.qps import benchmark_server
from tests.qps import client_runner
from tests.qps import histogram
from tests.unit import resources
+from tests.unit import test_common
class WorkerServer(services_pb2_grpc.WorkerServiceServicer):
@@ -68,8 +69,7 @@ class WorkerServer(services_pb2_grpc.WorkerServiceServicer):
server_threads = multiprocessing.cpu_count() * 5
else:
server_threads = config.async_server_threads
- server = grpc.server(
- futures.ThreadPoolExecutor(max_workers=server_threads))
+ server = test_common.test_server(max_workers=server_threads)
if config.server_type == control_pb2.ASYNC_SERVER:
servicer = benchmark_server.BenchmarkServer()
services_pb2_grpc.add_BenchmarkServiceServicer_to_server(servicer,
diff --git a/src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py b/src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py
index a86743fa5a..86037e258a 100644
--- a/src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py
+++ b/src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py
@@ -16,7 +16,6 @@
import unittest
import grpc
-from grpc.framework.foundation import logging_pool
from grpc_reflection.v1alpha import reflection
from grpc_reflection.v1alpha import reflection_pb2
from grpc_reflection.v1alpha import reflection_pb2_grpc
@@ -27,7 +26,7 @@ from google.protobuf import descriptor_pb2
from src.proto.grpc.testing import empty_pb2
from src.proto.grpc.testing.proto2 import empty2_extensions_pb2
-from tests.unit.framework.common import test_constants
+from tests.unit import test_common
_EMPTY_PROTO_FILE_NAME = 'src/proto/grpc/testing/empty.proto'
_EMPTY_PROTO_SYMBOL_NAME = 'grpc.testing.Empty'
@@ -46,8 +45,7 @@ def _file_descriptor_to_proto(descriptor):
class ReflectionServicerTest(unittest.TestCase):
def setUp(self):
- server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
- self._server = grpc.server(server_pool)
+ self._server = test_common.test_server()
reflection.enable_server_reflection(_SERVICE_NAMES, self._server)
port = self._server.add_insecure_port('[::]:0')
self._server.start()
diff --git a/src/python/grpcio_tests/tests/tests.json b/src/python/grpcio_tests/tests/tests.json
index 3bf5308749..e033c1063f 100644
--- a/src/python/grpcio_tests/tests/tests.json
+++ b/src/python/grpcio_tests/tests/tests.json
@@ -34,6 +34,7 @@
"unit._cython._no_messages_server_completion_queue_per_call_test.Test",
"unit._cython._no_messages_single_server_completion_queue_test.Test",
"unit._cython._read_some_but_not_all_responses_test.ReadSomeButNotAllResponsesTest",
+ "unit._cython._server_test.Test",
"unit._cython.cygrpc_test.InsecureServerInsecureClient",
"unit._cython.cygrpc_test.SecureServerSecureClient",
"unit._cython.cygrpc_test.TypeSmokeTest",
diff --git a/src/python/grpcio_tests/tests/unit/_auth_context_test.py b/src/python/grpcio_tests/tests/unit/_auth_context_test.py
index c6a0a23549..ebc04a71e0 100644
--- a/src/python/grpcio_tests/tests/unit/_auth_context_test.py
+++ b/src/python/grpcio_tests/tests/unit/_auth_context_test.py
@@ -18,11 +18,9 @@ import unittest
import grpc
from grpc import _channel
-from grpc.framework.foundation import logging_pool
import six
from tests.unit import test_common
-from tests.unit.framework.common import test_constants
from tests.unit import resources
_REQUEST = b'\x00\x00\x00'
@@ -55,12 +53,12 @@ def handle_unary_unary(request, servicer_context):
class AuthContextTest(unittest.TestCase):
def testInsecure(self):
- server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
handler = grpc.method_handlers_generic_handler('test', {
'UnaryUnary':
grpc.unary_unary_rpc_method_handler(handle_unary_unary)
})
- server = grpc.server(server_pool, (handler,))
+ server = test_common.test_server()
+ server.add_generic_rpc_handlers((handler,))
port = server.add_insecure_port('[::]:0')
server.start()
@@ -74,12 +72,12 @@ class AuthContextTest(unittest.TestCase):
self.assertDictEqual({}, auth_data[_AUTH_CTX])
def testSecureNoCert(self):
- server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
handler = grpc.method_handlers_generic_handler('test', {
'UnaryUnary':
grpc.unary_unary_rpc_method_handler(handle_unary_unary)
})
- server = grpc.server(server_pool, (handler,))
+ server = test_common.test_server()
+ server.add_generic_rpc_handlers((handler,))
server_cred = grpc.ssl_server_credentials(_SERVER_CERTS)
port = server.add_secure_port('[::]:0', server_cred)
server.start()
@@ -101,12 +99,12 @@ class AuthContextTest(unittest.TestCase):
}, auth_data[_AUTH_CTX])
def testSecureClientCert(self):
- server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
handler = grpc.method_handlers_generic_handler('test', {
'UnaryUnary':
grpc.unary_unary_rpc_method_handler(handle_unary_unary)
})
- server = grpc.server(server_pool, (handler,))
+ server = test_common.test_server()
+ server.add_generic_rpc_handlers((handler,))
server_cred = grpc.ssl_server_credentials(
_SERVER_CERTS,
root_certificates=_TEST_ROOT_CERTIFICATES,
diff --git a/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py b/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py
index f8c61270ca..f9eb0011dc 100644
--- a/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py
+++ b/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py
@@ -83,7 +83,7 @@ class ChannelConnectivityTest(unittest.TestCase):
def test_immediately_connectable_channel_connectivity(self):
thread_pool = _thread_pool.RecordingThreadPool(max_workers=None)
- server = grpc.server(thread_pool)
+ server = grpc.server(thread_pool, options=(('grpc.so_reuseport', 0),))
port = server.add_insecure_port('[::]:0')
server.start()
first_callback = _Callback()
@@ -125,7 +125,7 @@ class ChannelConnectivityTest(unittest.TestCase):
def test_reachable_then_unreachable_channel_connectivity(self):
thread_pool = _thread_pool.RecordingThreadPool(max_workers=None)
- server = grpc.server(thread_pool)
+ server = grpc.server(thread_pool, options=(('grpc.so_reuseport', 0),))
port = server.add_insecure_port('[::]:0')
server.start()
callback = _Callback()
diff --git a/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py b/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py
index bdd2d86169..30b486079c 100644
--- a/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py
+++ b/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py
@@ -61,7 +61,7 @@ class ChannelReadyFutureTest(unittest.TestCase):
def test_immediately_connectable_channel_connectivity(self):
thread_pool = _thread_pool.RecordingThreadPool(max_workers=None)
- server = grpc.server(thread_pool)
+ server = grpc.server(thread_pool, options=(('grpc.so_reuseport', 0),))
port = server.add_insecure_port('[::]:0')
server.start()
channel = grpc.insecure_channel('localhost:{}'.format(port))
diff --git a/src/python/grpcio_tests/tests/unit/_compression_test.py b/src/python/grpcio_tests/tests/unit/_compression_test.py
index e576a5aca9..93e599d8f8 100644
--- a/src/python/grpcio_tests/tests/unit/_compression_test.py
+++ b/src/python/grpcio_tests/tests/unit/_compression_test.py
@@ -17,7 +17,6 @@ import unittest
import grpc
from grpc import _grpcio_metadata
-from grpc.framework.foundation import logging_pool
from tests.unit import test_common
from tests.unit.framework.common import test_constants
@@ -72,9 +71,8 @@ class _GenericHandler(grpc.GenericRpcHandler):
class CompressionTest(unittest.TestCase):
def setUp(self):
- self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
- self._server = grpc.server(
- self._server_pool, handlers=(_GenericHandler(),))
+ self._server = test_common.test_server()
+ self._server.add_generic_rpc_handlers((_GenericHandler(),))
self._port = self._server.add_insecure_port('[::]:0')
self._server.start()
diff --git a/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py b/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py
index a8a7175cc7..cdb3572453 100644
--- a/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py
+++ b/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py
@@ -53,7 +53,7 @@ class _Handler(object):
self._state = state
self._lock = threading.Lock()
self._completion_queue = completion_queue
- self._call = rpc_event.operation_call
+ self._call = rpc_event.call
def __call__(self):
with self._state.condition:
@@ -65,10 +65,10 @@ class _Handler(object):
with self._lock:
self._call.start_server_batch(
- (cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS),),
+ (cygrpc.ReceiveCloseOnServerOperation(_EMPTY_FLAGS),),
_RECEIVE_CLOSE_ON_SERVER_TAG)
self._call.start_server_batch(
- (cygrpc.operation_receive_message(_EMPTY_FLAGS),),
+ (cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),),
_RECEIVE_MESSAGE_TAG)
first_event = self._completion_queue.poll()
if _is_cancellation_event(first_event):
@@ -76,10 +76,10 @@ class _Handler(object):
else:
with self._lock:
operations = (
- cygrpc.operation_send_initial_metadata(_EMPTY_METADATA,
- _EMPTY_FLAGS),
- cygrpc.operation_send_message(b'\x79\x57', _EMPTY_FLAGS),
- cygrpc.operation_send_status_from_server(
+ cygrpc.SendInitialMetadataOperation(_EMPTY_METADATA,
+ _EMPTY_FLAGS),
+ cygrpc.SendMessageOperation(b'\x79\x57', _EMPTY_FLAGS),
+ cygrpc.SendStatusFromServerOperation(
_EMPTY_METADATA, cygrpc.StatusCode.ok, b'test details!',
_EMPTY_FLAGS),)
self._call.start_server_batch(operations,
@@ -141,7 +141,8 @@ class CancelManyCallsTest(unittest.TestCase):
test_constants.THREAD_CONCURRENCY)
server_completion_queue = cygrpc.CompletionQueue()
- server = cygrpc.Server(cygrpc.ChannelArgs([]))
+ server = cygrpc.Server(
+ cygrpc.ChannelArgs([cygrpc.ChannelArg(b'grpc.so_reuseport', 0)]))
server.register_completion_queue(server_completion_queue)
port = server.add_http2_port(b'[::]:0')
server.start()
@@ -169,13 +170,13 @@ class CancelManyCallsTest(unittest.TestCase):
None, _EMPTY_FLAGS, client_completion_queue, b'/twinkies',
None, _INFINITE_FUTURE)
operations = (
- cygrpc.operation_send_initial_metadata(_EMPTY_METADATA,
- _EMPTY_FLAGS),
- cygrpc.operation_send_message(b'\x45\x56', _EMPTY_FLAGS),
- cygrpc.operation_send_close_from_client(_EMPTY_FLAGS),
- cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),
- cygrpc.operation_receive_message(_EMPTY_FLAGS),
- cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),)
+ cygrpc.SendInitialMetadataOperation(_EMPTY_METADATA,
+ _EMPTY_FLAGS),
+ cygrpc.SendMessageOperation(b'\x45\x56', _EMPTY_FLAGS),
+ cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),)
tag = 'client_complete_call_{0:04d}_tag'.format(index)
client_call.start_client_batch(operations, tag)
client_due.add(tag)
diff --git a/src/python/grpcio_tests/tests/unit/_cython/_common.py b/src/python/grpcio_tests/tests/unit/_cython/_common.py
index 96f0f1589b..c5acd36bf2 100644
--- a/src/python/grpcio_tests/tests/unit/_cython/_common.py
+++ b/src/python/grpcio_tests/tests/unit/_cython/_common.py
@@ -88,7 +88,8 @@ class RpcTest(object):
def setUp(self):
self.server_completion_queue = cygrpc.CompletionQueue()
- self.server = cygrpc.Server(cygrpc.ChannelArgs([]))
+ self.server = cygrpc.Server(
+ cygrpc.ChannelArgs([cygrpc.ChannelArg(b'grpc.so_reuseport', 0)]))
self.server.register_completion_queue(self.server_completion_queue)
port = self.server.add_http2_port(b'[::]:0')
self.server.start()
diff --git a/src/python/grpcio_tests/tests/unit/_cython/_no_messages_server_completion_queue_per_call_test.py b/src/python/grpcio_tests/tests/unit/_cython/_no_messages_server_completion_queue_per_call_test.py
index d08003af44..583136cf23 100644
--- a/src/python/grpcio_tests/tests/unit/_cython/_no_messages_server_completion_queue_per_call_test.py
+++ b/src/python/grpcio_tests/tests/unit/_cython/_no_messages_server_completion_queue_per_call_test.py
@@ -49,18 +49,19 @@ class Test(_common.RpcTest, unittest.TestCase):
with self.client_condition:
client_receive_initial_metadata_start_batch_result = (
client_call.start_client_batch([
- cygrpc.operation_receive_initial_metadata(
- _common.EMPTY_FLAGS),
+ cygrpc.ReceiveInitialMetadataOperation(_common.EMPTY_FLAGS),
], client_receive_initial_metadata_tag))
+ self.assertEqual(cygrpc.CallError.ok,
+ client_receive_initial_metadata_start_batch_result)
client_complete_rpc_start_batch_result = client_call.start_client_batch(
[
- cygrpc.operation_send_initial_metadata(
+ cygrpc.SendInitialMetadataOperation(
_common.INVOCATION_METADATA, _common.EMPTY_FLAGS),
- cygrpc.operation_send_close_from_client(
- _common.EMPTY_FLAGS),
- cygrpc.operation_receive_status_on_client(
- _common.EMPTY_FLAGS),
+ cygrpc.SendCloseFromClientOperation(_common.EMPTY_FLAGS),
+ cygrpc.ReceiveStatusOnClientOperation(_common.EMPTY_FLAGS),
], client_complete_rpc_tag)
+ self.assertEqual(cygrpc.CallError.ok,
+ client_complete_rpc_start_batch_result)
self.client_driver.add_due({
client_receive_initial_metadata_tag,
client_complete_rpc_tag,
@@ -71,8 +72,8 @@ class Test(_common.RpcTest, unittest.TestCase):
with server_call_condition:
server_send_initial_metadata_start_batch_result = (
- server_request_call_event.operation_call.start_server_batch([
- cygrpc.operation_send_initial_metadata(
+ server_request_call_event.call.start_server_batch([
+ cygrpc.SendInitialMetadataOperation(
_common.INITIAL_METADATA, _common.EMPTY_FLAGS),
], server_send_initial_metadata_tag))
server_call_driver.add_due({
@@ -83,10 +84,9 @@ class Test(_common.RpcTest, unittest.TestCase):
with server_call_condition:
server_complete_rpc_start_batch_result = (
- server_request_call_event.operation_call.start_server_batch([
- cygrpc.operation_receive_close_on_server(
- _common.EMPTY_FLAGS),
- cygrpc.operation_send_status_from_server(
+ server_request_call_event.call.start_server_batch([
+ cygrpc.ReceiveCloseOnServerOperation(_common.EMPTY_FLAGS),
+ cygrpc.SendStatusFromServerOperation(
_common.TRAILING_METADATA, cygrpc.StatusCode.ok,
b'test details', _common.EMPTY_FLAGS),
], server_complete_rpc_tag))
@@ -101,23 +101,24 @@ class Test(_common.RpcTest, unittest.TestCase):
client_complete_rpc_event = self.client_driver.event_with_tag(
client_complete_rpc_tag)
- return (_common.OperationResult(server_request_call_start_batch_result,
- server_request_call_event.type,
- server_request_call_event.success),
+ return (_common.OperationResult(
+ server_request_call_start_batch_result,
+ server_request_call_event.completion_type,
+ server_request_call_event.success), _common.OperationResult(
+ client_receive_initial_metadata_start_batch_result,
+ client_receive_initial_metadata_event.completion_type,
+ client_receive_initial_metadata_event.success),
_common.OperationResult(
- client_receive_initial_metadata_start_batch_result,
- client_receive_initial_metadata_event.type,
- client_receive_initial_metadata_event.success),
- _common.OperationResult(client_complete_rpc_start_batch_result,
- client_complete_rpc_event.type,
- client_complete_rpc_event.success),
+ client_complete_rpc_start_batch_result,
+ client_complete_rpc_event.completion_type,
+ client_complete_rpc_event.success), _common.OperationResult(
+ server_send_initial_metadata_start_batch_result,
+ server_send_initial_metadata_event.completion_type,
+ server_send_initial_metadata_event.success),
_common.OperationResult(
- server_send_initial_metadata_start_batch_result,
- server_send_initial_metadata_event.type,
- server_send_initial_metadata_event.success),
- _common.OperationResult(server_complete_rpc_start_batch_result,
- server_complete_rpc_event.type,
- server_complete_rpc_event.success),)
+ server_complete_rpc_start_batch_result,
+ server_complete_rpc_event.completion_type,
+ server_complete_rpc_event.success),)
def test_rpcs(self):
expecteds = [(_common.SUCCESSFUL_OPERATION_RESULT,) *
diff --git a/src/python/grpcio_tests/tests/unit/_cython/_no_messages_single_server_completion_queue_test.py b/src/python/grpcio_tests/tests/unit/_cython/_no_messages_single_server_completion_queue_test.py
index d0166a2b29..c5cf606c90 100644
--- a/src/python/grpcio_tests/tests/unit/_cython/_no_messages_single_server_completion_queue_test.py
+++ b/src/python/grpcio_tests/tests/unit/_cython/_no_messages_single_server_completion_queue_test.py
@@ -44,17 +44,14 @@ class Test(_common.RpcTest, unittest.TestCase):
with self.client_condition:
client_receive_initial_metadata_start_batch_result = (
client_call.start_client_batch([
- cygrpc.operation_receive_initial_metadata(
- _common.EMPTY_FLAGS),
+ cygrpc.ReceiveInitialMetadataOperation(_common.EMPTY_FLAGS),
], client_receive_initial_metadata_tag))
client_complete_rpc_start_batch_result = client_call.start_client_batch(
[
- cygrpc.operation_send_initial_metadata(
+ cygrpc.SendInitialMetadataOperation(
_common.INVOCATION_METADATA, _common.EMPTY_FLAGS),
- cygrpc.operation_send_close_from_client(
- _common.EMPTY_FLAGS),
- cygrpc.operation_receive_status_on_client(
- _common.EMPTY_FLAGS),
+ cygrpc.SendCloseFromClientOperation(_common.EMPTY_FLAGS),
+ cygrpc.ReceiveStatusOnClientOperation(_common.EMPTY_FLAGS),
], client_complete_rpc_tag)
self.client_driver.add_due({
client_receive_initial_metadata_tag,
@@ -66,8 +63,8 @@ class Test(_common.RpcTest, unittest.TestCase):
with self.server_condition:
server_send_initial_metadata_start_batch_result = (
- server_request_call_event.operation_call.start_server_batch([
- cygrpc.operation_send_initial_metadata(
+ server_request_call_event.call.start_server_batch([
+ cygrpc.SendInitialMetadataOperation(
_common.INITIAL_METADATA, _common.EMPTY_FLAGS),
], server_send_initial_metadata_tag))
self.server_driver.add_due({
@@ -78,12 +75,11 @@ class Test(_common.RpcTest, unittest.TestCase):
with self.server_condition:
server_complete_rpc_start_batch_result = (
- server_request_call_event.operation_call.start_server_batch([
- cygrpc.operation_receive_close_on_server(
- _common.EMPTY_FLAGS),
- cygrpc.operation_send_status_from_server(
+ server_request_call_event.call.start_server_batch([
+ cygrpc.ReceiveCloseOnServerOperation(_common.EMPTY_FLAGS),
+ cygrpc.SendStatusFromServerOperation(
_common.TRAILING_METADATA, cygrpc.StatusCode.ok,
- b'test details', _common.EMPTY_FLAGS),
+ 'test details', _common.EMPTY_FLAGS),
], server_complete_rpc_tag))
self.server_driver.add_due({
server_complete_rpc_tag,
@@ -96,23 +92,24 @@ class Test(_common.RpcTest, unittest.TestCase):
client_complete_rpc_event = self.client_driver.event_with_tag(
client_complete_rpc_tag)
- return (_common.OperationResult(server_request_call_start_batch_result,
- server_request_call_event.type,
- server_request_call_event.success),
+ return (_common.OperationResult(
+ server_request_call_start_batch_result,
+ server_request_call_event.completion_type,
+ server_request_call_event.success), _common.OperationResult(
+ client_receive_initial_metadata_start_batch_result,
+ client_receive_initial_metadata_event.completion_type,
+ client_receive_initial_metadata_event.success),
_common.OperationResult(
- client_receive_initial_metadata_start_batch_result,
- client_receive_initial_metadata_event.type,
- client_receive_initial_metadata_event.success),
- _common.OperationResult(client_complete_rpc_start_batch_result,
- client_complete_rpc_event.type,
- client_complete_rpc_event.success),
+ client_complete_rpc_start_batch_result,
+ client_complete_rpc_event.completion_type,
+ client_complete_rpc_event.success), _common.OperationResult(
+ server_send_initial_metadata_start_batch_result,
+ server_send_initial_metadata_event.completion_type,
+ server_send_initial_metadata_event.success),
_common.OperationResult(
- server_send_initial_metadata_start_batch_result,
- server_send_initial_metadata_event.type,
- server_send_initial_metadata_event.success),
- _common.OperationResult(server_complete_rpc_start_batch_result,
- server_complete_rpc_event.type,
- server_complete_rpc_event.success),)
+ server_complete_rpc_start_batch_result,
+ server_complete_rpc_event.completion_type,
+ server_complete_rpc_event.success),)
def test_rpcs(self):
expecteds = [(_common.SUCCESSFUL_OPERATION_RESULT,) *
diff --git a/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py b/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py
index 1deb15ba03..a5ec54ee59 100644
--- a/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py
+++ b/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py
@@ -112,7 +112,8 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase):
def testReadSomeButNotAllResponses(self):
server_completion_queue = cygrpc.CompletionQueue()
- server = cygrpc.Server(cygrpc.ChannelArgs([]))
+ server = cygrpc.Server(
+ cygrpc.ChannelArgs([cygrpc.ChannelArg(b'grpc.so_reuseport', 0)]))
server.register_completion_queue(server_completion_queue)
port = server.add_http2_port(b'[::]:0')
server.start()
@@ -158,15 +159,15 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase):
with client_condition:
client_receive_initial_metadata_start_batch_result = (
client_call.start_client_batch([
- cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),
+ cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),
], client_receive_initial_metadata_tag))
client_due.add(client_receive_initial_metadata_tag)
client_complete_rpc_start_batch_result = (
client_call.start_client_batch([
- cygrpc.operation_send_initial_metadata(_EMPTY_METADATA,
- _EMPTY_FLAGS),
- cygrpc.operation_send_close_from_client(_EMPTY_FLAGS),
- cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),
+ cygrpc.SendInitialMetadataOperation(_EMPTY_METADATA,
+ _EMPTY_FLAGS),
+ cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),
], client_complete_rpc_tag))
client_due.add(client_complete_rpc_tag)
@@ -174,13 +175,13 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase):
with server_call_condition:
server_send_initial_metadata_start_batch_result = (
- server_rpc_event.operation_call.start_server_batch([
- cygrpc.operation_send_initial_metadata(_EMPTY_METADATA,
- _EMPTY_FLAGS),
+ server_rpc_event.call.start_server_batch([
+ cygrpc.SendInitialMetadataOperation(_EMPTY_METADATA,
+ _EMPTY_FLAGS),
], server_send_initial_metadata_tag))
server_send_first_message_start_batch_result = (
- server_rpc_event.operation_call.start_server_batch([
- cygrpc.operation_send_message(b'\x07', _EMPTY_FLAGS),
+ server_rpc_event.call.start_server_batch([
+ cygrpc.SendMessageOperation(b'\x07', _EMPTY_FLAGS),
], server_send_first_message_tag))
server_send_initial_metadata_event = server_call_driver.event_with_tag(
server_send_initial_metadata_tag)
@@ -188,13 +189,13 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase):
server_send_first_message_tag)
with server_call_condition:
server_send_second_message_start_batch_result = (
- server_rpc_event.operation_call.start_server_batch([
- cygrpc.operation_send_message(b'\x07', _EMPTY_FLAGS),
+ server_rpc_event.call.start_server_batch([
+ cygrpc.SendMessageOperation(b'\x07', _EMPTY_FLAGS),
], server_send_second_message_tag))
server_complete_rpc_start_batch_result = (
- server_rpc_event.operation_call.start_server_batch([
- cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS),
- cygrpc.operation_send_status_from_server(
+ server_rpc_event.call.start_server_batch([
+ cygrpc.ReceiveCloseOnServerOperation(_EMPTY_FLAGS),
+ cygrpc.SendStatusFromServerOperation(
(), cygrpc.StatusCode.ok, b'test details',
_EMPTY_FLAGS),
], server_complete_rpc_tag))
@@ -208,7 +209,7 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase):
client_receive_first_message_tag = 'client_receive_first_message_tag'
client_receive_first_message_start_batch_result = (
client_call.start_client_batch([
- cygrpc.operation_receive_message(_EMPTY_FLAGS),
+ cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),
], client_receive_first_message_tag))
client_due.add(client_receive_first_message_tag)
client_receive_first_message_event = client_driver.event_with_tag(
@@ -231,9 +232,8 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase):
self.assertEqual(cygrpc.CallError.ok, client_call_cancel_result)
self.assertIs(server_rpc_tag, server_rpc_event.tag)
self.assertEqual(cygrpc.CompletionType.operation_complete,
- server_rpc_event.type)
- self.assertIsInstance(server_rpc_event.operation_call, cygrpc.Call)
- self.assertEqual(0, len(server_rpc_event.batch_operations))
+ server_rpc_event.completion_type)
+ self.assertIsInstance(server_rpc_event.call, cygrpc.Call)
if __name__ == '__main__':
diff --git a/src/python/grpcio_tests/tests/unit/_cython/_server_test.py b/src/python/grpcio_tests/tests/unit/_cython/_server_test.py
new file mode 100644
index 0000000000..12bf40be6b
--- /dev/null
+++ b/src/python/grpcio_tests/tests/unit/_cython/_server_test.py
@@ -0,0 +1,49 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Test servers at the level of the Cython API."""
+
+import threading
+import time
+import unittest
+
+from grpc._cython import cygrpc
+
+
+class Test(unittest.TestCase):
+
+ def test_lonely_server(self):
+ server_call_completion_queue = cygrpc.CompletionQueue()
+ server_shutdown_completion_queue = cygrpc.CompletionQueue()
+ server = cygrpc.Server(cygrpc.ChannelArgs([]))
+ server.register_completion_queue(server_call_completion_queue)
+ server.register_completion_queue(server_shutdown_completion_queue)
+ port = server.add_http2_port(b'[::]:0')
+ server.start()
+
+ server_request_call_tag = 'server_request_call_tag'
+ server_request_call_start_batch_result = server.request_call(
+ server_call_completion_queue, server_call_completion_queue,
+ server_request_call_tag)
+
+ time.sleep(4)
+
+ server_shutdown_tag = 'server_shutdown_tag'
+ server_shutdown_result = server.shutdown(
+ server_shutdown_completion_queue, server_shutdown_tag)
+ server_request_call_event = server_call_completion_queue.poll()
+ server_shutdown_event = server_shutdown_completion_queue.poll()
+
+
+if __name__ == '__main__':
+ unittest.main(verbosity=2)
diff --git a/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py b/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py
index 4eda685486..5453735f11 100644
--- a/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py
+++ b/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py
@@ -35,11 +35,6 @@ def _metadata_plugin(context, callback):
class TypeSmokeTest(unittest.TestCase):
- def testOperationFlags(self):
- operation = cygrpc.operation_send_message(b'asdf',
- cygrpc.WriteFlag.no_compress)
- self.assertEqual(cygrpc.WriteFlag.no_compress, operation.flags)
-
def testTimespec(self):
now = time.time()
now_timespec_a = cygrpc.Timespec(now)
@@ -60,7 +55,8 @@ class TypeSmokeTest(unittest.TestCase):
del completion_queue
def testServerUpDown(self):
- server = cygrpc.Server(cygrpc.ChannelArgs([]))
+ server = cygrpc.Server(
+ cygrpc.ChannelArgs([cygrpc.ChannelArg(b'grpc.so_reuseport', 0)]))
del server
def testChannelUpDown(self):
@@ -72,7 +68,8 @@ class TypeSmokeTest(unittest.TestCase):
b'test plugin name!')
def testServerStartNoExplicitShutdown(self):
- server = cygrpc.Server(cygrpc.ChannelArgs([]))
+ server = cygrpc.Server(
+ cygrpc.ChannelArgs([cygrpc.ChannelArg(b'grpc.so_reuseport', 0)]))
completion_queue = cygrpc.CompletionQueue()
server.register_completion_queue(completion_queue)
port = server.add_http2_port(b'[::]:0')
@@ -82,14 +79,16 @@ class TypeSmokeTest(unittest.TestCase):
def testServerStartShutdown(self):
completion_queue = cygrpc.CompletionQueue()
- server = cygrpc.Server(cygrpc.ChannelArgs([]))
+ server = cygrpc.Server(
+ cygrpc.ChannelArgs([cygrpc.ChannelArg(b'grpc.so_reuseport', 0)]))
server.add_http2_port(b'[::]:0')
server.register_completion_queue(completion_queue)
server.start()
shutdown_tag = object()
server.shutdown(completion_queue, shutdown_tag)
event = completion_queue.poll()
- self.assertEqual(cygrpc.CompletionType.operation_complete, event.type)
+ self.assertEqual(cygrpc.CompletionType.operation_complete,
+ event.completion_type)
self.assertIs(shutdown_tag, event.tag)
del server
del completion_queue
@@ -99,7 +98,8 @@ class ServerClientMixin(object):
def setUpMixin(self, server_credentials, client_credentials, host_override):
self.server_completion_queue = cygrpc.CompletionQueue()
- self.server = cygrpc.Server(cygrpc.ChannelArgs([]))
+ self.server = cygrpc.Server(
+ cygrpc.ChannelArgs([cygrpc.ChannelArg(b'grpc.so_reuseport', 0)]))
self.server.register_completion_queue(self.server_completion_queue)
if server_credentials:
self.port = self.server.add_http2_port(b'[::]:0',
@@ -148,7 +148,7 @@ class ServerClientMixin(object):
self.assertEqual(cygrpc.CallError.ok, call_result)
event = queue.poll(deadline)
self.assertEqual(cygrpc.CompletionType.operation_complete,
- event.type)
+ event.completion_type)
self.assertTrue(event.success)
self.assertIs(tag, event.tag)
except Exception as error:
@@ -170,7 +170,7 @@ class ServerClientMixin(object):
SERVER_TRAILING_METADATA_KEY = 'california_is_in_a_drought'
SERVER_TRAILING_METADATA_VALUE = 'zomg it is'
SERVER_STATUS_CODE = cygrpc.StatusCode.ok
- SERVER_STATUS_DETAILS = b'our work is never over'
+ SERVER_STATUS_DETAILS = 'our work is never over'
REQUEST = b'in death a member of project mayhem has a name'
RESPONSE = b'his name is robert paulson'
METHOD = b'twinkies'
@@ -192,13 +192,13 @@ class ServerClientMixin(object):
(CLIENT_METADATA_ASCII_KEY, CLIENT_METADATA_ASCII_VALUE,),
(CLIENT_METADATA_BIN_KEY, CLIENT_METADATA_BIN_VALUE,),)
client_start_batch_result = client_call.start_client_batch([
- cygrpc.operation_send_initial_metadata(client_initial_metadata,
- _EMPTY_FLAGS),
- cygrpc.operation_send_message(REQUEST, _EMPTY_FLAGS),
- cygrpc.operation_send_close_from_client(_EMPTY_FLAGS),
- cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),
- cygrpc.operation_receive_message(_EMPTY_FLAGS),
- cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS)
+ cygrpc.SendInitialMetadataOperation(client_initial_metadata,
+ _EMPTY_FLAGS),
+ cygrpc.SendMessageOperation(REQUEST, _EMPTY_FLAGS),
+ cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),
], client_call_tag)
self.assertEqual(cygrpc.CallError.ok, client_start_batch_result)
client_event_future = test_utilities.CompletionQueuePollFuture(
@@ -206,33 +206,31 @@ class ServerClientMixin(object):
request_event = self.server_completion_queue.poll(cygrpc_deadline)
self.assertEqual(cygrpc.CompletionType.operation_complete,
- request_event.type)
- self.assertIsInstance(request_event.operation_call, cygrpc.Call)
+ request_event.completion_type)
+ self.assertIsInstance(request_event.call, cygrpc.Call)
self.assertIs(server_request_tag, request_event.tag)
- self.assertEqual(0, len(request_event.batch_operations))
self.assertTrue(
test_common.metadata_transmitted(client_initial_metadata,
- request_event.request_metadata))
- self.assertEqual(METHOD, request_event.request_call_details.method)
- self.assertEqual(self.expected_host,
- request_event.request_call_details.host)
+ request_event.invocation_metadata))
+ self.assertEqual(METHOD, request_event.call_details.method)
+ self.assertEqual(self.expected_host, request_event.call_details.host)
self.assertLess(
- abs(DEADLINE - float(request_event.request_call_details.deadline)),
+ abs(DEADLINE - float(request_event.call_details.deadline)),
DEADLINE_TOLERANCE)
server_call_tag = object()
- server_call = request_event.operation_call
+ server_call = request_event.call
server_initial_metadata = (
(SERVER_INITIAL_METADATA_KEY, SERVER_INITIAL_METADATA_VALUE,),)
server_trailing_metadata = (
(SERVER_TRAILING_METADATA_KEY, SERVER_TRAILING_METADATA_VALUE,),)
server_start_batch_result = server_call.start_server_batch([
- cygrpc.operation_send_initial_metadata(
+ cygrpc.SendInitialMetadataOperation(
server_initial_metadata,
- _EMPTY_FLAGS), cygrpc.operation_receive_message(_EMPTY_FLAGS),
- cygrpc.operation_send_message(RESPONSE, _EMPTY_FLAGS),
- cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS),
- cygrpc.operation_send_status_from_server(
+ _EMPTY_FLAGS), cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),
+ cygrpc.SendMessageOperation(RESPONSE, _EMPTY_FLAGS),
+ cygrpc.ReceiveCloseOnServerOperation(_EMPTY_FLAGS),
+ cygrpc.SendStatusFromServerOperation(
server_trailing_metadata, SERVER_STATUS_CODE,
SERVER_STATUS_DETAILS, _EMPTY_FLAGS)
], server_call_tag)
@@ -245,25 +243,24 @@ class ServerClientMixin(object):
found_client_op_types = set()
for client_result in client_event.batch_operations:
# we expect each op type to be unique
- self.assertNotIn(client_result.type, found_client_op_types)
- found_client_op_types.add(client_result.type)
- if client_result.type == cygrpc.OperationType.receive_initial_metadata:
+ self.assertNotIn(client_result.type(), found_client_op_types)
+ found_client_op_types.add(client_result.type())
+ if client_result.type(
+ ) == cygrpc.OperationType.receive_initial_metadata:
self.assertTrue(
test_common.metadata_transmitted(
server_initial_metadata,
- client_result.received_metadata))
- elif client_result.type == cygrpc.OperationType.receive_message:
- self.assertEqual(RESPONSE,
- client_result.received_message.bytes())
- elif client_result.type == cygrpc.OperationType.receive_status_on_client:
+ client_result.initial_metadata()))
+ elif client_result.type() == cygrpc.OperationType.receive_message:
+ self.assertEqual(RESPONSE, client_result.message())
+ elif client_result.type(
+ ) == cygrpc.OperationType.receive_status_on_client:
self.assertTrue(
test_common.metadata_transmitted(
server_trailing_metadata,
- client_result.received_metadata))
- self.assertEqual(SERVER_STATUS_DETAILS,
- client_result.received_status_details)
- self.assertEqual(SERVER_STATUS_CODE,
- client_result.received_status_code)
+ client_result.trailing_metadata()))
+ self.assertEqual(SERVER_STATUS_DETAILS, client_result.details())
+ self.assertEqual(SERVER_STATUS_CODE, client_result.code())
self.assertEqual(
set([
cygrpc.OperationType.send_initial_metadata,
@@ -277,13 +274,13 @@ class ServerClientMixin(object):
self.assertEqual(5, len(server_event.batch_operations))
found_server_op_types = set()
for server_result in server_event.batch_operations:
- self.assertNotIn(client_result.type, found_server_op_types)
- found_server_op_types.add(server_result.type)
- if server_result.type == cygrpc.OperationType.receive_message:
- self.assertEqual(REQUEST,
- server_result.received_message.bytes())
- elif server_result.type == cygrpc.OperationType.receive_close_on_server:
- self.assertFalse(server_result.received_cancelled)
+ self.assertNotIn(client_result.type(), found_server_op_types)
+ found_server_op_types.add(server_result.type())
+ if server_result.type() == cygrpc.OperationType.receive_message:
+ self.assertEqual(REQUEST, server_result.message())
+ elif server_result.type(
+ ) == cygrpc.OperationType.receive_close_on_server:
+ self.assertFalse(server_result.cancelled())
self.assertEqual(
set([
cygrpc.OperationType.send_initial_metadata,
@@ -319,13 +316,12 @@ class ServerClientMixin(object):
cygrpc_deadline, description)
client_event_future = perform_client_operations([
- cygrpc.operation_send_initial_metadata(empty_metadata,
- _EMPTY_FLAGS),
- cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),
+ cygrpc.SendInitialMetadataOperation(empty_metadata, _EMPTY_FLAGS),
+ cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),
], "Client prologue")
request_event = self.server_completion_queue.poll(cygrpc_deadline)
- server_call = request_event.operation_call
+ server_call = request_event.call
def perform_server_operations(operations, description):
return self._perform_operations(operations, server_call,
@@ -333,8 +329,7 @@ class ServerClientMixin(object):
cygrpc_deadline, description)
server_event_future = perform_server_operations([
- cygrpc.operation_send_initial_metadata(empty_metadata,
- _EMPTY_FLAGS),
+ cygrpc.SendInitialMetadataOperation(empty_metadata, _EMPTY_FLAGS),
], "Server prologue")
client_event_future.result() # force completion
@@ -343,12 +338,12 @@ class ServerClientMixin(object):
# Messaging
for _ in range(10):
client_event_future = perform_client_operations([
- cygrpc.operation_send_message(b'', _EMPTY_FLAGS),
- cygrpc.operation_receive_message(_EMPTY_FLAGS),
+ cygrpc.SendMessageOperation(b'', _EMPTY_FLAGS),
+ cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),
], "Client message")
server_event_future = perform_server_operations([
- cygrpc.operation_send_message(b'', _EMPTY_FLAGS),
- cygrpc.operation_receive_message(_EMPTY_FLAGS),
+ cygrpc.SendMessageOperation(b'', _EMPTY_FLAGS),
+ cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),
], "Server receive")
client_event_future.result() # force completion
@@ -356,13 +351,13 @@ class ServerClientMixin(object):
# Epilogue
client_event_future = perform_client_operations([
- cygrpc.operation_send_close_from_client(_EMPTY_FLAGS),
- cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS)
+ cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS)
], "Client epilogue")
server_event_future = perform_server_operations([
- cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS),
- cygrpc.operation_send_status_from_server(
+ cygrpc.ReceiveCloseOnServerOperation(_EMPTY_FLAGS),
+ cygrpc.SendStatusFromServerOperation(
empty_metadata, cygrpc.StatusCode.ok, b'', _EMPTY_FLAGS)
], "Server epilogue")
diff --git a/src/python/grpcio_tests/tests/unit/_empty_message_test.py b/src/python/grpcio_tests/tests/unit/_empty_message_test.py
index 62077e7677..14695bc13f 100644
--- a/src/python/grpcio_tests/tests/unit/_empty_message_test.py
+++ b/src/python/grpcio_tests/tests/unit/_empty_message_test.py
@@ -15,8 +15,8 @@
import unittest
import grpc
-from grpc.framework.foundation import logging_pool
+from tests.unit import test_common
from tests.unit.framework.common import test_constants
_REQUEST = b''
@@ -87,9 +87,8 @@ class _GenericHandler(grpc.GenericRpcHandler):
class EmptyMessageTest(unittest.TestCase):
def setUp(self):
- self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
- self._server = grpc.server(
- self._server_pool, handlers=(_GenericHandler(),))
+ self._server = test_common.test_server()
+ self._server.add_generic_rpc_handlers((_GenericHandler(),))
port = self._server.add_insecure_port('[::]:0')
self._server.start()
self._channel = grpc.insecure_channel('localhost:%d' % port)
diff --git a/src/python/grpcio_tests/tests/unit/_exit_scenarios.py b/src/python/grpcio_tests/tests/unit/_exit_scenarios.py
index 7c13dab756..0a0239a63d 100644
--- a/src/python/grpcio_tests/tests/unit/_exit_scenarios.py
+++ b/src/python/grpcio_tests/tests/unit/_exit_scenarios.py
@@ -168,11 +168,11 @@ if __name__ == '__main__':
args = parser.parse_args()
if args.scenario == UNSTARTED_SERVER:
- server = grpc.server(DaemonPool())
+ server = grpc.server(DaemonPool(), options=(('grpc.so_reuseport', 0),))
if args.wait_for_interrupt:
time.sleep(WAIT_TIME)
elif args.scenario == RUNNING_SERVER:
- server = grpc.server(DaemonPool())
+ server = grpc.server(DaemonPool(), options=(('grpc.so_reuseport', 0),))
port = server.add_insecure_port('[::]:0')
server.start()
if args.wait_for_interrupt:
@@ -187,7 +187,7 @@ if __name__ == '__main__':
if args.wait_for_interrupt:
time.sleep(WAIT_TIME)
elif args.scenario == POLL_CONNECTIVITY:
- server = grpc.server(DaemonPool())
+ server = grpc.server(DaemonPool(), options=(('grpc.so_reuseport', 0),))
port = server.add_insecure_port('[::]:0')
server.start()
channel = grpc.insecure_channel('localhost:%d' % port)
@@ -201,7 +201,7 @@ if __name__ == '__main__':
else:
handler = GenericHandler()
- server = grpc.server(DaemonPool())
+ server = grpc.server(DaemonPool(), options=(('grpc.so_reuseport', 0),))
port = server.add_insecure_port('[::]:0')
server.add_generic_rpc_handlers((handler,))
server.start()
diff --git a/src/python/grpcio_tests/tests/unit/_interceptor_test.py b/src/python/grpcio_tests/tests/unit/_interceptor_test.py
index cf875ed7da..2aee298df2 100644
--- a/src/python/grpcio_tests/tests/unit/_interceptor_test.py
+++ b/src/python/grpcio_tests/tests/unit/_interceptor_test.py
@@ -22,6 +22,7 @@ from concurrent import futures
import grpc
from grpc.framework.foundation import logging_pool
+from tests.unit import test_common
from tests.unit.framework.common import test_constants
from tests.unit.framework.common import test_control
@@ -304,6 +305,7 @@ class InterceptorTest(unittest.TestCase):
self._server = grpc.server(
self._server_pool,
+ options=(('grpc.so_reuseport', 0),),
interceptors=(_LoggingInterceptor('s1', self._record),
conditional_interceptor,
_LoggingInterceptor('s2', self._record),))
diff --git a/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py b/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py
index 2a1a49ce74..b46d176d04 100644
--- a/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py
+++ b/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py
@@ -15,11 +15,10 @@
import itertools
import threading
import unittest
-from concurrent import futures
import grpc
-from grpc.framework.foundation import logging_pool
+from tests.unit import test_common
from tests.unit.framework.common import test_constants
from tests.unit.framework.common import test_control
@@ -191,9 +190,8 @@ class InvocationDefectsTest(unittest.TestCase):
def setUp(self):
self._control = test_control.PauseFailControl()
self._handler = _Handler(self._control)
- self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
- self._server = grpc.server(self._server_pool)
+ self._server = test_common.test_server()
port = self._server.add_insecure_port('[::]:0')
self._server.add_generic_rpc_handlers((_GenericHandler(self._handler),))
self._server.start()
diff --git a/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py b/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py
index cb59cd3769..ec67f99fbc 100644
--- a/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py
+++ b/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py
@@ -17,7 +17,6 @@ import threading
import unittest
import grpc
-from grpc.framework.foundation import logging_pool
from tests.unit import test_common
from tests.unit.framework.common import test_constants
@@ -186,9 +185,9 @@ class MetadataCodeDetailsTest(unittest.TestCase):
def setUp(self):
self._servicer = _Servicer()
- self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
- self._server = grpc.server(
- self._server_pool, handlers=(_generic_handler(self._servicer),))
+ self._server = test_common.test_server()
+ self._server.add_generic_rpc_handlers(
+ (_generic_handler(self._servicer),))
port = self._server.add_insecure_port('[::]:0')
self._server.start()
diff --git a/src/python/grpcio_tests/tests/unit/_metadata_test.py b/src/python/grpcio_tests/tests/unit/_metadata_test.py
index 0669486892..f2dac7bdc5 100644
--- a/src/python/grpcio_tests/tests/unit/_metadata_test.py
+++ b/src/python/grpcio_tests/tests/unit/_metadata_test.py
@@ -18,7 +18,6 @@ import weakref
import grpc
from grpc import _channel
-from grpc.framework.foundation import logging_pool
from tests.unit import test_common
from tests.unit.framework.common import test_constants
@@ -146,9 +145,9 @@ class _GenericHandler(grpc.GenericRpcHandler):
class MetadataTest(unittest.TestCase):
def setUp(self):
- self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
- self._server = grpc.server(
- self._server_pool, handlers=(_GenericHandler(weakref.proxy(self)),))
+ self._server = test_common.test_server()
+ self._server.add_generic_rpc_handlers(
+ (_GenericHandler(weakref.proxy(self)),))
port = self._server.add_insecure_port('[::]:0')
self._server.start()
self._channel = grpc.insecure_channel(
diff --git a/src/python/grpcio_tests/tests/unit/_reconnect_test.py b/src/python/grpcio_tests/tests/unit/_reconnect_test.py
index 53fd1c2ca4..10aee9fb4f 100644
--- a/src/python/grpcio_tests/tests/unit/_reconnect_test.py
+++ b/src/python/grpcio_tests/tests/unit/_reconnect_test.py
@@ -13,6 +13,7 @@
# limitations under the License.
"""Tests that a channel will reconnect if a connection is dropped"""
+import socket
import unittest
import grpc
@@ -30,6 +31,44 @@ def _handle_unary_unary(unused_request, unused_servicer_context):
return _RESPONSE
+def _get_reuse_socket_option():
+ try:
+ return socket.SO_REUSEPORT
+ except AttributeError:
+ # SO_REUSEPORT is unavailable on Windows, but SO_REUSEADDR
+ # allows forcibly re-binding to a port
+ return socket.SO_REUSEADDR
+
+
+def _pick_and_bind_port(sock_opt):
+ # Reserve a port, when we restart the server we want
+ # to hold onto the port
+ port = 0
+ for address_family in (socket.AF_INET6, socket.AF_INET):
+ try:
+ s = socket.socket(address_family, socket.SOCK_STREAM)
+ except socket.error:
+ continue # this address family is unavailable
+ s.setsockopt(socket.SOL_SOCKET, sock_opt, 1)
+ try:
+ s.bind(('localhost', port))
+ # for socket.SOCK_STREAM sockets, it is necessary to call
+ # listen to get the desired behavior.
+ s.listen(1)
+ port = s.getsockname()[1]
+ except socket.error:
+ # port was not available on the current address family
+ # try again
+ port = 0
+ break
+ finally:
+ s.close()
+ if s:
+ return port if port != 0 else _pick_and_bind_port(sock_opt)
+ else:
+ return None # no address family was available
+
+
class ReconnectTest(unittest.TestCase):
def test_reconnect(self):
@@ -38,8 +77,12 @@ class ReconnectTest(unittest.TestCase):
'UnaryUnary':
grpc.unary_unary_rpc_method_handler(_handle_unary_unary)
})
+ sock_opt = _get_reuse_socket_option()
+ port = _pick_and_bind_port(sock_opt)
+ self.assertIsNotNone(port)
+
server = grpc.server(server_pool, (handler,))
- port = server.add_insecure_port('[::]:0')
+ server.add_insecure_port('[::]:{}'.format(port))
server.start()
channel = grpc.insecure_channel('localhost:%d' % port)
multi_callable = channel.unary_unary(_UNARY_UNARY)
diff --git a/src/python/grpcio_tests/tests/unit/_resource_exhausted_test.py b/src/python/grpcio_tests/tests/unit/_resource_exhausted_test.py
index e425a0adfe..df4b129018 100644
--- a/src/python/grpcio_tests/tests/unit/_resource_exhausted_test.py
+++ b/src/python/grpcio_tests/tests/unit/_resource_exhausted_test.py
@@ -139,6 +139,7 @@ class ResourceExhaustedTest(unittest.TestCase):
self._server = grpc.server(
self._server_pool,
handlers=(_GenericHandler(self._trigger),),
+ options=(('grpc.so_reuseport', 0),),
maximum_concurrent_rpcs=test_constants.THREAD_CONCURRENCY)
port = self._server.add_insecure_port('[::]:0')
self._server.start()
diff --git a/src/python/grpcio_tests/tests/unit/_rpc_test.py b/src/python/grpcio_tests/tests/unit/_rpc_test.py
index 74d8541808..1515a87d93 100644
--- a/src/python/grpcio_tests/tests/unit/_rpc_test.py
+++ b/src/python/grpcio_tests/tests/unit/_rpc_test.py
@@ -21,6 +21,7 @@ from concurrent import futures
import grpc
from grpc.framework.foundation import logging_pool
+from tests.unit import test_common
from tests.unit.framework.common import test_constants
from tests.unit.framework.common import test_control
@@ -169,9 +170,8 @@ class RPCTest(unittest.TestCase):
def setUp(self):
self._control = test_control.PauseFailControl()
self._handler = _Handler(self._control)
- self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
- self._server = grpc.server(self._server_pool)
+ self._server = test_common.test_server()
port = self._server.add_insecure_port('[::]:0')
self._server.add_generic_rpc_handlers((_GenericHandler(self._handler),))
self._server.start()
@@ -180,7 +180,6 @@ class RPCTest(unittest.TestCase):
def tearDown(self):
self._server.stop(None)
- self._server_pool.shutdown(wait=True)
def testUnrecognizedMethod(self):
request = b'abc'
diff --git a/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py b/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py
index 005d16ea75..2c513da5d0 100644
--- a/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py
+++ b/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py
@@ -40,6 +40,7 @@ from concurrent import futures
import grpc
from tests.unit import resources
+from tests.unit import test_common
from tests.testing import _application_common
from tests.testing import _server_application
from tests.testing.proto import services_pb2_grpc
@@ -135,7 +136,7 @@ class _ServerSSLCertReloadTest(
raise NotImplementedError()
def setUp(self):
- self.server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
+ self.server = test_common.test_server()
services_pb2_grpc.add_FirstServiceServicer_to_server(
_server_application.FirstServiceServicer(), self.server)
switch_cert_on_client_num = 10
@@ -407,7 +408,7 @@ class ServerSSLCertReloadTestCertConfigReuse(_ServerSSLCertReloadTest):
return True
def setUp(self):
- self.server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
+ self.server = test_common.test_server()
services_pb2_grpc.add_FirstServiceServicer_to_server(
_server_application.FirstServiceServicer(), self.server)
self.cert_config_A = grpc.ssl_server_certificate_configuration(
diff --git a/src/python/grpcio_tests/tests/unit/test_common.py b/src/python/grpcio_tests/tests/unit/test_common.py
index ed71cc996b..6334a32b0e 100644
--- a/src/python/grpcio_tests/tests/unit/test_common.py
+++ b/src/python/grpcio_tests/tests/unit/test_common.py
@@ -15,6 +15,7 @@
import collections
+from concurrent import futures
import grpc
import six
@@ -82,3 +83,13 @@ def test_secure_channel(target, channel_credentials, server_host_override):
channel = grpc.secure_channel(target, channel_credentials, (
('grpc.ssl_target_name_override', server_host_override,),))
return channel
+
+
+def test_server(max_workers=10):
+ """Creates an insecure grpc server.
+
+ These servers have SO_REUSEPORT disabled to prevent cross-talk.
+ """
+ return grpc.server(
+ futures.ThreadPoolExecutor(max_workers=max_workers),
+ options=(('grpc.so_reuseport', 0),))
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
index 5ef34e47ad..8de0ccde82 100644
--- a/templates/CMakeLists.txt.template
+++ b/templates/CMakeLists.txt.template
@@ -147,183 +147,12 @@
set(_gRPC_PROTOBUF_LIBRARY_NAME "libprotobuf")
endif()
- if("<%text>${gRPC_ZLIB_PROVIDER}</%text>" STREQUAL "module")
- if(NOT ZLIB_ROOT_DIR)
- set(ZLIB_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/zlib)
- endif()
- set(ZLIB_INCLUDE_DIR "<%text>${ZLIB_ROOT_DIR}</%text>")
- if(EXISTS "<%text>${ZLIB_ROOT_DIR}</%text>/CMakeLists.txt")
- # TODO(jtattermusch): workaround for https://github.com/madler/zlib/issues/218
- include_directories(<%text>${ZLIB_INCLUDE_DIR}</%text>)
-
- add_subdirectory(<%text>${ZLIB_ROOT_DIR}</%text> third_party/zlib)
- if(TARGET zlibstatic)
- set(_gRPC_ZLIB_LIBRARIES zlibstatic)
- endif()
- else()
- message(WARNING "gRPC_ZLIB_PROVIDER is \"module\" but ZLIB_ROOT_DIR is wrong")
- endif()
- if(gRPC_INSTALL)
- message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_ZLIB_PROVIDER is \"module\"")
- set(gRPC_INSTALL FALSE)
- endif()
- elseif("<%text>${gRPC_ZLIB_PROVIDER}</%text>" STREQUAL "package")
- find_package(ZLIB REQUIRED)
- set(_gRPC_ZLIB_LIBRARIES <%text>${ZLIB_LIBRARIES}</%text>)
- set(_gRPC_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()")
- endif()
-
- if("<%text>${gRPC_CARES_PROVIDER}</%text>" STREQUAL "module")
- if(NOT CARES_ROOT_DIR)
- set(CARES_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/cares/cares)
- endif()
- set(CARES_SHARED OFF CACHE BOOL "disable shared library")
- set(CARES_STATIC ON CACHE BOOL "link cares statically")
- set(CARES_INCLUDE_DIR "<%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/cares/cares")
- add_subdirectory(third_party/cares/cares)
- if(TARGET c-ares)
- set(_gRPC_CARES_LIBRARIES c-ares)
- endif()
- if(gRPC_INSTALL)
- message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_CARES_PROVIDER is \"module\"")
- set(gRPC_INSTALL FALSE)
- endif()
- elseif("<%text>${gRPC_CARES_PROVIDER}</%text>" STREQUAL "package")
- find_package(c-ares REQUIRED CONFIG)
- if(TARGET c-ares::cares)
- set(_gRPC_CARES_LIBRARIES c-ares::cares)
- endif()
- set(_gRPC_FIND_CARES "if(NOT c-ares_FOUND)\n find_package(c-ares CONFIG)\nendif()")
- endif()
-
- if("<%text>${gRPC_PROTOBUF_PROVIDER}</%text>" STREQUAL "module")
- # Building the protobuf tests require gmock what is not part of a standard protobuf checkout.
- # Disable them unless they are explicitly requested from the cmake command line (when we assume
- # gmock is downloaded to the right location inside protobuf).
- if(NOT protobuf_BUILD_TESTS)
- set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
- endif()
- # Disable building protobuf with zlib. Building protobuf with zlib breaks
- # the build if zlib is not installed on the system.
- if(NOT protobuf_WITH_ZLIB)
- set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build protobuf with zlib.")
- endif()
- if(NOT PROTOBUF_ROOT_DIR)
- set(PROTOBUF_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/protobuf)
- endif()
- set(PROTOBUF_WELLKNOWN_IMPORT_DIR <%text>${PROTOBUF_ROOT_DIR}</%text>/src)
- if(EXISTS "<%text>${PROTOBUF_ROOT_DIR}</%text>/cmake/CMakeLists.txt")
- set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link static runtime libraries")
- add_subdirectory(<%text>${PROTOBUF_ROOT_DIR}</%text>/cmake third_party/protobuf)
- if(TARGET <%text>${_gRPC_PROTOBUF_LIBRARY_NAME}</%text>)
- set(_gRPC_PROTOBUF_LIBRARIES <%text>${_gRPC_PROTOBUF_LIBRARY_NAME}</%text>)
- endif()
- if(TARGET libprotoc)
- set(_gRPC_PROTOBUF_PROTOC_LIBRARIES libprotoc)
- endif()
- if(TARGET protoc)
- set(_gRPC_PROTOBUF_PROTOC protoc)
- set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protoc>)
- endif()
- else()
- message(WARNING "gRPC_PROTOBUF_PROVIDER is \"module\" but PROTOBUF_ROOT_DIR is wrong")
- endif()
- if(gRPC_INSTALL)
- message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_PROTOBUF_PROVIDER is \"module\"")
- set(gRPC_INSTALL FALSE)
- endif()
- elseif("<%text>${gRPC_PROTOBUF_PROVIDER}</%text>" STREQUAL "package")
- find_package(Protobuf REQUIRED <%text>${gRPC_PROTOBUF_PACKAGE_TYPE}</%text>)
- if(Protobuf_FOUND OR PROTOBUF_FOUND)
- if(TARGET protobuf::<%text>${_gRPC_PROTOBUF_LIBRARY_NAME}</%text>)
- set(_gRPC_PROTOBUF_LIBRARIES protobuf::<%text>${_gRPC_PROTOBUF_LIBRARY_NAME}</%text>)
- else()
- set(_gRPC_PROTOBUF_LIBRARIES <%text>${PROTOBUF_LIBRARIES}</%text>)
- endif()
- if(TARGET protobuf::libprotoc)
- set(_gRPC_PROTOBUF_PROTOC_LIBRARIES protobuf::libprotoc)
- else()
- set(_gRPC_PROTOBUF_PROTOC_LIBRARIES <%text>${PROTOBUF_PROTOC_LIBRARIES}</%text>)
- endif()
- if(TARGET protobuf::protoc)
- set(_gRPC_PROTOBUF_PROTOC protobuf::protoc)
- set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protobuf::protoc>)
- else()
- set(_gRPC_PROTOBUF_PROTOC <%text>${PROTOBUF_PROTOC_EXECUTABLE}</%text>)
- set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE <%text>${PROTOBUF_PROTOC_EXECUTABLE}</%text>)
- endif()
- set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND)\n find_package(Protobuf <%text>${gRPC_PROTOBUF_PACKAGE_TYPE}</%text>)\nendif()")
- endif()
- if(PROTOBUF_FOUND)
- include_directories(<%text>${PROTOBUF_INCLUDE_DIRS}</%text>)
- endif()
- set(PROTOBUF_WELLKNOWN_IMPORT_DIR /usr/local/include)
- endif()
-
- if("<%text>${gRPC_SSL_PROVIDER}</%text>" STREQUAL "module")
- if(NOT BORINGSSL_ROOT_DIR)
- set(BORINGSSL_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/boringssl)
- endif()
- if(EXISTS "<%text>${BORINGSSL_ROOT_DIR}</%text>/CMakeLists.txt")
- set(OPENSSL_NO_ASM ON) # make boringssl buildable with Visual Studio
- add_subdirectory(<%text>${BORINGSSL_ROOT_DIR}</%text> third_party/boringssl)
- if(TARGET ssl)
- set(_gRPC_SSL_LIBRARIES ssl)
- set(_gRPC_SSL_INCLUDE_DIR <%text>${BORINGSSL_ROOT_DIR}</%text>/include)
- endif()
- else()
- message(WARNING "gRPC_SSL_PROVIDER is \"module\" but BORINGSSL_ROOT_DIR is wrong")
- endif()
- if(gRPC_INSTALL)
- message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_SSL_PROVIDER is \"module\"")
- set(gRPC_INSTALL FALSE)
- endif()
- elseif("<%text>${gRPC_SSL_PROVIDER}</%text>" STREQUAL "package")
- find_package(OpenSSL REQUIRED)
- set(_gRPC_SSL_LIBRARIES <%text>${OPENSSL_LIBRARIES}</%text>)
- set(_gRPC_SSL_INCLUDE_DIR <%text>${OPENSSL_INCLUDE_DIR}</%text>)
- set(_gRPC_FIND_SSL "if(NOT OPENSSL_FOUND)\n find_package(OpenSSL)\nendif()")
- endif()
-
- if("<%text>${gRPC_GFLAGS_PROVIDER}</%text>" STREQUAL "module")
- if(NOT GFLAGS_ROOT_DIR)
- set(GFLAGS_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/gflags)
- endif()
- if(EXISTS "<%text>${GFLAGS_ROOT_DIR}</%text>/CMakeLists.txt")
- add_subdirectory(<%text>${GFLAGS_ROOT_DIR}</%text> third_party/gflags)
- if(TARGET gflags_static)
- set(_gRPC_GFLAGS_LIBRARIES gflags_static)
- endif()
- else()
- message(WARNING "gRPC_GFLAGS_PROVIDER is \"module\" but GFLAGS_ROOT_DIR is wrong")
- endif()
- elseif("<%text>${gRPC_GFLAGS_PROVIDER}</%text>" STREQUAL "package")
- find_package(gflags)
- if(TARGET gflags::gflags)
- set(_gRPC_GFLAGS_LIBRARIES gflags::gflags)
- endif()
- set(_gRPC_FIND_GFLAGS "if(NOT gflags_FOUND)\n find_package(gflags)\nendif()")
- endif()
-
- if("<%text>${gRPC_BENCHMARK_PROVIDER}</%text>" STREQUAL "module")
- if(NOT BENCHMARK_ROOT_DIR)
- set(BENCHMARK_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/benchmark)
- endif()
- if(EXISTS "<%text>${BENCHMARK_ROOT_DIR}</%text>/CMakeLists.txt")
- add_subdirectory(<%text>${BENCHMARK_ROOT_DIR}</%text> third_party/benchmark)
- if(TARGET benchmark)
- set(_gRPC_BENCHMARK_LIBRARIES benchmark)
- endif()
- else()
- message(WARNING "gRPC_BENCHMARK_PROVIDER is \"module\" but BENCHMARK_ROOT_DIR is wrong")
- endif()
- elseif("<%text>${gRPC_BENCHMARK_PROVIDER}</%text>" STREQUAL "package")
- find_package(benchmark)
- if(TARGET benchmark::benchmark)
- set(_gRPC_BENCHMARK_LIBRARIES benchmark::benchmark)
- endif()
- set(_gRPC_FIND_BENCHMARK "if(NOT benchmark_FOUND)\n find_package(benchmark)\nendif()")
- endif()
+ include(cmake/zlib.cmake)
+ include(cmake/cares.cmake)
+ include(cmake/protobuf.cmake)
+ include(cmake/ssl.cmake)
+ include(cmake/gflags.cmake)
+ include(cmake/benchmark.cmake)
if(NOT MSVC)
set(CMAKE_C_FLAGS "<%text>${CMAKE_C_FLAGS}</%text> -std=c99")
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 3eb838857a..954bea7e17 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -1383,14 +1383,14 @@
install-pkg-config_c: pc_c pc_c_unsecure
$(E) "[INSTALL] Installing C pkg-config files"
$(Q) $(INSTALL) -d $(prefix)/lib/pkgconfig
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc $(prefix)/lib/pkgconfig/grpc.pc
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc $(prefix)/lib/pkgconfig/grpc_unsecure.pc
+ $(Q) $(INSTALL) -m 0644 $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc $(prefix)/lib/pkgconfig/grpc.pc
+ $(Q) $(INSTALL) -m 0644 $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc $(prefix)/lib/pkgconfig/grpc_unsecure.pc
install-pkg-config_cxx: pc_cxx pc_cxx_unsecure
$(E) "[INSTALL] Installing C++ pkg-config files"
$(Q) $(INSTALL) -d $(prefix)/lib/pkgconfig
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc $(prefix)/lib/pkgconfig/grpc++.pc
- $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc $(prefix)/lib/pkgconfig/grpc++_unsecure.pc
+ $(Q) $(INSTALL) -m 0644 $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc $(prefix)/lib/pkgconfig/grpc++.pc
+ $(Q) $(INSTALL) -m 0644 $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc $(prefix)/lib/pkgconfig/grpc++_unsecure.pc
install-certs: etc/roots.pem
$(E) "[INSTALL] Installing root certificates"
diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template
index cb4d556acf..9785d150e4 100644
--- a/templates/gRPC-Core.podspec.template
+++ b/templates/gRPC-Core.podspec.template
@@ -22,27 +22,51 @@
# limitations under the License.
<%!
- def grpc_private_files(libs):
+ def grpc_lib_files(libs, expect_libs, groups):
out = []
for lib in libs:
- if lib.name in ("grpc", "gpr"):
- out += lib.get('headers', [])
- out += lib.get('src', [])
- return [f for f in out if not f.startswith("third_party/nanopb/")]
+ if lib.name in expect_libs:
+ for group in groups:
+ out += lib.get(group, [])
+ return out
+
+ def grpc_private_files(libs):
+ out = grpc_lib_files(libs, ("grpc", "gpr"), ("headers", "src"))
+ return [file for file in out if not file.startswith("third_party/nanopb/")]
def grpc_public_headers(libs):
- out = []
- for lib in libs:
- if lib.name in ("grpc", "gpr"):
- out += lib.get('public_headers', [])
+ out = grpc_lib_files(libs, ("grpc", "gpr"), ("public_headers",))
return out
def grpc_private_headers(libs):
- out = []
- for lib in libs:
- if lib.name in ("grpc", "gpr"):
- out += lib.get('headers', [])
- return [f for f in out if not f.startswith("third_party/nanopb/")]
+ out = grpc_lib_files(libs, ("grpc", "gpr"), ("headers",))
+ return [file for file in out if not file.startswith("third_party/nanopb/")]
+
+ def grpc_cronet_files(libs):
+ out = grpc_lib_files(libs, ("grpc_cronet",), ("src", "headers"))
+ excl = grpc_private_files(libs)
+ excl += [
+ # We do not need cronet dedicated plugin registry
+ "src/core/plugin_registry/grpc_cronet_plugin_registry.cc",
+ # We do not need dummy cronet API for ObjC
+ "src/core/ext/transport/cronet/transport/cronet_api_dummy.cc",
+ ]
+ return [file for file in out if not file in excl]
+
+ def grpc_cronet_public_headers(libs):
+ out = grpc_lib_files(libs, ("grpc_cronet",), ("public_headers",))
+ excl = grpc_public_headers(libs)
+ return [file for file in out if not file in excl]
+
+ def grpc_test_util_files(libs):
+ out = grpc_lib_files(libs, ("grpc_test_util", "gpr_test_util"), ("src", "headers"))
+ excl = grpc_private_files(libs)
+ return [file for file in out if not file in excl]
+
+ def end2end_tests_files(libs):
+ out = grpc_lib_files(libs, ("end2end_tests",), ("src", "headers"))
+ excl = grpc_private_files(libs)
+ return [file for file in out if not file in excl]
def ruby_multiline_list(files, indent):
return (',\n' + indent*' ').join('\'%s\'' % f for f in files)
@@ -153,7 +177,7 @@
s.subspec 'Cronet-Interface' do |ss|
ss.header_mappings_dir = 'include/grpc'
- ss.source_files = 'include/grpc/grpc_cronet.h'
+ ss.source_files = ${ruby_multiline_list(grpc_cronet_public_headers(libs), 22)}
end
s.subspec 'Cronet-Implementation' do |ss|
@@ -163,9 +187,7 @@
ss.dependency "#{s.name}/Implementation", version
ss.dependency "#{s.name}/Cronet-Interface", version
- ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc',
- 'src/core/ext/transport/cronet/transport/cronet_transport.{cc,h}',
- 'third_party/objective_c/Cronet/bidirectional_stream_c.h'
+ ss.source_files = ${ruby_multiline_list(grpc_cronet_files(libs), 22)}
end
s.subspec 'Tests' do |ss|
@@ -174,17 +196,8 @@
ss.dependency "#{s.name}/Interface", version
ss.dependency "#{s.name}/Implementation", version
- ss.source_files = 'test/core/end2end/cq_verifier.{cc,h}',
- 'test/core/end2end/end2end_tests.{cc,h}',
- 'test/core/end2end/end2end_test_utils.cc',
- 'test/core/end2end/tests/*.{cc,h}',
- 'test/core/end2end/fixtures/*.h',
- 'test/core/end2end/data/*.{cc,h}',
- 'test/core/util/debugger_macros.{cc,h}',
- 'test/core/util/test_config.{cc,h}',
- 'test/core/util/port.h',
- 'test/core/util/port.cc',
- 'test/core/util/port_server_client.{cc,h}'
+ ss.source_files = ${ruby_multiline_list(grpc_test_util_files(libs), 22)},
+ ${ruby_multiline_list(end2end_tests_files(libs), 22)}
end
# TODO (mxyan): Instead of this hack, add include path "third_party" to C core's include path?
diff --git a/templates/tools/dockerfile/test/sanity/Dockerfile.template b/templates/tools/dockerfile/test/sanity/Dockerfile.template
index fef569477e..c98f7d4176 100644
--- a/templates/tools/dockerfile/test/sanity/Dockerfile.template
+++ b/templates/tools/dockerfile/test/sanity/Dockerfile.template
@@ -29,7 +29,8 @@
libtool ${"\\"}
curl ${"\\"}
python-virtualenv ${"\\"}
- python-lxml
+ python-lxml ${"\\"}
+ shellcheck
RUN pip install simplejson mako
#======================================
diff --git a/test/core/backoff/BUILD b/test/core/backoff/BUILD
index 4cd7acf066..6fbd6542d4 100644
--- a/test/core/backoff/BUILD
+++ b/test/core/backoff/BUILD
@@ -26,11 +26,14 @@ package(
grpc_cc_test(
name = "backoff_test",
srcs = ["backoff_test.cc"],
+ external_deps = [
+ "gtest",
+ ],
language = "C++",
deps = [
- "//:grpc",
- "//test/core/util:grpc_test_util",
"//:gpr",
+ "//:grpc",
"//test/core/util:gpr_test_util",
+ "//test/core/util:grpc_test_util",
],
)
diff --git a/test/core/backoff/backoff_test.cc b/test/core/backoff/backoff_test.cc
index d3115fe1dd..7bc4d14ce6 100644
--- a/test/core/backoff/backoff_test.cc
+++ b/test/core/backoff/backoff_test.cc
@@ -18,137 +18,131 @@
#include "src/core/lib/backoff/backoff.h"
-#include <grpc/grpc.h>
+#include <algorithm>
+
#include <grpc/support/log.h>
#include <grpc/support/useful.h>
+#include <gtest/gtest.h>
#include "test/core/util/test_config.h"
-static void test_constant_backoff(void) {
- grpc_backoff backoff;
+namespace grpc {
+namespace testing {
+namespace {
+
+using grpc_core::BackOff;
+
+TEST(BackOffTest, ConstantBackOff) {
const grpc_millis initial_backoff = 200;
const double multiplier = 1.0;
const double jitter = 0.0;
- const grpc_millis min_connect_timeout = 100;
const grpc_millis max_backoff = 1000;
- grpc_backoff_init(&backoff, initial_backoff, multiplier, jitter,
- min_connect_timeout, max_backoff);
grpc_core::ExecCtx exec_ctx;
- grpc_backoff_result next_deadlines = grpc_backoff_begin(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline -
- grpc_core::ExecCtx::Get()->Now() ==
- initial_backoff);
- GPR_ASSERT(next_deadlines.next_attempt_start_time -
- grpc_core::ExecCtx::Get()->Now() ==
- initial_backoff);
+ BackOff::Options options;
+ options.set_initial_backoff(initial_backoff)
+ .set_multiplier(multiplier)
+ .set_jitter(jitter)
+ .set_max_backoff(max_backoff);
+ BackOff backoff(options);
+
+ grpc_millis next_attempt_start_time = backoff.Begin();
+ EXPECT_EQ(next_attempt_start_time - grpc_core::ExecCtx::Get()->Now(),
+ initial_backoff);
for (int i = 0; i < 10000; i++) {
- next_deadlines = grpc_backoff_step(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline -
- grpc_core::ExecCtx::Get()->Now() ==
- initial_backoff);
- GPR_ASSERT(next_deadlines.next_attempt_start_time -
- grpc_core::ExecCtx::Get()->Now() ==
- initial_backoff);
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
+ next_attempt_start_time = backoff.Step();
+ EXPECT_EQ(next_attempt_start_time - grpc_core::ExecCtx::Get()->Now(),
+ initial_backoff);
}
}
-static void test_min_connect(void) {
- grpc_backoff backoff;
+TEST(BackOffTest, MinConnect) {
const grpc_millis initial_backoff = 100;
const double multiplier = 1.0;
const double jitter = 0.0;
- const grpc_millis min_connect_timeout = 200;
const grpc_millis max_backoff = 1000;
- grpc_backoff_init(&backoff, initial_backoff, multiplier, jitter,
- min_connect_timeout, max_backoff);
grpc_core::ExecCtx exec_ctx;
- grpc_backoff_result next = grpc_backoff_begin(&backoff);
- // Because the min_connect_timeout > initial_backoff, current_deadline is used
- // as the deadline for the current attempt.
- GPR_ASSERT(next.current_deadline - grpc_core::ExecCtx::Get()->Now() ==
- min_connect_timeout);
- // ... while, if the current attempt fails, the next one will happen after
- // initial_backoff.
- GPR_ASSERT(next.next_attempt_start_time - grpc_core::ExecCtx::Get()->Now() ==
- initial_backoff);
+ BackOff::Options options;
+ options.set_initial_backoff(initial_backoff)
+ .set_multiplier(multiplier)
+ .set_jitter(jitter)
+ .set_max_backoff(max_backoff);
+ BackOff backoff(options);
+ grpc_millis next = backoff.Begin();
+ EXPECT_EQ(next - grpc_core::ExecCtx::Get()->Now(), initial_backoff);
}
-static void test_no_jitter_backoff(void) {
- grpc_backoff backoff;
+TEST(BackOffTest, NoJitterBackOff) {
const grpc_millis initial_backoff = 2;
const double multiplier = 2.0;
const double jitter = 0.0;
- const grpc_millis min_connect_timeout = 1;
const grpc_millis max_backoff = 513;
- grpc_backoff_init(&backoff, initial_backoff, multiplier, jitter,
- min_connect_timeout, max_backoff);
+ BackOff::Options options;
+ options.set_initial_backoff(initial_backoff)
+ .set_multiplier(multiplier)
+ .set_jitter(jitter)
+ .set_max_backoff(max_backoff);
+ BackOff backoff(options);
// x_1 = 2
// x_n = 2**i + x_{i-1} ( = 2**(n+1) - 2 )
grpc_core::ExecCtx exec_ctx;
grpc_core::ExecCtx::Get()->TestOnlySetNow(0);
- grpc_backoff_result next_deadlines = grpc_backoff_begin(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline ==
- next_deadlines.next_attempt_start_time);
- GPR_ASSERT(next_deadlines.current_deadline == 2);
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
- next_deadlines = grpc_backoff_step(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline == 6);
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
- next_deadlines = grpc_backoff_step(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline == 14);
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
- next_deadlines = grpc_backoff_step(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline == 30);
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
- next_deadlines = grpc_backoff_step(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline == 62);
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
- next_deadlines = grpc_backoff_step(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline == 126);
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
- next_deadlines = grpc_backoff_step(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline == 254);
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
- next_deadlines = grpc_backoff_step(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline == 510);
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
- next_deadlines = grpc_backoff_step(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline == 1022);
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
- next_deadlines = grpc_backoff_step(&backoff);
+ grpc_millis next = backoff.Begin();
+ EXPECT_EQ(next, 2);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next);
+ next = backoff.Step();
+ EXPECT_EQ(next, 6);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next);
+ next = backoff.Step();
+ EXPECT_EQ(next, 14);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next);
+ next = backoff.Step();
+ EXPECT_EQ(next, 30);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next);
+ next = backoff.Step();
+ EXPECT_EQ(next, 62);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next);
+ next = backoff.Step();
+ EXPECT_EQ(next, 126);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next);
+ next = backoff.Step();
+ EXPECT_EQ(next, 254);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next);
+ next = backoff.Step();
+ EXPECT_EQ(next, 510);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next);
+ next = backoff.Step();
+ EXPECT_EQ(next, 1022);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next);
+ next = backoff.Step();
// Hit the maximum timeout. From this point onwards, retries will increase
// only by max timeout.
- GPR_ASSERT(next_deadlines.current_deadline == 1535);
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
- next_deadlines = grpc_backoff_step(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline == 2048);
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
- next_deadlines = grpc_backoff_step(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline == 2561);
+ EXPECT_EQ(next, 1535);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next);
+ next = backoff.Step();
+ EXPECT_EQ(next, 2048);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next);
+ next = backoff.Step();
+ EXPECT_EQ(next, 2561);
}
-static void test_jitter_backoff(void) {
+TEST(BackOffTest, JitterBackOff) {
const grpc_millis initial_backoff = 500;
grpc_millis current_backoff = initial_backoff;
const grpc_millis max_backoff = 1000;
- const grpc_millis min_connect_timeout = 100;
const double multiplier = 1.0;
const double jitter = 0.1;
- grpc_backoff backoff;
- grpc_backoff_init(&backoff, initial_backoff, multiplier, jitter,
- min_connect_timeout, max_backoff);
+ BackOff::Options options;
+ options.set_initial_backoff(initial_backoff)
+ .set_multiplier(multiplier)
+ .set_jitter(jitter)
+ .set_max_backoff(max_backoff);
+ BackOff backoff(options);
- backoff.rng_state = 0; // force consistent PRNG
+ backoff.SetRandomSeed(0); // force consistent PRNG
grpc_core::ExecCtx exec_ctx;
- grpc_backoff_result next_deadlines = grpc_backoff_begin(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline -
- grpc_core::ExecCtx::Get()->Now() ==
- initial_backoff);
- GPR_ASSERT(next_deadlines.next_attempt_start_time -
- grpc_core::ExecCtx::Get()->Now() ==
- initial_backoff);
+ grpc_millis next = backoff.Begin();
+ EXPECT_EQ(next - grpc_core::ExecCtx::Get()->Now(), initial_backoff);
grpc_millis expected_next_lower_bound =
(grpc_millis)((double)current_backoff * (1 - jitter));
@@ -156,33 +150,27 @@ static void test_jitter_backoff(void) {
(grpc_millis)((double)current_backoff * (1 + jitter));
for (int i = 0; i < 10000; i++) {
- next_deadlines = grpc_backoff_step(&backoff);
+ next = backoff.Step();
// next-now must be within (jitter*100)% of the current backoff (which
// increases by * multiplier up to max_backoff).
- const grpc_millis timeout_millis =
- next_deadlines.current_deadline - grpc_core::ExecCtx::Get()->Now();
- GPR_ASSERT(timeout_millis >= expected_next_lower_bound);
- GPR_ASSERT(timeout_millis <= expected_next_upper_bound);
- current_backoff = GPR_MIN(
+ const grpc_millis timeout_millis = next - grpc_core::ExecCtx::Get()->Now();
+ EXPECT_GE(timeout_millis, expected_next_lower_bound);
+ EXPECT_LE(timeout_millis, expected_next_upper_bound);
+ current_backoff = std::min(
(grpc_millis)((double)current_backoff * multiplier), max_backoff);
expected_next_lower_bound =
(grpc_millis)((double)current_backoff * (1 - jitter));
expected_next_upper_bound =
(grpc_millis)((double)current_backoff * (1 + jitter));
- grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
}
}
+} // namespace
+} // namespace testing
+} // namespace grpc
+
int main(int argc, char** argv) {
grpc_test_init(argc, argv);
- grpc_init();
- gpr_time_init();
-
- test_constant_backoff();
- test_min_connect();
- test_no_jitter_backoff();
- test_jitter_backoff();
-
- grpc_shutdown();
- return 0;
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
}
diff --git a/test/core/iomgr/udp_server_test.cc b/test/core/iomgr/udp_server_test.cc
index 0deb534abd..dc1248bc1c 100644
--- a/test/core/iomgr/udp_server_test.cc
+++ b/test/core/iomgr/udp_server_test.cc
@@ -49,8 +49,11 @@ static int g_number_of_reads = 0;
static int g_number_of_writes = 0;
static int g_number_of_bytes_read = 0;
static int g_number_of_orphan_calls = 0;
+static int g_number_of_starts = 0;
-static bool on_read(grpc_fd* emfd, void* user_data) {
+static void on_start(grpc_fd* emfd, void* user_data) { g_number_of_starts++; }
+
+static bool on_read(grpc_fd* emfd) {
char read_buffer[512];
ssize_t byte_count;
@@ -129,21 +132,41 @@ static test_socket_factory* test_socket_factory_create(void) {
return factory;
}
+static void destroy_pollset(void* p, grpc_error* error) {
+ grpc_pollset_destroy(static_cast<grpc_pollset*>(p));
+}
+
+static void shutdown_and_destroy_pollset() {
+ gpr_mu_lock(g_mu);
+ auto closure = GRPC_CLOSURE_CREATE(destroy_pollset, g_pollset,
+ grpc_schedule_on_exec_ctx);
+ grpc_pollset_shutdown(g_pollset, closure);
+ gpr_mu_unlock(g_mu);
+ /* Flush exec_ctx to run |destroyed| */
+ grpc_core::ExecCtx::Get()->Flush();
+}
+
static void test_no_op(void) {
+ grpc_pollset_init(g_pollset, &g_mu);
grpc_core::ExecCtx exec_ctx;
grpc_udp_server* s = grpc_udp_server_create(nullptr);
+ LOG_TEST("test_no_op");
grpc_udp_server_destroy(s, nullptr);
+ shutdown_and_destroy_pollset();
}
static void test_no_op_with_start(void) {
+ grpc_pollset_init(g_pollset, &g_mu);
grpc_core::ExecCtx exec_ctx;
grpc_udp_server* s = grpc_udp_server_create(nullptr);
LOG_TEST("test_no_op_with_start");
grpc_udp_server_start(s, nullptr, 0, nullptr);
grpc_udp_server_destroy(s, nullptr);
+ shutdown_and_destroy_pollset();
}
static void test_no_op_with_port(void) {
+ grpc_pollset_init(g_pollset, &g_mu);
g_number_of_orphan_calls = 0;
grpc_core::ExecCtx exec_ctx;
grpc_resolved_address resolved_addr;
@@ -154,16 +177,18 @@ static void test_no_op_with_port(void) {
memset(&resolved_addr, 0, sizeof(resolved_addr));
resolved_addr.len = sizeof(struct sockaddr_in);
addr->sin_family = AF_INET;
- GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, on_read, on_write,
- on_fd_orphaned));
+ GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, on_start, on_read,
+ on_write, on_fd_orphaned));
grpc_udp_server_destroy(s, nullptr);
/* The server had a single FD, which should have been orphaned. */
GPR_ASSERT(g_number_of_orphan_calls == 1);
+ shutdown_and_destroy_pollset();
}
static void test_no_op_with_port_and_socket_factory(void) {
+ grpc_pollset_init(g_pollset, &g_mu);
g_number_of_orphan_calls = 0;
grpc_core::ExecCtx exec_ctx;
grpc_resolved_address resolved_addr;
@@ -182,8 +207,8 @@ static void test_no_op_with_port_and_socket_factory(void) {
memset(&resolved_addr, 0, sizeof(resolved_addr));
resolved_addr.len = sizeof(struct sockaddr_in);
addr->sin_family = AF_INET;
- GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, on_read, on_write,
- on_fd_orphaned));
+ GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, on_start, on_read,
+ on_write, on_fd_orphaned));
GPR_ASSERT(socket_factory->number_of_socket_calls == 1);
GPR_ASSERT(socket_factory->number_of_bind_calls == 1);
@@ -193,9 +218,11 @@ static void test_no_op_with_port_and_socket_factory(void) {
/* The server had a single FD, which should have been orphaned. */
GPR_ASSERT(g_number_of_orphan_calls == 1);
+ shutdown_and_destroy_pollset();
}
static void test_no_op_with_port_and_start(void) {
+ grpc_pollset_init(g_pollset, &g_mu);
g_number_of_orphan_calls = 0;
grpc_core::ExecCtx exec_ctx;
grpc_resolved_address resolved_addr;
@@ -206,19 +233,21 @@ static void test_no_op_with_port_and_start(void) {
memset(&resolved_addr, 0, sizeof(resolved_addr));
resolved_addr.len = sizeof(struct sockaddr_in);
addr->sin_family = AF_INET;
- GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, on_read, on_write,
- on_fd_orphaned));
+ GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, on_start, on_read,
+ on_write, on_fd_orphaned));
grpc_udp_server_start(s, nullptr, 0, nullptr);
-
+ GPR_ASSERT(g_number_of_starts == 1);
grpc_udp_server_destroy(s, nullptr);
/* The server had a single FD, which is orphaned exactly once in *
* grpc_udp_server_destroy. */
GPR_ASSERT(g_number_of_orphan_calls == 1);
+ shutdown_and_destroy_pollset();
}
static void test_receive(int number_of_clients) {
+ grpc_pollset_init(g_pollset, &g_mu);
grpc_core::ExecCtx exec_ctx;
grpc_resolved_address resolved_addr;
struct sockaddr_storage* addr = (struct sockaddr_storage*)resolved_addr.addr;
@@ -236,8 +265,8 @@ static void test_receive(int number_of_clients) {
memset(&resolved_addr, 0, sizeof(resolved_addr));
resolved_addr.len = sizeof(struct sockaddr_storage);
addr->ss_family = AF_INET;
- GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, on_read, on_write,
- on_fd_orphaned));
+ GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, on_start, on_read,
+ on_write, on_fd_orphaned));
svrfd = grpc_udp_server_get_fd(s, 0);
GPR_ASSERT(svrfd >= 0);
@@ -281,20 +310,15 @@ static void test_receive(int number_of_clients) {
/* The server had a single FD, which is orphaned exactly once in *
* grpc_udp_server_destroy. */
GPR_ASSERT(g_number_of_orphan_calls == 1);
-}
-
-static void destroy_pollset(void* p, grpc_error* error) {
- grpc_pollset_destroy(static_cast<grpc_pollset*>(p));
+ shutdown_and_destroy_pollset();
}
int main(int argc, char** argv) {
- grpc_closure destroyed;
grpc_test_init(argc, argv);
grpc_init();
{
grpc_core::ExecCtx exec_ctx;
g_pollset = static_cast<grpc_pollset*>(gpr_zalloc(grpc_pollset_size()));
- grpc_pollset_init(g_pollset, &g_mu);
test_no_op();
test_no_op_with_start();
@@ -304,10 +328,6 @@ int main(int argc, char** argv) {
test_receive(1);
test_receive(10);
- GRPC_CLOSURE_INIT(&destroyed, destroy_pollset, g_pollset,
- grpc_schedule_on_exec_ctx);
- grpc_pollset_shutdown(g_pollset, &destroyed);
- grpc_core::ExecCtx::Get()->Flush();
gpr_free(g_pollset);
}
grpc_shutdown();
diff --git a/test/cpp/codegen/BUILD b/test/cpp/codegen/BUILD
index 6cc81e3398..1388dbc650 100644
--- a/test/cpp/codegen/BUILD
+++ b/test/cpp/codegen/BUILD
@@ -14,7 +14,7 @@
licenses(["notice"]) # Apache v2
-load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package")
+load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package", "grpc_cc_binary", "grpc_sh_test")
grpc_package(name = "test/cpp/codegen")
@@ -55,14 +55,10 @@ grpc_cc_test(
],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "golden_file_test",
+ testonly = True,
srcs = ["golden_file_test.cc"],
- args = ["--generated_file_path=$(GENDIR)/src/proto/grpc/testing/"],
- data = [
- ":compiler_test_golden",
- "//src/proto/grpc/testing:_compiler_test_proto_grpc_codegen",
- ],
deps = [
"//:grpc++",
"//src/proto/grpc/testing:compiler_test_proto",
@@ -73,3 +69,14 @@ grpc_cc_test(
"gflags",
],
)
+
+grpc_sh_test(
+ name = "run_golden_file_test",
+ srcs = ["run_golden_file_test.sh"],
+ data = [
+ ":golden_file_test",
+ ":compiler_test_golden",
+ ":compiler_test_mock_golden",
+ "//src/proto/grpc/testing:_compiler_test_proto_grpc_codegen",
+ ],
+)
diff --git a/test/cpp/codegen/golden_file_test.cc b/test/cpp/codegen/golden_file_test.cc
index 14880982b5..7e4d15a7c9 100644
--- a/test/cpp/codegen/golden_file_test.cc
+++ b/test/cpp/codegen/golden_file_test.cc
@@ -22,6 +22,13 @@
#include <gflags/gflags.h>
#include <gtest/gtest.h>
+// In some distros, gflags is in the namespace google, and in some others,
+// in gflags. This hack is enabling us to find both.
+namespace google {}
+namespace gflags {}
+using namespace google;
+using namespace gflags;
+
DEFINE_string(
generated_file_path, "",
"path to the directory containing generated files compiler_test.grpc.pb.h"
@@ -60,7 +67,7 @@ TEST(GoldenMockFileTest, TestGeneratedMockFile) {
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
- ::google::ParseCommandLineFlags(&argc, &argv, true);
+ ParseCommandLineFlags(&argc, &argv, true);
if (FLAGS_generated_file_path.empty()) {
FLAGS_generated_file_path = "gens/src/proto/grpc/testing/";
}
diff --git a/test/cpp/codegen/run_golden_file_test.sh b/test/cpp/codegen/run_golden_file_test.sh
new file mode 100755
index 0000000000..cdfaa96a1c
--- /dev/null
+++ b/test/cpp/codegen/run_golden_file_test.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+GENERATED_FILES_PATH="$TEST_SRCDIR/../../../../../genfiles/src/proto/grpc/testing/"
+test/cpp/codegen/golden_file_test --generated_file_path="$GENERATED_FILES_PATH"
diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc
index e83a6e675e..c6e9577f0c 100644
--- a/test/cpp/end2end/client_lb_end2end_test.cc
+++ b/test/cpp/end2end/client_lb_end2end_test.cc
@@ -28,6 +28,7 @@
#include <grpc++/server_builder.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
+#include <grpc/support/atm.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/thd.h>
@@ -35,6 +36,7 @@
#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
#include "src/core/ext/filters/client_channel/subchannel_index.h"
+#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/support/env.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
@@ -48,10 +50,33 @@ using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
using std::chrono::system_clock;
+// defined in tcp_client_posix.c
+extern void (*grpc_tcp_client_connect_impl)(
+ grpc_closure* closure, grpc_endpoint** ep,
+ grpc_pollset_set* interested_parties, const grpc_channel_args* channel_args,
+ const grpc_resolved_address* addr, grpc_millis deadline);
+
+const auto original_tcp_connect_fn = grpc_tcp_client_connect_impl;
+
namespace grpc {
namespace testing {
namespace {
+gpr_atm g_connection_delay_ms;
+
+void tcp_client_connect_with_delay(grpc_closure* closure, grpc_endpoint** ep,
+ grpc_pollset_set* interested_parties,
+ const grpc_channel_args* channel_args,
+ const grpc_resolved_address* addr,
+ grpc_millis deadline) {
+ const int delay_ms = gpr_atm_acq_load(&g_connection_delay_ms);
+ if (delay_ms > 0) {
+ gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(delay_ms));
+ }
+ original_tcp_connect_fn(closure, ep, interested_parties, channel_args, addr,
+ deadline + delay_ms);
+}
+
// Subclass of TestServiceImpl that increments a request counter for
// every call to the Echo RPC.
class MyTestServiceImpl : public TestServiceImpl {
@@ -136,22 +161,22 @@ class ClientLbEnd2endTest : public ::testing::Test {
grpc_lb_addresses_destroy(addresses);
}
- void ResetStub(const grpc::string& lb_policy_name = "") {
- ChannelArguments args;
+ std::vector<int> GetServersPorts() {
+ std::vector<int> ports;
+ for (const auto& server : servers_) ports.push_back(server->port_);
+ return ports;
+ }
+
+ void ResetStub(const std::vector<int>& ports,
+ const grpc::string& lb_policy_name,
+ ChannelArguments args = ChannelArguments()) {
if (lb_policy_name.size() > 0) {
args.SetLoadBalancingPolicyName(lb_policy_name);
} // else, default to pick first
args.SetPointer(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR,
response_generator_);
- args.SetInt("grpc.testing.fixed_reconnect_backoff_ms", 2000);
- std::ostringstream uri;
- uri << "fake:///";
- for (size_t i = 0; i < servers_.size() - 1; ++i) {
- uri << "127.0.0.1:" << servers_[i]->port_ << ",";
- }
- uri << "127.0.0.1:" << servers_[servers_.size() - 1]->port_;
channel_ =
- CreateCustomChannel(uri.str(), InsecureChannelCredentials(), args);
+ CreateCustomChannel("fake:///", InsecureChannelCredentials(), args);
stub_ = grpc::testing::EchoTestService::NewStub(channel_);
}
@@ -266,7 +291,7 @@ TEST_F(ClientLbEnd2endTest, PickFirst) {
// Start servers and send one RPC per server.
const int kNumServers = 3;
StartServers(kNumServers);
- ResetStub(); // implicit pick first
+ ResetStub(GetServersPorts(), ""); // test that pick first is the default.
std::vector<int> ports;
for (size_t i = 0; i < servers_.size(); ++i) {
ports.emplace_back(servers_[i]->port_);
@@ -290,11 +315,63 @@ TEST_F(ClientLbEnd2endTest, PickFirst) {
EXPECT_EQ("pick_first", channel_->GetLoadBalancingPolicyName());
}
+TEST_F(ClientLbEnd2endTest, PickFirstBackOffInitialReconnect) {
+ ChannelArguments args;
+ constexpr int kInitialBackOffMs = 100;
+ args.SetInt(GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS, kInitialBackOffMs);
+ const std::vector<int> ports = {grpc_pick_unused_port_or_die()};
+ const gpr_timespec t0 = gpr_now(GPR_CLOCK_MONOTONIC);
+ ResetStub(ports, "pick_first", args);
+ SetNextResolution(ports);
+ // The channel won't become connected (there's no server).
+ ASSERT_FALSE(channel_->WaitForConnected(
+ grpc_timeout_milliseconds_to_deadline(kInitialBackOffMs * 2)));
+ // Bring up a server on the chosen port.
+ StartServers(1, ports);
+ // Now it will.
+ ASSERT_TRUE(channel_->WaitForConnected(
+ grpc_timeout_milliseconds_to_deadline(kInitialBackOffMs * 2)));
+ const gpr_timespec t1 = gpr_now(GPR_CLOCK_MONOTONIC);
+ const grpc_millis waited_ms = gpr_time_to_millis(gpr_time_sub(t1, t0));
+ gpr_log(GPR_DEBUG, "Waited %ld milliseconds", waited_ms);
+ // We should have waited at least kInitialBackOffMs. We substract one to
+ // account for test and precision accuracy drift.
+ EXPECT_GE(waited_ms, kInitialBackOffMs - 1);
+ // But not much more.
+ EXPECT_GT(
+ gpr_time_cmp(
+ grpc_timeout_milliseconds_to_deadline(kInitialBackOffMs * 1.10), t1),
+ 0);
+}
+
+TEST_F(ClientLbEnd2endTest, PickFirstBackOffMinReconnect) {
+ ChannelArguments args;
+ constexpr int kMinReconnectBackOffMs = 1000;
+ args.SetInt(GRPC_ARG_MIN_RECONNECT_BACKOFF_MS, kMinReconnectBackOffMs);
+ const std::vector<int> ports = {grpc_pick_unused_port_or_die()};
+ ResetStub(ports, "pick_first", args);
+ SetNextResolution(ports);
+ // Make connection delay a 10% longer than it's willing to in order to make
+ // sure we are hitting the codepath that waits for the min reconnect backoff.
+ gpr_atm_rel_store(&g_connection_delay_ms, kMinReconnectBackOffMs * 1.10);
+ grpc_tcp_client_connect_impl = tcp_client_connect_with_delay;
+ const gpr_timespec t0 = gpr_now(GPR_CLOCK_MONOTONIC);
+ channel_->WaitForConnected(
+ grpc_timeout_milliseconds_to_deadline(kMinReconnectBackOffMs * 2));
+ const gpr_timespec t1 = gpr_now(GPR_CLOCK_MONOTONIC);
+ const grpc_millis waited_ms = gpr_time_to_millis(gpr_time_sub(t1, t0));
+ gpr_log(GPR_DEBUG, "Waited %ld ms", waited_ms);
+ // We should have waited at least kMinReconnectBackOffMs. We substract one to
+ // account for test and precision accuracy drift.
+ EXPECT_GE(waited_ms, kMinReconnectBackOffMs - 1);
+ gpr_atm_rel_store(&g_connection_delay_ms, 0);
+}
+
TEST_F(ClientLbEnd2endTest, PickFirstUpdates) {
// Start servers and send one RPC per server.
const int kNumServers = 3;
StartServers(kNumServers);
- ResetStub(); // implicit pick first
+ ResetStub(GetServersPorts(), "pick_first");
std::vector<int> ports;
// Perform one RPC against the first server.
@@ -340,7 +417,7 @@ TEST_F(ClientLbEnd2endTest, PickFirstUpdateSuperset) {
// Start servers and send one RPC per server.
const int kNumServers = 3;
StartServers(kNumServers);
- ResetStub(); // implicit pick first
+ ResetStub(GetServersPorts(), "pick_first");
std::vector<int> ports;
// Perform one RPC against the first server.
@@ -370,7 +447,7 @@ TEST_F(ClientLbEnd2endTest, PickFirstManyUpdates) {
// Start servers and send one RPC per server.
const int kNumServers = 3;
StartServers(kNumServers);
- ResetStub(); // implicit pick first
+ ResetStub(GetServersPorts(), "pick_first");
std::vector<int> ports;
for (size_t i = 0; i < servers_.size(); ++i) {
ports.emplace_back(servers_[i]->port_);
@@ -392,7 +469,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobin) {
// Start servers and send one RPC per server.
const int kNumServers = 3;
StartServers(kNumServers);
- ResetStub("round_robin");
+ ResetStub(GetServersPorts(), "round_robin");
std::vector<int> ports;
for (const auto& server : servers_) {
ports.emplace_back(server->port_);
@@ -423,7 +500,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobinUpdates) {
// Start servers and send one RPC per server.
const int kNumServers = 3;
StartServers(kNumServers);
- ResetStub("round_robin");
+ ResetStub(GetServersPorts(), "round_robin");
std::vector<int> ports;
// Start with a single server.
@@ -506,7 +583,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobinUpdates) {
TEST_F(ClientLbEnd2endTest, RoundRobinUpdateInError) {
const int kNumServers = 3;
StartServers(kNumServers);
- ResetStub("round_robin");
+ ResetStub(GetServersPorts(), "round_robin");
std::vector<int> ports;
// Start with a single server.
@@ -538,7 +615,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobinManyUpdates) {
// Start servers and send one RPC per server.
const int kNumServers = 3;
StartServers(kNumServers);
- ResetStub("round_robin");
+ ResetStub(GetServersPorts(), "round_robin");
std::vector<int> ports;
for (size_t i = 0; i < servers_.size(); ++i) {
ports.emplace_back(servers_[i]->port_);
@@ -565,7 +642,7 @@ TEST_F(ClientLbEnd2endTest, RoundRobinReresolve) {
ports.push_back(grpc_pick_unused_port_or_die());
}
StartServers(kNumServers, ports);
- ResetStub("round_robin");
+ ResetStub(GetServersPorts(), "round_robin");
SetNextResolution(ports);
// Send a number of RPCs, which succeed.
for (size_t i = 0; i < 100; ++i) {
diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc
index 61f4111e3b..175ecea2b3 100644
--- a/test/cpp/end2end/mock_test.cc
+++ b/test/cpp/end2end/mock_test.cc
@@ -43,7 +43,6 @@
#include <iostream>
-using namespace std;
using ::testing::AtLeast;
using ::testing::DoAll;
using ::testing::Invoke;
@@ -57,6 +56,7 @@ using grpc::testing::EchoResponse;
using grpc::testing::EchoTestService;
using grpc::testing::MockClientReaderWriter;
using std::chrono::system_clock;
+using std::vector;
namespace grpc {
namespace testing {
diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc
index af97fe0940..d2192f5e70 100644
--- a/test/cpp/interop/interop_client.cc
+++ b/test/cpp/interop/interop_client.cc
@@ -122,7 +122,8 @@ InteropClient::InteropClient(std::shared_ptr<Channel> channel,
: serviceStub_(channel, new_stub_every_test_case),
do_not_abort_on_transient_failures_(do_not_abort_on_transient_failures) {}
-bool InteropClient::AssertStatusOk(const Status& s) {
+bool InteropClient::AssertStatusOk(const Status& s,
+ const grpc::string& optional_debug_string) {
if (s.ok()) {
return true;
}
@@ -131,17 +132,21 @@ bool InteropClient::AssertStatusOk(const Status& s) {
// already checked for s.ok() above). So, the following will call abort()
// (unless s.error_code() corresponds to a transient failure and
// 'do_not_abort_on_transient_failures' is true)
- return AssertStatusCode(s, StatusCode::OK);
+ return AssertStatusCode(s, StatusCode::OK, optional_debug_string);
}
-bool InteropClient::AssertStatusCode(const Status& s,
- StatusCode expected_code) {
+bool InteropClient::AssertStatusCode(
+ const Status& s, StatusCode expected_code,
+ const grpc::string& optional_debug_string) {
if (s.error_code() == expected_code) {
return true;
}
- gpr_log(GPR_ERROR, "Error status code: %d (expected: %d), message: %s",
- s.error_code(), expected_code, s.error_message().c_str());
+ gpr_log(GPR_ERROR,
+ "Error status code: %d (expected: %d), message: %s,"
+ " debug string: %s",
+ s.error_code(), expected_code, s.error_message().c_str(),
+ optional_debug_string.c_str());
// In case of transient transient/retryable failures (like a broken
// connection) we may or may not abort (see TransientFailureOrAbort())
@@ -161,7 +166,7 @@ bool InteropClient::DoEmpty() {
Status s = serviceStub_.Get()->EmptyCall(&context, request, &response);
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -191,7 +196,7 @@ bool InteropClient::PerformLargeUnary(SimpleRequest* request,
}
Status s = serviceStub_.Get()->UnaryCall(&context, *request, response);
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -241,7 +246,7 @@ bool InteropClient::DoOauth2AuthToken(const grpc::string& username,
Status s = serviceStub_.Get()->UnaryCall(&context, request, &response);
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -269,7 +274,7 @@ bool InteropClient::DoPerRpcCreds(const grpc::string& json_key) {
Status s = serviceStub_.Get()->UnaryCall(&context, request, &response);
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -412,7 +417,7 @@ bool InteropClient::DoRequestStreaming() {
GPR_ASSERT(stream->WritesDone());
Status s = stream->Finish();
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -451,7 +456,7 @@ bool InteropClient::DoResponseStreaming() {
}
Status s = stream->Finish();
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -516,7 +521,7 @@ bool InteropClient::DoClientCompressedStreaming() {
GPR_ASSERT(stream->WritesDone());
s = stream->Finish();
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -578,7 +583,7 @@ bool InteropClient::DoServerCompressedStreaming() {
}
Status s = stream->Finish();
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
return true;
@@ -619,7 +624,7 @@ bool InteropClient::DoResponseStreamingWithSlowConsumer() {
}
Status s = stream->Finish();
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -666,7 +671,7 @@ bool InteropClient::DoHalfDuplex() {
}
Status s = stream->Finish();
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -710,7 +715,7 @@ bool InteropClient::DoPingPong() {
GPR_ASSERT(!stream->Read(&response));
Status s = stream->Finish();
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -732,7 +737,8 @@ bool InteropClient::DoCancelAfterBegin() {
context.TryCancel();
Status s = stream->Finish();
- if (!AssertStatusCode(s, StatusCode::CANCELLED)) {
+ if (!AssertStatusCode(s, StatusCode::CANCELLED,
+ context.debug_error_string())) {
return false;
}
@@ -790,7 +796,8 @@ bool InteropClient::DoTimeoutOnSleepingServer() {
stream->Write(request);
Status s = stream->Finish();
- if (!AssertStatusCode(s, StatusCode::DEADLINE_EXCEEDED)) {
+ if (!AssertStatusCode(s, StatusCode::DEADLINE_EXCEEDED,
+ context.debug_error_string())) {
return false;
}
@@ -810,7 +817,7 @@ bool InteropClient::DoEmptyStream() {
GPR_ASSERT(stream->Read(&response) == false);
Status s = stream->Finish();
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -833,7 +840,8 @@ bool InteropClient::DoStatusWithMessage() {
requested_status->set_code(test_code);
requested_status->set_message(test_msg);
Status s = serviceStub_.Get()->UnaryCall(&context, request, &response);
- if (!AssertStatusCode(s, grpc::StatusCode::UNKNOWN)) {
+ if (!AssertStatusCode(s, grpc::StatusCode::UNKNOWN,
+ context.debug_error_string())) {
return false;
}
GPR_ASSERT(s.error_message() == test_msg);
@@ -853,7 +861,8 @@ bool InteropClient::DoStatusWithMessage() {
while (stream->Read(&streaming_response))
;
s = stream->Finish();
- if (!AssertStatusCode(s, grpc::StatusCode::UNKNOWN)) {
+ if (!AssertStatusCode(s, grpc::StatusCode::UNKNOWN,
+ context.debug_error_string())) {
return false;
}
GPR_ASSERT(s.error_message() == test_msg);
@@ -880,7 +889,7 @@ bool InteropClient::DoCacheableUnary() {
context1.AddMetadata("x-user-ip", "1.2.3.4");
Status s1 =
serviceStub_.Get()->CacheableUnaryCall(&context1, request, &response1);
- if (!AssertStatusOk(s1)) {
+ if (!AssertStatusOk(s1, context1.debug_error_string())) {
return false;
}
gpr_log(GPR_DEBUG, "response 1 payload: %s",
@@ -893,7 +902,7 @@ bool InteropClient::DoCacheableUnary() {
context2.AddMetadata("x-user-ip", "1.2.3.4");
Status s2 =
serviceStub_.Get()->CacheableUnaryCall(&context2, request, &response2);
- if (!AssertStatusOk(s2)) {
+ if (!AssertStatusOk(s2, context2.debug_error_string())) {
return false;
}
gpr_log(GPR_DEBUG, "response 2 payload: %s",
@@ -915,7 +924,7 @@ bool InteropClient::DoCacheableUnary() {
context3.AddMetadata("x-user-ip", "1.2.3.4");
Status s3 =
serviceStub_.Get()->CacheableUnaryCall(&context3, request1, &response3);
- if (!AssertStatusOk(s3)) {
+ if (!AssertStatusOk(s3, context3.debug_error_string())) {
return false;
}
gpr_log(GPR_DEBUG, "response 3 payload: %s",
@@ -946,7 +955,7 @@ bool InteropClient::DoCustomMetadata() {
request.mutable_payload()->set_body(payload.c_str(), kLargeRequestSize);
Status s = serviceStub_.Get()->UnaryCall(&context, request, &response);
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -997,7 +1006,7 @@ bool InteropClient::DoCustomMetadata() {
GPR_ASSERT(!stream->Read(&response));
Status s = stream->Finish();
- if (!AssertStatusOk(s)) {
+ if (!AssertStatusOk(s, context.debug_error_string())) {
return false;
}
@@ -1028,7 +1037,8 @@ bool InteropClient::DoUnimplementedService() {
Status s = stub->UnimplementedCall(&context, request, &response);
- if (!AssertStatusCode(s, StatusCode::UNIMPLEMENTED)) {
+ if (!AssertStatusCode(s, StatusCode::UNIMPLEMENTED,
+ context.debug_error_string())) {
return false;
}
@@ -1046,7 +1056,8 @@ bool InteropClient::DoUnimplementedMethod() {
Status s =
serviceStub_.Get()->UnimplementedCall(&context, request, &response);
- if (!AssertStatusCode(s, StatusCode::UNIMPLEMENTED)) {
+ if (!AssertStatusCode(s, StatusCode::UNIMPLEMENTED,
+ context.debug_error_string())) {
return false;
}
diff --git a/test/cpp/interop/interop_client.h b/test/cpp/interop/interop_client.h
index 57e8ba63f5..b8bb134c20 100644
--- a/test/cpp/interop/interop_client.h
+++ b/test/cpp/interop/interop_client.h
@@ -103,8 +103,10 @@ class InteropClient {
/// Run \a custom_check_fn as an additional check.
bool PerformLargeUnary(SimpleRequest* request, SimpleResponse* response,
CheckerFn custom_checks_fn);
- bool AssertStatusOk(const Status& s);
- bool AssertStatusCode(const Status& s, StatusCode expected_code);
+ bool AssertStatusOk(const Status& s,
+ const grpc::string& optional_debug_string);
+ bool AssertStatusCode(const Status& s, StatusCode expected_code,
+ const grpc::string& optional_debug_string);
bool TransientFailureOrAbort();
ServiceStub serviceStub_;
diff --git a/test/cpp/qps/gen_build_yaml.py b/test/cpp/qps/gen_build_yaml.py
index 1ef8f65b0b..bd40d0a5a2 100755
--- a/test/cpp/qps/gen_build_yaml.py
+++ b/test/cpp/qps/gen_build_yaml.py
@@ -101,24 +101,26 @@ print yaml.dump({
}
for scenario_json in scenario_config.CXXLanguage().scenarios()
if 'inproc' in scenario_json.get('CATEGORIES', [])
- ] + [
- {
- 'name': 'json_run_localhost',
- 'shortname': 'json_run_localhost:%s_low_thread_count' % scenario_json['name'],
- 'args': ['--scenarios_json', _scenario_json_string(scenario_json, True)],
- 'ci_platforms': ['linux'],
- 'platforms': ['linux'],
- 'flaky': False,
- 'language': 'c++',
- 'boringssl': True,
- 'defaults': 'boringssl',
- 'cpu_cost': guess_cpu(scenario_json, True),
- 'exclude_configs': sorted(c for c in configs_from_yaml if c not in ('tsan', 'asan')),
- 'timeout_seconds': 10*60,
- 'excluded_poll_engines': scenario_json.get('EXCLUDED_POLL_ENGINES', []),
- 'auto_timeout_scaling': False
- }
- for scenario_json in scenario_config.CXXLanguage().scenarios()
- if 'scalable' in scenario_json.get('CATEGORIES', [])
]
+ # Disabled until https://github.com/grpc/grpc/issues/13122 is resolved.
+ # + [
+ # {
+ # 'name': 'json_run_localhost',
+ # 'shortname': 'json_run_localhost:%s_low_thread_count' % scenario_json['name'],
+ # 'args': ['--scenarios_json', _scenario_json_string(scenario_json, True)],
+ # 'ci_platforms': ['linux'],
+ # 'platforms': ['linux'],
+ # 'flaky': False,
+ # 'language': 'c++',
+ # 'boringssl': True,
+ # 'defaults': 'boringssl',
+ # 'cpu_cost': guess_cpu(scenario_json, True),
+ # 'exclude_configs': sorted(c for c in configs_from_yaml if c not in ('tsan', 'asan')),
+ # 'timeout_seconds': 10*60,
+ # 'excluded_poll_engines': scenario_json.get('EXCLUDED_POLL_ENGINES', []),
+ # 'auto_timeout_scaling': False
+ # }
+ # for scenario_json in scenario_config.CXXLanguage().scenarios()
+ # if 'scalable' in scenario_json.get('CATEGORIES', [])
+ # ]
})
diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile
index e4a2972c0e..6e5a133a69 100644
--- a/tools/dockerfile/test/sanity/Dockerfile
+++ b/tools/dockerfile/test/sanity/Dockerfile
@@ -81,7 +81,8 @@ RUN apt-get update && apt-get install -y \
libtool \
curl \
python-virtualenv \
- python-lxml
+ python-lxml \
+ shellcheck
RUN pip install simplejson mako
#======================================
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 06a5dae6a5..32de3fa977 100755
--- a/tools/run_tests/dockerize/build_docker_and_run_tests.sh
+++ b/tools/run_tests/dockerize/build_docker_and_run_tests.sh
@@ -66,6 +66,7 @@ docker run \
-e "BUILD_ID=$BUILD_ID" \
-e "BUILD_URL=$BUILD_URL" \
-e "JOB_BASE_NAME=$JOB_BASE_NAME" \
+ -e "KOKORO_BUILD_ID=$KOKORO_BUILD_ID" \
-e "KOKORO_BUILD_NUMBER=$KOKORO_BUILD_NUMBER" \
-e "KOKORO_BUILD_URL=$KOKORO_BUILD_URL" \
-e "KOKORO_JOB_NAME=$KOKORO_JOB_NAME" \
diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json
index 19f54948a8..0fc5a25afd 100644
--- a/tools/run_tests/generated/sources_and_headers.json
+++ b/tools/run_tests/generated/sources_and_headers.json
@@ -104,23 +104,6 @@
"gpr",
"gpr_test_util",
"grpc",
- "grpc_test_util"
- ],
- "headers": [],
- "is_filegroup": false,
- "language": "c",
- "name": "backoff_test",
- "src": [
- "test/core/backoff/backoff_test.cc"
- ],
- "third_party": false,
- "type": "target"
- },
- {
- "deps": [
- "gpr",
- "gpr_test_util",
- "grpc",
"grpc_test_util",
"test_tcp_server"
],
@@ -2502,6 +2485,23 @@
"gpr",
"gpr_test_util",
"grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "is_filegroup": false,
+ "language": "c++",
+ "name": "backoff_test",
+ "src": [
+ "test/core/backoff/backoff_test.cc"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
"grpc++",
"grpc++_test_util",
"grpc_test_util"
diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json
index f8985b67d0..5cf371190c 100644
--- a/tools/run_tests/generated/tests.json
+++ b/tools/run_tests/generated/tests.json
@@ -132,30 +132,6 @@
],
"cpu_cost": 1.0,
"exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "gtest": false,
- "language": "c",
- "name": "backoff_test",
- "platforms": [
- "linux",
- "mac",
- "posix",
- "windows"
- ],
- "uses_polling": false
- },
- {
- "args": [],
- "benchmark": false,
- "ci_platforms": [
- "linux",
- "mac",
- "posix",
- "windows"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
@@ -2974,6 +2950,30 @@
"flaky": false,
"gtest": false,
"language": "c++",
+ "name": "backoff_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [],
+ "benchmark": false,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "exclude_iomgrs": [],
+ "flaky": false,
+ "gtest": false,
+ "language": "c++",
"name": "bdp_estimator_test",
"platforms": [
"linux",
@@ -51291,3017 +51291,6 @@
},
{
"args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_1channel_100rpcs_1MB\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 1048576, \"req_size\": 1048576}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_1channel_100rpcs_1MB_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_from_client_1channel_1MB\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"payload_config\": {\"simple_params\": {\"resp_size\": 1048576, \"req_size\": 1048576}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_1channel_1MB_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_75Kqps_600channel_60Krpcs_300Breq_50Bresp\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 16, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 1, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 50, \"req_size\": 300}}, \"client_channels\": 300, \"threads_per_cq\": 0, \"load_params\": {\"poisson\": {\"offered_load\": 37500}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_75Kqps_600channel_60Krpcs_300Breq_50Bresp_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0}, \"num_clients\": 1, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_ping_pong_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_1mps_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"messages_per_stream\": 1, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_unconstrained_1mps_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_10mps_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"messages_per_stream\": 10, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_unconstrained_10mps_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_1channel_1MBmsg_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 1048576, \"req_size\": 1048576}}, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 1048576, \"req_size\": 1048576}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_1channel_1MBmsg_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_64KBmsg_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_unconstrained_64KBmsg_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_1cq_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 1000000}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_unconstrained_1cq_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 2}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 2, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_unconstrained_2waysharedcq_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_1cq_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_1cq_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 2, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 2, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_2waysharedcq_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_1cq_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_qps_unconstrained_1cq_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_2waysharedcq_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 2, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 2, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_qps_unconstrained_2waysharedcq_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_one_server_core_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_servers\": 1, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 10, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": [
- "poll-cv"
- ],
- "flaky": false,
- "language": "c++",
- "name": "json_run_localhost",
- "platforms": [
- "linux"
- ],
- "shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 8388608, \"req_size\": 128}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_client_unary_1channel_64wide_128Breq_8MBresp_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_servers\": 1, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 10, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": [
- "poll-cv"
- ],
- "flaky": false,
- "language": "c++",
- "name": "json_run_localhost",
- "platforms": [
- "linux"
- ],
- "shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_ping_pong_secure_1MB\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 1048576, \"req_size\": 1048576}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_ping_pong_secure_1MB_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_ping_pong_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 3, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_ping_pong_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 3, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_ping_pong_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 3, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_qps_unconstrained_1mps_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"messages_per_stream\": 1, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_1mps_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_qps_unconstrained_10mps_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"messages_per_stream\": 10, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_10mps_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_ping_pong_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 3, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_1mps_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"messages_per_stream\": 1, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_1mps_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_10mps_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"messages_per_stream\": 10, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_10mps_secure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 3, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 3, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 3, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 3, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": null, \"threads_per_cq\": 0}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": null, \"threads_per_cq\": 0}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_1mps_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": null, \"threads_per_cq\": 0}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"messages_per_stream\": 1, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_unconstrained_1mps_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_10mps_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": null, \"threads_per_cq\": 0}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"messages_per_stream\": 10, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_unconstrained_10mps_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_1channel_1MBmsg_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 1048576, \"req_size\": 1048576}}, \"security_params\": null, \"threads_per_cq\": 0}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 1048576, \"req_size\": 1048576}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_1channel_1MBmsg_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_64KBmsg_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"security_params\": null, \"threads_per_cq\": 0}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_unconstrained_64KBmsg_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_1cq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": null, \"threads_per_cq\": 1000000}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_unconstrained_1cq_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": null, \"threads_per_cq\": 2}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 2, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_unconstrained_2waysharedcq_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_1cq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_1cq_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 2, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 2, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_2waysharedcq_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_1cq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_qps_unconstrained_1cq_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_2waysharedcq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 2, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 2, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_qps_unconstrained_2waysharedcq_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": null, \"threads_per_cq\": 0}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_generic_async_streaming_qps_one_server_core_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_servers\": 1, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 10, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": [
- "poll-cv"
- ],
- "flaky": false,
- "language": "c++",
- "name": "json_run_localhost",
- "platforms": [
- "linux"
- ],
- "shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 8388608, \"req_size\": 128}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_client_unary_1channel_64wide_128Breq_8MBresp_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_servers\": 1, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 10, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": [
- "poll-cv"
- ],
- "flaky": false,
- "language": "c++",
- "name": "json_run_localhost",
- "platforms": [
- "linux"
- ],
- "shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_ping_pong_insecure_1MB\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 1048576, \"req_size\": 1048576}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_ping_pong_insecure_1MB_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 3, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 3, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_unary_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 3, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_qps_unconstrained_1mps_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"messages_per_stream\": 1, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_1mps_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_qps_unconstrained_10mps_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"messages_per_stream\": 10, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_10mps_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 3, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_1mps_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"messages_per_stream\": 1, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_1mps_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "args": [
- "--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_10mps_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"messages_per_stream\": 10, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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_qps_unconstrained_10mps_insecure_low_thread_count",
- "timeout_seconds": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 3, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 3, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING_FROM_CLIENT\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 3, \"server_type\": \"SYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"SYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 0, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"latency\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"threads_per_cq\": 0, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "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, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"security_params\": null, \"threads_per_cq\": 3, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}, {\"int_value\": 1, \"name\": \"grpc.minimal_stack\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING_FROM_SERVER\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 3, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
- ],
- "auto_timeout_scaling": false,
- "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": 600
- },
- {
- "args": [
"test/core/end2end/fuzzers/api_fuzzer_corpus/00.bin"
],
"ci_platforms": [
diff --git a/tools/run_tests/python_utils/upload_test_results.py b/tools/run_tests/python_utils/upload_test_results.py
index 9eb8e2a862..a2dd1c66cf 100644
--- a/tools/run_tests/python_utils/upload_test_results.py
+++ b/tools/run_tests/python_utils/upload_test_results.py
@@ -72,7 +72,10 @@ def _get_build_metadata(test_results):
variables set by Jenkins/Kokoro.
"""
build_id = os.getenv('BUILD_ID') or os.getenv('KOKORO_BUILD_NUMBER')
- build_url = os.getenv('BUILD_URL') or os.getenv('KOKORO_BUILD_URL')
+ build_url = os.getenv('BUILD_URL')
+ if os.getenv('KOKORO_BUILD_ID'):
+ build_url = 'https://sponge.corp.google.com/invocation?id=%s' % os.getenv(
+ 'KOKORO_BUILD_ID')
job_name = os.getenv('JOB_BASE_NAME') or os.getenv('KOKORO_JOB_NAME')
if build_id:
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index bd5b8644b3..3aa9eb87c7 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -385,7 +385,9 @@ class CLanguage(object):
shortname='%s %s' % (' '.join(cmdline),
shortname_ext),
cpu_cost=cpu_cost,
- timeout_seconds=_DEFAULT_TIMEOUT_SECONDS *
+ timeout_seconds=target.get(
+ 'timeout_seconds',
+ _DEFAULT_TIMEOUT_SECONDS) *
timeout_scaling,
environ=env))
elif 'gtest' in target and target['gtest']:
diff --git a/tools/run_tests/sanity/check_clang_tidy.sh b/tools/run_tests/sanity/check_clang_tidy.sh
index 42ab511a20..6c4caa1ee6 100755
--- a/tools/run_tests/sanity/check_clang_tidy.sh
+++ b/tools/run_tests/sanity/check_clang_tidy.sh
@@ -16,6 +16,6 @@
set -e
make buildtests \
- -j `python -c 'import multiprocessing; print multiprocessing.cpu_count()'`
-find src/core src/cpp test/core test/cpp -name '*.h' -or -name '*.cc' | \
- xargs tools/distrib/run_clang_tidy.py $*
+ -j "$(python -c 'import multiprocessing; print multiprocessing.cpu_count()')"
+find src/core src/cpp test/core test/cpp -print0 -name '*.h' -or -name '*.cc' \
+ | xargs -0 tools/distrib/run_clang_tidy.py "$@"
diff --git a/tools/run_tests/sanity/check_owners.sh b/tools/run_tests/sanity/check_owners.sh
index b681fed1bb..de0e092578 100755
--- a/tools/run_tests/sanity/check_owners.sh
+++ b/tools/run_tests/sanity/check_owners.sh
@@ -18,12 +18,12 @@ set -e
export TEST=true
-cd `dirname $0`/../../..
+cd "$(dirname "$0")/../../.."
owners=.github/CODEOWNERS
-want_owners=`mktemp /tmp/submXXXXXX`
+want_owners=$(mktemp /tmp/submXXXXXX)
-tools/mkowners/mkowners.py -o $want_owners
-diff -u $owners $want_owners
+tools/mkowners/mkowners.py -o "$want_owners"
+diff -u "$owners" "$want_owners"
-rm $want_owners
+rm "$want_owners"
diff --git a/tools/run_tests/sanity/check_shellcheck.sh b/tools/run_tests/sanity/check_shellcheck.sh
new file mode 100755
index 0000000000..f2cba1892b
--- /dev/null
+++ b/tools/run_tests/sanity/check_shellcheck.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+set -e
+
+ROOT="$(dirname "$0")/../../.."
+
+DIRS=(
+ 'tools/run_tests/helper_scripts'
+ 'tools/run_tests/sanity'
+)
+
+for dir in "${DIRS[@]}"; do
+ find "$ROOT/$dir/" -name "*.sh" -type f -print0 | xargs -n1 -0 shellcheck
+done
diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh
index b573d21f4f..ca604c6e52 100755
--- a/tools/run_tests/sanity/check_submodules.sh
+++ b/tools/run_tests/sanity/check_submodules.sh
@@ -19,13 +19,13 @@ set -e
export TEST=true
-cd `dirname $0`/../../..
+cd "$(dirname "$0")/../../.."
-submodules=`mktemp /tmp/submXXXXXX`
-want_submodules=`mktemp /tmp/submXXXXXX`
+submodules=$(mktemp /tmp/submXXXXXX)
+want_submodules=$(mktemp /tmp/submXXXXXX)
-git submodule | awk '{ print $1 }' | sort > $submodules
-cat << EOF | awk '{ print $1 }' | sort > $want_submodules
+git submodule | awk '{ print $1 }' | sort > "$submodules"
+cat << EOF | awk '{ print $1 }' | sort > "$want_submodules"
5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8 third_party/benchmark (v1.2.0)
be2ee342d3781ddb954f91f8a7e660c6f59e87e5 third_party/boringssl (heads/chromium-stable)
886e7d75368e3f4fab3f4d0d3584e4abfc557755 third_party/boringssl-with-bazel (version_for_cocoapods_7.0-857-g886e7d7)
@@ -38,6 +38,6 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules
cc4bed2d74f7c8717e31f9579214ab52a9c9c610 third_party/abseil-cpp
EOF
-diff -u $submodules $want_submodules
+diff -u "$submodules" "$want_submodules"
-rm $submodules $want_submodules
+rm "$submodules" "$want_submodules"
diff --git a/tools/run_tests/sanity/check_unsecure.sh b/tools/run_tests/sanity/check_unsecure.sh
index 8584cbe36b..cca1235479 100755
--- a/tools/run_tests/sanity/check_unsecure.sh
+++ b/tools/run_tests/sanity/check_unsecure.sh
@@ -18,10 +18,10 @@ set -e
# Make sure that there is no path from known unsecure libraries and targets
# to an SSL library. Any failure among these will make the script fail.
-test `bazel query 'somepath("//:grpc_unsecure", "//external:libssl")' 2>/dev/null | wc -l` -eq 0 || exit 1
-test `bazel query 'somepath("//:grpc++_unsecure", "//external:libssl")' 2>/dev/null | wc -l` -eq 0 || exit 1
-test `bazel query 'somepath("//:grpc++_codegen_proto", "//external:libssl")' 2>/dev/null | wc -l` -eq 0 || exit 1
-test `bazel query 'somepath("//test/cpp/microbenchmarks:helpers", "//external:libssl")' 2>/dev/null | wc -l` -eq 0 || exit 1
+test "$(bazel query 'somepath("//:grpc_unsecure", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1
+test "$(bazel query 'somepath("//:grpc++_unsecure", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1
+test "$(bazel query 'somepath("//:grpc++_codegen_proto", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1
+test "$(bazel query 'somepath("//test/cpp/microbenchmarks:helpers", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1
exit 0
diff --git a/tools/run_tests/sanity/core_untyped_structs.sh b/tools/run_tests/sanity/core_untyped_structs.sh
index 792dd68fdd..af319096fd 100755
--- a/tools/run_tests/sanity/core_untyped_structs.sh
+++ b/tools/run_tests/sanity/core_untyped_structs.sh
@@ -15,7 +15,7 @@
set -e
-cd `dirname $0`/../../..
+cd "$(dirname "$0")/../../.."
#
# Make sure that all core struct/unions have a name or are typedef'ed
diff --git a/tools/run_tests/sanity/sanity_tests.yaml b/tools/run_tests/sanity/sanity_tests.yaml
index 3ce864a8bd..dab991a7b1 100644
--- a/tools/run_tests/sanity/sanity_tests.yaml
+++ b/tools/run_tests/sanity/sanity_tests.yaml
@@ -3,6 +3,7 @@
- script: tools/run_tests/sanity/check_cache_mk.sh
- script: tools/run_tests/sanity/check_owners.sh
- script: tools/run_tests/sanity/check_sources_and_headers.py
+- script: tools/run_tests/sanity/check_shellcheck.sh
- script: tools/run_tests/sanity/check_submodules.sh
- script: tools/run_tests/sanity/check_test_filtering.py
- script: tools/run_tests/sanity/check_tracer_sanity.py