diff --git a/BUILD b/BUILD
index aa12700818b..551fa947de3 100644
--- a/BUILD
+++ b/BUILD
@@ -527,13 +527,13 @@ grpc_cc_library(
"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/bdp_estimator.c",
"src/core/lib/transport/service_config.c",
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/status_conversion.c",
@@ -634,6 +634,7 @@ grpc_cc_library(
"src/core/lib/surface/lame_client.h",
"src/core/lib/surface/server.h",
"src/core/lib/surface/validate_metadata.h",
+ "src/core/lib/transport/bdp_estimator.h",
"src/core/lib/transport/byte_stream.h",
"src/core/lib/transport/connectivity_state.h",
"src/core/lib/transport/error_utils.h",
@@ -641,7 +642,6 @@ grpc_cc_library(
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/pid_controller.h",
- "src/core/lib/transport/bdp_estimator.h",
"src/core/lib/transport/service_config.h",
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/status_conversion.h",
@@ -657,6 +657,7 @@ grpc_cc_library(
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
+ "include/grpc/load_reporting.h",
"include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h",
@@ -870,8 +871,8 @@ grpc_cc_library(
"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/secure_endpoint.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",
@@ -894,8 +895,8 @@ grpc_cc_library(
"src/core/lib/security/credentials/plugin/plugin_credentials.h",
"src/core/lib/security/credentials/ssl/ssl_credentials.h",
"src/core/lib/security/transport/auth_filters.h",
- "src/core/lib/security/transport/secure_endpoint.h",
"src/core/lib/security/transport/lb_targets_info.h",
+ "src/core/lib/security/transport/secure_endpoint.h",
"src/core/lib/security/transport/security_connector.h",
"src/core/lib/security/transport/security_handshaker.h",
"src/core/lib/security/transport/tsi_error.h",
@@ -1269,13 +1270,13 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc++_config_proto",
+ external_deps = [
+ "protobuf",
+ ],
language = "c++",
public_hdrs = [
"include/grpc++/impl/codegen/config_protobuf.h",
],
- external_deps = [
- "protobuf",
- ],
)
grpc_cc_library(
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa438e44c6d..12afc1f5394 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1098,6 +1098,7 @@ foreach(_hdr
include/grpc/grpc.h
include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h
+ include/grpc/load_reporting.h
include/grpc/slice.h
include/grpc/slice_buffer.h
include/grpc/status.h
@@ -1375,6 +1376,7 @@ foreach(_hdr
include/grpc/grpc.h
include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h
+ include/grpc/load_reporting.h
include/grpc/slice.h
include/grpc/slice_buffer.h
include/grpc/status.h
@@ -1598,6 +1600,7 @@ foreach(_hdr
include/grpc/grpc.h
include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h
+ include/grpc/load_reporting.h
include/grpc/slice.h
include/grpc/slice_buffer.h
include/grpc/status.h
@@ -1920,6 +1923,7 @@ foreach(_hdr
include/grpc/grpc.h
include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h
+ include/grpc/load_reporting.h
include/grpc/slice.h
include/grpc/slice_buffer.h
include/grpc/status.h
@@ -2574,6 +2578,7 @@ foreach(_hdr
include/grpc/grpc.h
include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h
+ include/grpc/load_reporting.h
include/grpc/slice.h
include/grpc/slice_buffer.h
include/grpc/status.h
@@ -2715,46 +2720,6 @@ endif()
if (gRPC_BUILD_TESTS)
-add_library(grpc++_test
- src/cpp/test/server_context_test_spouse.cc
-)
-
-if(WIN32 AND MSVC)
- set_target_properties(grpc++_test PROPERTIES COMPILE_PDB_NAME "grpc++_test"
- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
- )
- if (gRPC_INSTALL)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_test.pdb
- DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL
- )
- endif()
-endif()
-
-
-target_include_directories(grpc++_test
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
- PRIVATE ${BORINGSSL_ROOT_DIR}/include
- PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${ZLIB_INCLUDE_DIR}
- PRIVATE ${BENCHMARK}/include
- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags/include
- PRIVATE third_party/googletest/include
- PRIVATE third_party/googletest
- PRIVATE ${_gRPC_PROTO_GENS_DIR}
-)
-
-target_link_libraries(grpc++_test
- ${_gRPC_PROTOBUF_LIBRARIES}
- ${_gRPC_ALLTARGETS_LIBRARIES}
- grpc++
-)
-
-
-endif (gRPC_BUILD_TESTS)
-if (gRPC_BUILD_TESTS)
-
add_library(grpc++_test_config
test/cpp/util/test_config_cc.cc
)
@@ -9496,7 +9461,6 @@ target_link_libraries(server_context_test_spouse_test
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
- grpc++_test
grpc++
grpc
gpr_test_util
diff --git a/Makefile b/Makefile
index fa0b9daed72..0c4c9db32a6 100644
--- a/Makefile
+++ b/Makefile
@@ -1261,9 +1261,9 @@ pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc
pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc
ifeq ($(EMBED_OPENSSL),true)
-privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libhttp2_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_chacha_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_spake25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_sign_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_verify_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_gcm_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_newhope_statistical_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_newhope_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_newhope_vectors_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_obj_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a $(LIBDIR)/$(CONFIG)/libbenchmark.a
+privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libhttp2_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_chacha_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_spake25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_sign_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_verify_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_gcm_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_newhope_statistical_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_newhope_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_newhope_vectors_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_obj_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a $(LIBDIR)/$(CONFIG)/libbenchmark.a
else
-privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libhttp2_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libbenchmark.a
+privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libhttp2_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libbenchmark.a
endif
@@ -2902,6 +2902,7 @@ PUBLIC_HEADERS_C += \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
+ include/grpc/load_reporting.h \
include/grpc/slice.h \
include/grpc/slice_buffer.h \
include/grpc/status.h \
@@ -3183,6 +3184,7 @@ PUBLIC_HEADERS_C += \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
+ include/grpc/load_reporting.h \
include/grpc/slice.h \
include/grpc/slice_buffer.h \
include/grpc/status.h \
@@ -3409,6 +3411,7 @@ PUBLIC_HEADERS_C += \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
+ include/grpc/load_reporting.h \
include/grpc/slice.h \
include/grpc/slice_buffer.h \
include/grpc/status.h \
@@ -3712,6 +3715,7 @@ PUBLIC_HEADERS_C += \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
+ include/grpc/load_reporting.h \
include/grpc/slice.h \
include/grpc/slice_buffer.h \
include/grpc/status.h \
@@ -4364,6 +4368,7 @@ PUBLIC_HEADERS_CXX += \
include/grpc/grpc.h \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
+ include/grpc/load_reporting.h \
include/grpc/slice.h \
include/grpc/slice_buffer.h \
include/grpc/status.h \
@@ -4557,55 +4562,6 @@ $(OBJDIR)/$(CONFIG)/src/cpp/ext/proto_server_reflection.o: $(GENDIR)/src/proto/g
$(OBJDIR)/$(CONFIG)/src/cpp/ext/proto_server_reflection_plugin.o: $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc
-LIBGRPC++_TEST_SRC = \
- src/cpp/test/server_context_test_spouse.cc \
-
-PUBLIC_HEADERS_CXX += \
-
-LIBGRPC++_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_TEST_SRC))))
-
-
-ifeq ($(NO_SECURE),true)
-
-# You can't build secure libraries if you don't have OpenSSL.
-
-$(LIBDIR)/$(CONFIG)/libgrpc++_test.a: openssl_dep_error
-
-
-else
-
-ifeq ($(NO_PROTOBUF),true)
-
-# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay.
-
-$(LIBDIR)/$(CONFIG)/libgrpc++_test.a: protobuf_dep_error
-
-
-else
-
-$(LIBDIR)/$(CONFIG)/libgrpc++_test.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_TEST_OBJS)
- $(E) "[AR] Creating $@"
- $(Q) mkdir -p `dirname $@`
- $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_test.a
- $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBGRPC++_TEST_OBJS)
-ifeq ($(SYSTEM),Darwin)
- $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_test.a
-endif
-
-
-
-
-endif
-
-endif
-
-ifneq ($(NO_SECURE),true)
-ifneq ($(NO_DEPS),true)
--include $(LIBGRPC++_TEST_OBJS:.o=.dep)
-endif
-endif
-
-
LIBGRPC++_TEST_CONFIG_SRC = \
test/cpp/util/test_config_cc.cc \
@@ -14672,16 +14628,16 @@ $(BINDIR)/$(CONFIG)/server_context_test_spouse_test: protobuf_dep_error
else
-$(BINDIR)/$(CONFIG)/server_context_test_spouse_test: $(PROTOBUF_DEP) $(SERVER_CONTEXT_TEST_SPOUSE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+$(BINDIR)/$(CONFIG)/server_context_test_spouse_test: $(PROTOBUF_DEP) $(SERVER_CONTEXT_TEST_SPOUSE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.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) $(SERVER_CONTEXT_TEST_SPOUSE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++.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)/server_context_test_spouse_test
+ $(Q) $(LDXX) $(LDFLAGS) $(SERVER_CONTEXT_TEST_SPOUSE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.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)/server_context_test_spouse_test
endif
endif
-$(OBJDIR)/$(CONFIG)/test/cpp/test/server_context_test_spouse_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+$(OBJDIR)/$(CONFIG)/test/cpp/test/server_context_test_spouse_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_server_context_test_spouse_test: $(SERVER_CONTEXT_TEST_SPOUSE_TEST_OBJS:.o=.dep)
@@ -17994,7 +17950,6 @@ src/cpp/common/secure_create_auth_context.cc: $(OPENSSL_DEP)
src/cpp/ext/proto_server_reflection.cc: $(OPENSSL_DEP)
src/cpp/ext/proto_server_reflection_plugin.cc: $(OPENSSL_DEP)
src/cpp/server/secure_server_credentials.cc: $(OPENSSL_DEP)
-src/cpp/test/server_context_test_spouse.cc: $(OPENSSL_DEP)
src/csharp/ext/grpc_csharp_ext.c: $(OPENSSL_DEP)
test/core/bad_client/bad_client.c: $(OPENSSL_DEP)
test/core/bad_ssl/server_common.c: $(OPENSSL_DEP)
diff --git a/build.yaml b/build.yaml
index ad4cdf38ed5..ac9fef70b3d 100644
--- a/build.yaml
+++ b/build.yaml
@@ -165,6 +165,7 @@ filegroups:
- include/grpc/grpc.h
- include/grpc/grpc_posix.h
- include/grpc/grpc_security_constants.h
+ - include/grpc/load_reporting.h
- include/grpc/slice.h
- include/grpc/slice_buffer.h
- include/grpc/status.h
@@ -897,6 +898,12 @@ filegroups:
language: c++
src:
- src/proto/grpc/reflection/v1alpha/reflection.proto
+- name: grpc++_test
+ language: c++
+ public_headers:
+ - include/grpc++/test/server_context_test_spouse.h
+ deps:
+ - grpc++
- name: thrift_util
language: c++
public_headers:
@@ -1144,15 +1151,6 @@ libs:
- grpc++
filegroups:
- grpc++_reflection_proto
-- name: grpc++_test
- build: private
- language: c++
- headers:
- - include/grpc++/test/server_context_test_spouse.h
- src:
- - src/cpp/test/server_context_test_spouse.cc
- deps:
- - grpc++
- name: grpc++_test_config
build: private
language: c++
@@ -3741,11 +3739,12 @@ targets:
- test/cpp/test/server_context_test_spouse_test.cc
deps:
- grpc_test_util
- - grpc++_test
- grpc++
- grpc
- gpr_test_util
- gpr
+ uses:
+ - grpc++_test
- name: server_crash_test
gtest: true
cpu_cost: 0.1
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index 8f9db71a53b..759310346fb 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -162,6 +162,7 @@ Pod::Spec.new do |s|
'include/grpc/grpc.h',
'include/grpc/grpc_posix.h',
'include/grpc/grpc_security_constants.h',
+ 'include/grpc/load_reporting.h',
'include/grpc/slice.h',
'include/grpc/slice_buffer.h',
'include/grpc/status.h',
diff --git a/grpc.def b/grpc.def
index 5ef59ab9561..e387c8b7125 100644
--- a/grpc.def
+++ b/grpc.def
@@ -69,6 +69,7 @@ EXPORTS
grpc_channel_create_registered_call
grpc_call_start_batch
grpc_call_get_peer
+ grpc_call_set_load_reporting_cost_context
grpc_census_call_set_context
grpc_census_call_get_context
grpc_channel_get_target
diff --git a/grpc.gemspec b/grpc.gemspec
index 335021fdc83..82c9d680801 100755
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -143,6 +143,7 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/grpc.h )
s.files += %w( include/grpc/grpc_posix.h )
s.files += %w( include/grpc/grpc_security_constants.h )
+ s.files += %w( include/grpc/load_reporting.h )
s.files += %w( include/grpc/slice.h )
s.files += %w( include/grpc/slice_buffer.h )
s.files += %w( include/grpc/status.h )
diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h
index 8c7fe0809ea..43bbff6ce9c 100644
--- a/include/grpc++/impl/codegen/server_context.h
+++ b/include/grpc++/impl/codegen/server_context.h
@@ -36,6 +36,10 @@
#include
\n" % txt
+ index_html += "%s
\n" % cgi.escape(txt)
def collect_latency(bm_name, args):
"""generate latency profiles"""
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 8b76193cbe1..cfc2b049553 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -80,6 +80,13 @@ def platform_string():
_DEFAULT_TIMEOUT_SECONDS = 5 * 60
+def run_shell_command(cmd, env=None, cwd=None):
+ try:
+ subprocess.check_output(cmd, shell=True, env=env, cwd=cwd)
+ except subprocess.CalledProcessError as e:
+ print("Error while running command '%s'. Exit status %d. Output:\n%s",
+ e.cmd, e.returncode, e.output)
+ raise
# SimpleConfig: just compile with CONFIG=config, and run the binary to test
class Config(object):
@@ -1092,6 +1099,18 @@ def runs_per_test_type(arg_str):
raise argparse.ArgumentTypeError(msg)
+def percent_type(arg_str):
+ pct = float(arg_str)
+ if pct > 100 or pct < 0:
+ raise argparse.ArgumentTypeError(
+ "'%f' is not a valid percentage in the [0, 100] range" % pct)
+ return pct
+
+# This is math.isclose in python >= 3.5
+def isclose(a, b, rel_tol=1e-09, abs_tol=0.0):
+ return abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)
+
+
# parse command line
argp = argparse.ArgumentParser(description='Run grpc tests.')
argp.add_argument('-c', '--config',
@@ -1104,6 +1123,8 @@ argp.add_argument('-r', '--regex', default='.*', type=str)
argp.add_argument('--regex_exclude', default='', type=str)
argp.add_argument('-j', '--jobs', default=multiprocessing.cpu_count(), type=int)
argp.add_argument('-s', '--slowdown', default=1.0, type=float)
+argp.add_argument('-p', '--sample_percent', default=100.0, type=percent_type,
+ help='Run a random sample with that percentage of tests')
argp.add_argument('-f', '--forever',
default=False,
action='store_const',
@@ -1199,7 +1220,7 @@ for spec in args.update_submodules:
cwd = 'third_party/%s' % submodule
def git(cmd, cwd=cwd):
print('in %s: git %s' % (cwd, cmd))
- subprocess.check_call('git %s' % cmd, cwd=cwd, shell=True)
+ run_shell_command('git %s' % cmd, cwd=cwd)
git('fetch')
git('checkout %s' % branch)
git('pull origin %s' % branch)
@@ -1207,7 +1228,7 @@ for spec in args.update_submodules:
need_to_regenerate_projects = True
if need_to_regenerate_projects:
if jobset.platform_string() == 'linux':
- subprocess.check_call('tools/buildgen/generate_projects.sh', shell=True)
+ run_shell_command('tools/buildgen/generate_projects.sh')
else:
print('WARNING: may need to regenerate projects, but since we are not on')
print(' Linux this step is being skipped. Compilation MAY fail.')
@@ -1276,9 +1297,7 @@ if args.use_docker:
if not args.travis:
env['TTY_FLAG'] = '-t' # enables Ctrl-C when not on Jenkins.
- subprocess.check_call(['tools/run_tests/dockerize/build_docker_and_run_tests.sh'],
- shell=True,
- env=env)
+ run_shell_command('tools/run_tests/dockerize/build_docker_and_run_tests.sh', env=env)
sys.exit(0)
_check_arch_option(args.arch)
@@ -1438,8 +1457,18 @@ def _build_and_run(
else:
# whereas otherwise, we want to shuffle things up to give all tests a
# chance to run.
- massaged_one_run = list(one_run) # random.shuffle needs an indexable seq.
- random.shuffle(massaged_one_run) # which it modifies in-place.
+ massaged_one_run = list(one_run) # random.sample needs an indexable seq.
+ num_jobs = len(massaged_one_run)
+ # for a random sample, get as many as indicated by the 'sample_percent'
+ # argument. By default this arg is 100, resulting in a shuffle of all
+ # jobs.
+ sample_size = int(num_jobs * args.sample_percent/100.0)
+ massaged_one_run = random.sample(massaged_one_run, sample_size)
+ if not isclose(args.sample_percent, 100.0):
+ print("Running %d tests out of %d (~%d%%)" %
+ (sample_size, num_jobs, args.sample_percent))
+ else:
+ assert args.runs_per_test == 1, "Can't do sampling (-p) over multiple runs (-n)."
if infinite_runs:
assert len(massaged_one_run) > 0, 'Must have at least one test for a -n inf run'
runs_sequence = (itertools.repeat(massaged_one_run) if infinite_runs
@@ -1450,7 +1479,7 @@ def _build_and_run(
jobset.message('START', 'Running tests quietly, only failing tests will be reported', do_newline=True)
num_test_failures, resultset = jobset.run(
all_runs, check_cancelled, newline_on_success=newline_on_success,
- travis=args.travis, infinite_runs=infinite_runs, maxjobs=args.jobs,
+ travis=args.travis, maxjobs=args.jobs,
stop_on_failure=args.stop_on_failure,
add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port},
quiet_success=args.quiet_success)
diff --git a/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj b/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj
deleted file mode 100644
index cd3e406f9dc..00000000000
--- a/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {3D3EAEA9-76C4-0CFE-4718-5A1F6B7F72C8}
- true
- $(SolutionDir)IntDir\$(MSBuildProjectName)\
-
-
-
- v100
-
-
- v110
-
-
- v120
-
-
- v140
-
-
- StaticLibrary
- true
- Unicode
-
-
- StaticLibrary
- false
- true
- Unicode
-
-
-
-
-
-
-
-
-
-
-
- grpc++_test
-
-
- grpc++_test
-
-
-
- NotUsing
- Level3
- Disabled
- WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
- true
- MultiThreadedDebug
- true
- None
- false
-
-
- Windows
- true
- false
-
-
-
-
-
- NotUsing
- Level3
- Disabled
- WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
- true
- MultiThreadedDebug
- true
- None
- false
-
-
- Windows
- true
- false
-
-
-
-
-
- NotUsing
- Level3
- MaxSpeed
- WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
- true
- true
- true
- MultiThreaded
- true
- None
- false
-
-
- Windows
- true
- false
- true
- true
-
-
-
-
-
- NotUsing
- Level3
- MaxSpeed
- WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
- true
- true
- true
- MultiThreaded
- true
- None
- false
-
-
- Windows
- true
- false
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
- {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}
-
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
diff --git a/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj.filters b/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj.filters
deleted file mode 100644
index e1d8fe1ef32..00000000000
--- a/vsprojects/vcxproj/grpc++_test/grpc++_test.vcxproj.filters
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
- src\cpp\test
-
-
-
-
- include\grpc++\test
-
-
-
-
-
- {418e2be9-9a04-af8a-8878-956543c507a1}
-
-
- {bcaf3a2d-e884-bfbd-477b-09634054bcc5}
-
-
- {3a14b66f-1d31-2d06-e9a1-c6d1199ab04d}
-
-
- {bc08c75b-ee7e-85a0-fb0f-7586bbd33c6f}
-
-
- {9797a57d-93ac-ff9c-5ac6-fd335777d782}
-
-
- {58d4b4e0-5617-abf4-48a6-f1264d127b27}
-
-
-
-
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj
index 73d511ef7ce..fde60be3e20 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj
@@ -273,6 +273,7 @@
+
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
index dae55041a0b..8edbbc22bed 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
@@ -696,6 +696,9 @@
include\grpc
+
+ include\grpc
+
include\grpc
diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
index 504a3fc9272..6d4b4f70f16 100644
--- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
+++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
@@ -153,6 +153,7 @@
+
diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
index 8e51a641f13..5444f6f8c70 100644
--- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
@@ -441,6 +441,9 @@
include\grpc
+
+ include\grpc
+
include\grpc
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
index 5bdbff9a6ac..22f4740b8fa 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
@@ -264,6 +264,7 @@
+
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
index b2b46b052b7..5021cb47d8d 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
@@ -609,6 +609,9 @@
include\grpc
+
+ include\grpc
+
include\grpc
diff --git a/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj b/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj
index 9e586c647c7..fe2b1abc152 100644
--- a/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj
+++ b/vsprojects/vcxproj/test/server_context_test_spouse_test/server_context_test_spouse_test.vcxproj
@@ -167,9 +167,6 @@
{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}
-
- {3D3EAEA9-76C4-0CFE-4718-5A1F6B7F72C8}
-
{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}