Merge branch 'master' into rpc_mgr

pull/8269/head
Sree Kuchibhotla 8 years ago
commit 5f806d321a
  1. 15
      BUILD
  2. 29
      CMakeLists.txt
  3. 73
      Makefile
  4. 23
      build.yaml
  5. 2
      composer.json
  6. 67
      doc/environment_variables.md
  7. 132
      include/grpc++/ext/reflection.pb.h
  8. 174
      src/compiler/php_generator.cc
  9. 45
      src/compiler/php_generator.h
  10. 58
      src/compiler/php_generator_helpers.h
  11. 73
      src/compiler/php_plugin.cc
  12. 778
      src/cpp/ext/reflection.pb.cc
  13. 3
      src/php/.gitignore
  14. 85
      src/php/README.md
  15. 2
      src/php/bin/determine_extension_dir.sh
  16. 31
      src/php/bin/generate_proto_php.sh
  17. 3
      src/php/bin/interop_client.sh
  18. 2
      src/php/composer.json
  19. 26
      src/php/lib/Grpc/AbstractCall.php
  20. 2
      src/php/lib/Grpc/BidiStreamingCall.php
  21. 2
      src/php/lib/Grpc/ClientStreamingCall.php
  22. 2
      src/php/lib/Grpc/ServerStreamingCall.php
  23. 2
      src/php/lib/Grpc/UnaryCall.php
  24. 5
      src/php/tests/generated_code/AbstractGeneratedCodeTest.php
  25. 83
      src/php/tests/generated_code/math.proto
  26. 43
      src/php/tests/interop/empty.proto
  27. 13
      src/php/tests/interop/interop_client.php
  28. 162
      src/php/tests/interop/messages.proto
  29. 78
      src/php/tests/interop/test.proto
  30. 2
      templates/composer.json.template
  31. 2
      templates/src/php/composer.json.template
  32. 1
      templates/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile.template
  33. 1
      templates/tools/dockerfile/interoptest/grpc_interop_php7/Dockerfile.template
  34. 15
      templates/tools/dockerfile/php_common_deps.include
  35. 15
      templates/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile.template
  36. 128
      test/core/end2end/connection_refused_test.c
  37. 15
      test/cpp/util/proto_file_parser.cc
  38. 2
      third_party/protobuf
  39. 2
      tools/distrib/python/grpcio_tools/protoc_lib_deps.py
  40. 13
      tools/dockerfile/interoptest/grpc_interop_go/build_interop.sh
  41. 30
      tools/dockerfile/interoptest/grpc_interop_php/Dockerfile
  42. 3
      tools/dockerfile/interoptest/grpc_interop_php/build_interop.sh
  43. 30
      tools/dockerfile/interoptest/grpc_interop_php7/Dockerfile
  44. 3
      tools/dockerfile/interoptest/grpc_interop_php7/build_interop.sh
  45. 15
      tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile
  46. 3
      tools/dockerfile/stress_test/grpc_interop_stress_php/build_interop_stress.sh
  47. 3
      tools/jenkins/run_full_performance.sh
  48. 529
      tools/run_tests/performance/scenario_config.py
  49. 45
      tools/run_tests/run_performance_tests.py
  50. 2
      tools/run_tests/sanity/check_submodules.sh
  51. 35
      tools/run_tests/sources_and_headers.json
  52. 21
      tools/run_tests/tests.json
  53. 3
      tools/tsan_suppressions.txt
  54. 27
      vsprojects/buildtests_c.sln
  55. 16
      vsprojects/grpc_protoc_plugins.sln
  56. 168
      vsprojects/vcxproj/grpc_php_plugin/grpc_php_plugin.vcxproj
  57. 18
      vsprojects/vcxproj/grpc_php_plugin/grpc_php_plugin.vcxproj.filters
  58. 4
      vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj
  59. 9
      vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters
  60. 199
      vsprojects/vcxproj/test/connection_refused_test/connection_refused_test.vcxproj
  61. 21
      vsprojects/vcxproj/test/connection_refused_test/connection_refused_test.vcxproj.filters

15
BUILD

@ -1656,6 +1656,8 @@ cc_library(
"src/compiler/node_generator_helpers.h", "src/compiler/node_generator_helpers.h",
"src/compiler/objective_c_generator.h", "src/compiler/objective_c_generator.h",
"src/compiler/objective_c_generator_helpers.h", "src/compiler/objective_c_generator_helpers.h",
"src/compiler/php_generator.h",
"src/compiler/php_generator_helpers.h",
"src/compiler/python_generator.h", "src/compiler/python_generator.h",
"src/compiler/ruby_generator.h", "src/compiler/ruby_generator.h",
"src/compiler/ruby_generator_helpers-inl.h", "src/compiler/ruby_generator_helpers-inl.h",
@ -1665,6 +1667,7 @@ cc_library(
"src/compiler/csharp_generator.cc", "src/compiler/csharp_generator.cc",
"src/compiler/node_generator.cc", "src/compiler/node_generator.cc",
"src/compiler/objective_c_generator.cc", "src/compiler/objective_c_generator.cc",
"src/compiler/php_generator.cc",
"src/compiler/python_generator.cc", "src/compiler/python_generator.cc",
"src/compiler/ruby_generator.cc", "src/compiler/ruby_generator.cc",
], ],
@ -2263,6 +2266,18 @@ cc_binary(
) )
cc_binary(
name = "grpc_php_plugin",
srcs = [
"src/compiler/php_plugin.cc",
],
deps = [
"//external:protobuf_compiler",
":grpc_plugin_support",
],
)
cc_binary( cc_binary(
name = "grpc_python_plugin", name = "grpc_python_plugin",
srcs = [ srcs = [

@ -1432,6 +1432,7 @@ add_library(grpc_plugin_support
src/compiler/csharp_generator.cc src/compiler/csharp_generator.cc
src/compiler/node_generator.cc src/compiler/node_generator.cc
src/compiler/objective_c_generator.cc src/compiler/objective_c_generator.cc
src/compiler/php_generator.cc
src/compiler/python_generator.cc src/compiler/python_generator.cc
src/compiler/ruby_generator.cc src/compiler/ruby_generator.cc
) )
@ -1772,6 +1773,34 @@ if (gRPC_INSTALL)
endif() endif()
add_executable(grpc_php_plugin
src/compiler/php_plugin.cc
)
target_include_directories(grpc_php_plugin
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${BORINGSSL_ROOT_DIR}/include
PRIVATE ${PROTOBUF_ROOT_DIR}/src
PRIVATE ${ZLIB_ROOT_DIR}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
)
target_link_libraries(grpc_php_plugin
${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
grpc_plugin_support
)
if (gRPC_INSTALL)
install(TARGETS grpc_php_plugin EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
add_executable(grpc_python_plugin add_executable(grpc_python_plugin
src/compiler/python_plugin.cc src/compiler/python_plugin.cc
) )

@ -732,7 +732,7 @@ PC_LIBS_GRPCXX =
CPPFLAGS := -Ithird_party/googletest/include $(CPPFLAGS) CPPFLAGS := -Ithird_party/googletest/include $(CPPFLAGS)
PROTOC_PLUGINS_ALL = $(BINDIR)/$(CONFIG)/grpc_cpp_plugin $(BINDIR)/$(CONFIG)/grpc_csharp_plugin $(BINDIR)/$(CONFIG)/grpc_node_plugin $(BINDIR)/$(CONFIG)/grpc_objective_c_plugin $(BINDIR)/$(CONFIG)/grpc_python_plugin $(BINDIR)/$(CONFIG)/grpc_ruby_plugin PROTOC_PLUGINS_ALL = $(BINDIR)/$(CONFIG)/grpc_cpp_plugin $(BINDIR)/$(CONFIG)/grpc_csharp_plugin $(BINDIR)/$(CONFIG)/grpc_node_plugin $(BINDIR)/$(CONFIG)/grpc_objective_c_plugin $(BINDIR)/$(CONFIG)/grpc_php_plugin $(BINDIR)/$(CONFIG)/grpc_python_plugin $(BINDIR)/$(CONFIG)/grpc_ruby_plugin
PROTOC_PLUGINS_DIR = $(BINDIR)/$(CONFIG) PROTOC_PLUGINS_DIR = $(BINDIR)/$(CONFIG)
ifeq ($(HAS_SYSTEM_PROTOBUF),true) ifeq ($(HAS_SYSTEM_PROTOBUF),true)
@ -919,6 +919,7 @@ client_fuzzer: $(BINDIR)/$(CONFIG)/client_fuzzer
combiner_test: $(BINDIR)/$(CONFIG)/combiner_test combiner_test: $(BINDIR)/$(CONFIG)/combiner_test
compression_test: $(BINDIR)/$(CONFIG)/compression_test compression_test: $(BINDIR)/$(CONFIG)/compression_test
concurrent_connectivity_test: $(BINDIR)/$(CONFIG)/concurrent_connectivity_test concurrent_connectivity_test: $(BINDIR)/$(CONFIG)/concurrent_connectivity_test
connection_refused_test: $(BINDIR)/$(CONFIG)/connection_refused_test
dns_resolver_connectivity_test: $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_test dns_resolver_connectivity_test: $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_test
dns_resolver_test: $(BINDIR)/$(CONFIG)/dns_resolver_test dns_resolver_test: $(BINDIR)/$(CONFIG)/dns_resolver_test
dualstack_socket_test: $(BINDIR)/$(CONFIG)/dualstack_socket_test dualstack_socket_test: $(BINDIR)/$(CONFIG)/dualstack_socket_test
@ -1047,6 +1048,7 @@ grpc_cpp_plugin: $(BINDIR)/$(CONFIG)/grpc_cpp_plugin
grpc_csharp_plugin: $(BINDIR)/$(CONFIG)/grpc_csharp_plugin grpc_csharp_plugin: $(BINDIR)/$(CONFIG)/grpc_csharp_plugin
grpc_node_plugin: $(BINDIR)/$(CONFIG)/grpc_node_plugin grpc_node_plugin: $(BINDIR)/$(CONFIG)/grpc_node_plugin
grpc_objective_c_plugin: $(BINDIR)/$(CONFIG)/grpc_objective_c_plugin grpc_objective_c_plugin: $(BINDIR)/$(CONFIG)/grpc_objective_c_plugin
grpc_php_plugin: $(BINDIR)/$(CONFIG)/grpc_php_plugin
grpc_python_plugin: $(BINDIR)/$(CONFIG)/grpc_python_plugin grpc_python_plugin: $(BINDIR)/$(CONFIG)/grpc_python_plugin
grpc_rpc_manager_test: $(BINDIR)/$(CONFIG)/grpc_rpc_manager_test grpc_rpc_manager_test: $(BINDIR)/$(CONFIG)/grpc_rpc_manager_test
grpc_ruby_plugin: $(BINDIR)/$(CONFIG)/grpc_ruby_plugin grpc_ruby_plugin: $(BINDIR)/$(CONFIG)/grpc_ruby_plugin
@ -1250,6 +1252,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/combiner_test \ $(BINDIR)/$(CONFIG)/combiner_test \
$(BINDIR)/$(CONFIG)/compression_test \ $(BINDIR)/$(CONFIG)/compression_test \
$(BINDIR)/$(CONFIG)/concurrent_connectivity_test \ $(BINDIR)/$(CONFIG)/concurrent_connectivity_test \
$(BINDIR)/$(CONFIG)/connection_refused_test \
$(BINDIR)/$(CONFIG)/dns_resolver_connectivity_test \ $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_test \
$(BINDIR)/$(CONFIG)/dns_resolver_test \ $(BINDIR)/$(CONFIG)/dns_resolver_test \
$(BINDIR)/$(CONFIG)/dualstack_socket_test \ $(BINDIR)/$(CONFIG)/dualstack_socket_test \
@ -1578,6 +1581,8 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/compression_test || ( echo test compression_test failed ; exit 1 ) $(Q) $(BINDIR)/$(CONFIG)/compression_test || ( echo test compression_test failed ; exit 1 )
$(E) "[RUN] Testing concurrent_connectivity_test" $(E) "[RUN] Testing concurrent_connectivity_test"
$(Q) $(BINDIR)/$(CONFIG)/concurrent_connectivity_test || ( echo test concurrent_connectivity_test failed ; exit 1 ) $(Q) $(BINDIR)/$(CONFIG)/concurrent_connectivity_test || ( echo test concurrent_connectivity_test failed ; exit 1 )
$(E) "[RUN] Testing connection_refused_test"
$(Q) $(BINDIR)/$(CONFIG)/connection_refused_test || ( echo test connection_refused_test failed ; exit 1 )
$(E) "[RUN] Testing dns_resolver_connectivity_test" $(E) "[RUN] Testing dns_resolver_connectivity_test"
$(Q) $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_test || ( echo test dns_resolver_connectivity_test failed ; exit 1 ) $(Q) $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_test || ( echo test dns_resolver_connectivity_test failed ; exit 1 )
$(E) "[RUN] Testing dns_resolver_test" $(E) "[RUN] Testing dns_resolver_test"
@ -2348,6 +2353,8 @@ else
$(Q) $(INSTALL) -d $(prefix)/bin $(Q) $(INSTALL) -d $(prefix)/bin
$(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_objective_c_plugin $(prefix)/bin/grpc_objective_c_plugin $(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_objective_c_plugin $(prefix)/bin/grpc_objective_c_plugin
$(Q) $(INSTALL) -d $(prefix)/bin $(Q) $(INSTALL) -d $(prefix)/bin
$(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_php_plugin $(prefix)/bin/grpc_php_plugin
$(Q) $(INSTALL) -d $(prefix)/bin
$(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_python_plugin $(prefix)/bin/grpc_python_plugin $(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_python_plugin $(prefix)/bin/grpc_python_plugin
$(Q) $(INSTALL) -d $(prefix)/bin $(Q) $(INSTALL) -d $(prefix)/bin
$(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_ruby_plugin $(prefix)/bin/grpc_ruby_plugin $(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_ruby_plugin $(prefix)/bin/grpc_ruby_plugin
@ -4348,6 +4355,7 @@ LIBGRPC_PLUGIN_SUPPORT_SRC = \
src/compiler/csharp_generator.cc \ src/compiler/csharp_generator.cc \
src/compiler/node_generator.cc \ src/compiler/node_generator.cc \
src/compiler/objective_c_generator.cc \ src/compiler/objective_c_generator.cc \
src/compiler/php_generator.cc \
src/compiler/python_generator.cc \ src/compiler/python_generator.cc \
src/compiler/ruby_generator.cc \ src/compiler/ruby_generator.cc \
@ -7362,6 +7370,38 @@ endif
endif endif
CONNECTION_REFUSED_TEST_SRC = \
test/core/end2end/connection_refused_test.c \
CONNECTION_REFUSED_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CONNECTION_REFUSED_TEST_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/connection_refused_test: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/connection_refused_test: $(CONNECTION_REFUSED_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) $(CONNECTION_REFUSED_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)/connection_refused_test
endif
$(OBJDIR)/$(CONFIG)/test/core/end2end/connection_refused_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_connection_refused_test: $(CONNECTION_REFUSED_TEST_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(CONNECTION_REFUSED_TEST_OBJS:.o=.dep)
endif
endif
DNS_RESOLVER_CONNECTIVITY_TEST_SRC = \ DNS_RESOLVER_CONNECTIVITY_TEST_SRC = \
test/core/client_config/resolvers/dns_resolver_connectivity_test.c \ test/core/client_config/resolvers/dns_resolver_connectivity_test.c \
@ -11703,6 +11743,37 @@ ifneq ($(NO_DEPS),true)
endif endif
GRPC_PHP_PLUGIN_SRC = \
src/compiler/php_plugin.cc \
GRPC_PHP_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_PHP_PLUGIN_SRC))))
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)/grpc_php_plugin: protobuf_dep_error
else
$(BINDIR)/$(CONFIG)/grpc_php_plugin: $(PROTOBUF_DEP) $(GRPC_PHP_PLUGIN_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a
$(E) "[HOSTLD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(GRPC_PHP_PLUGIN_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a $(HOST_LDLIBSXX) $(HOST_LDLIBS_PROTOC) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o $(BINDIR)/$(CONFIG)/grpc_php_plugin
endif
$(OBJDIR)/$(CONFIG)/src/compiler/php_plugin.o: $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a
deps_grpc_php_plugin: $(GRPC_PHP_PLUGIN_OBJS:.o=.dep)
ifneq ($(NO_DEPS),true)
-include $(GRPC_PHP_PLUGIN_OBJS:.o=.dep)
endif
GRPC_PYTHON_PLUGIN_SRC = \ GRPC_PYTHON_PLUGIN_SRC = \
src/compiler/python_plugin.cc \ src/compiler/python_plugin.cc \

@ -1112,6 +1112,8 @@ libs:
- src/compiler/node_generator_helpers.h - src/compiler/node_generator_helpers.h
- src/compiler/objective_c_generator.h - src/compiler/objective_c_generator.h
- src/compiler/objective_c_generator_helpers.h - src/compiler/objective_c_generator_helpers.h
- src/compiler/php_generator.h
- src/compiler/php_generator_helpers.h
- src/compiler/python_generator.h - src/compiler/python_generator.h
- src/compiler/ruby_generator.h - src/compiler/ruby_generator.h
- src/compiler/ruby_generator_helpers-inl.h - src/compiler/ruby_generator_helpers-inl.h
@ -1122,6 +1124,7 @@ libs:
- src/compiler/csharp_generator.cc - src/compiler/csharp_generator.cc
- src/compiler/node_generator.cc - src/compiler/node_generator.cc
- src/compiler/objective_c_generator.cc - src/compiler/objective_c_generator.cc
- src/compiler/php_generator.cc
- src/compiler/python_generator.cc - src/compiler/python_generator.cc
- src/compiler/ruby_generator.cc - src/compiler/ruby_generator.cc
filegroups: filegroups:
@ -1463,6 +1466,17 @@ targets:
- grpc - grpc
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: connection_refused_test
cpu_cost: 0.1
build: test
language: c
src:
- test/core/end2end/connection_refused_test.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
- name: dns_resolver_connectivity_test - name: dns_resolver_connectivity_test
cpu_cost: 0.1 cpu_cost: 0.1
build: test build: test
@ -2861,6 +2875,15 @@ targets:
secure: false secure: false
vs_config_type: Application vs_config_type: Application
vs_project_guid: '{19564640-CEE6-4921-ABA5-676ED79A36F6}' vs_project_guid: '{19564640-CEE6-4921-ABA5-676ED79A36F6}'
- name: grpc_php_plugin
build: protoc
language: c++
src:
- src/compiler/php_plugin.cc
deps:
- grpc_plugin_support
secure: false
vs_config_type: Application
- name: grpc_python_plugin - name: grpc_python_plugin
build: protoc build: protoc
language: c++ language: c++

@ -7,7 +7,7 @@
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"require": { "require": {
"php": ">=5.5.0", "php": ">=5.5.0",
"stanley-cheung/protobuf-php": "v0.6" "google/protobuf": "v3.1.0-alpha-1"
}, },
"require-dev": { "require-dev": {
"google/auth": "v0.9" "google/auth": "v0.9"

@ -0,0 +1,67 @@
gRPC environment variables
--------------------------
gRPC C core based implementations (those contained in this repository) expose
some configuration as environment variables that can be set.
* GRPC_ABORT_ON_LEAKS
A debugging aid to cause a call to abort() when gRPC objects are leaked past
grpc_shutdown(). Set to 1 to cause the abort, if unset or 0 it does not
abort the process.
* GOOGLE_APPLICATION_CREDENTIALS
The path to find the credentials to use when Google credentials are created
* GRPC_SSL_CIPHER_SUITES
A colon separated list of cipher suites to use with OpenSSL
Defaults to:
ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-GCM-SHA384
* GRPC_DEFAULT_SSL_ROOTS_FILE_PATH
PEM file to load SSL roots from
* GRPC_POLL_STRATEGY [posix-style environments only]
Declares which polling engines to try when starting gRPC.
This is a comma-separated list of engines, which are tried in priority order
first -> last.
Available polling engines include:
- epoll (linux-only) - a polling engine based around the epoll family of
system calls
- poll - a portable polling engine based around poll(), intended to be a
fallback engine when nothing better exists
- legacy - the (deprecated) original polling engine for gRPC
* GRPC_TRACE
A comma separated list of tracers that provide additional insight into how
gRPC C core is processing requests via debug logs. Available tracers include:
- api - traces api calls to the C core
- channel - traces operations on the C core channel stack
- combiner - traces combiner lock state
- compression - traces compression operations
- connectivity_state - traces connectivity state changes to channels
- channel_stack_builder - traces information about channel stacks being built
- http - traces state in the http2 transport engine
- http1 - traces HTTP/1.x operations performed by gRPC
- flowctl - traces http2 flow control
- op_failure - traces error information when failure is pushed onto a
completion queue
- pending_tags - [debug builds only] traces still-in-progress tags on
completion queues
- round_robin - traces the round_robin load balancing policy
- glb - traces the grpclb load balancer
- queue_pluck
- queue_timeout
- secure_endpoint - traces bytes flowing through encrypted channels
- transport_security - traces metadata about secure channel establishment
- tcp - traces bytes in and out of a channel
'all' can additionally be used to turn all traces on.
Individual traces can be disabled by prefixing them with '-'.
Example:
export GRPC_TRACE=all,-pending_tags
* GRPC_VERBOSITY
Default gRPC logging verbosity - one of:
- DEBUG - log all gRPC messages
- INFO - log INFO and ERROR message
- ERROR - log only errors

@ -42,12 +42,12 @@
#include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION < 3000000 #if GOOGLE_PROTOBUF_VERSION < 3001000
#error This file was generated by a newer version of protoc which is #error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update
#error your headers. #error your headers.
#endif #endif
#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
@ -69,6 +69,7 @@ namespace v1alpha {
// Internal implementation detail -- do not call these. // Internal implementation detail -- do not call these.
void protobuf_AddDesc_reflection_2eproto(); void protobuf_AddDesc_reflection_2eproto();
void protobuf_InitDefaults_reflection_2eproto();
void protobuf_AssignDesc_reflection_2eproto(); void protobuf_AssignDesc_reflection_2eproto();
void protobuf_ShutdownFile_reflection_2eproto(); void protobuf_ShutdownFile_reflection_2eproto();
@ -107,6 +108,8 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i
MESSAGE_REQUEST_NOT_SET = 0, MESSAGE_REQUEST_NOT_SET = 0,
}; };
static const ServerReflectionRequest* internal_default_instance();
void Swap(ServerReflectionRequest* other); void Swap(ServerReflectionRequest* other);
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
@ -121,7 +124,7 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i
void Clear(); void Clear();
bool IsInitialized() const; bool IsInitialized() const;
int ByteSize() const; size_t ByteSizeLong() const;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input); ::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
@ -137,6 +140,7 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(ServerReflectionRequest* other); void InternalSwap(ServerReflectionRequest* other);
void UnsafeMergeFrom(const ServerReflectionRequest& from);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena(); return _internal_metadata_.arena();
@ -242,7 +246,6 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i
inline void clear_has_message_request(); inline void clear_has_message_request();
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
bool _is_default_instance_;
::google::protobuf::internal::ArenaStringPtr host_; ::google::protobuf::internal::ArenaStringPtr host_;
union MessageRequestUnion { union MessageRequestUnion {
MessageRequestUnion() {} MessageRequestUnion() {}
@ -255,13 +258,15 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i
mutable int _cached_size_; mutable int _cached_size_;
::google::protobuf::uint32 _oneof_case_[1]; ::google::protobuf::uint32 _oneof_case_[1];
friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_InitDefaults_reflection_2eproto_impl();
friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance(); void InitAsDefaultInstance();
static ServerReflectionRequest* default_instance_;
}; };
extern ::google::protobuf::internal::ExplicitlyConstructed<ServerReflectionRequest> ServerReflectionRequest_default_instance_;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ExtensionRequest) */ { class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ExtensionRequest) */ {
@ -279,6 +284,8 @@ class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertio
static const ::google::protobuf::Descriptor* descriptor(); static const ::google::protobuf::Descriptor* descriptor();
static const ExtensionRequest& default_instance(); static const ExtensionRequest& default_instance();
static const ExtensionRequest* internal_default_instance();
void Swap(ExtensionRequest* other); void Swap(ExtensionRequest* other);
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
@ -293,7 +300,7 @@ class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertio
void Clear(); void Clear();
bool IsInitialized() const; bool IsInitialized() const;
int ByteSize() const; size_t ByteSizeLong() const;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input); ::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
@ -309,6 +316,7 @@ class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertio
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(ExtensionRequest* other); void InternalSwap(ExtensionRequest* other);
void UnsafeMergeFrom(const ExtensionRequest& from);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena(); return _internal_metadata_.arena();
@ -345,17 +353,18 @@ class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertio
private: private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
bool _is_default_instance_;
::google::protobuf::internal::ArenaStringPtr containing_type_; ::google::protobuf::internal::ArenaStringPtr containing_type_;
::google::protobuf::int32 extension_number_; ::google::protobuf::int32 extension_number_;
mutable int _cached_size_; mutable int _cached_size_;
friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_InitDefaults_reflection_2eproto_impl();
friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance(); void InitAsDefaultInstance();
static ExtensionRequest* default_instance_;
}; };
extern ::google::protobuf::internal::ExplicitlyConstructed<ExtensionRequest> ExtensionRequest_default_instance_;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServerReflectionResponse) */ { class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServerReflectionResponse) */ {
@ -381,6 +390,8 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_
MESSAGE_RESPONSE_NOT_SET = 0, MESSAGE_RESPONSE_NOT_SET = 0,
}; };
static const ServerReflectionResponse* internal_default_instance();
void Swap(ServerReflectionResponse* other); void Swap(ServerReflectionResponse* other);
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
@ -395,7 +406,7 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_
void Clear(); void Clear();
bool IsInitialized() const; bool IsInitialized() const;
int ByteSize() const; size_t ByteSizeLong() const;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input); ::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
@ -411,6 +422,7 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(ServerReflectionResponse* other); void InternalSwap(ServerReflectionResponse* other);
void UnsafeMergeFrom(const ServerReflectionResponse& from);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena(); return _internal_metadata_.arena();
@ -495,7 +507,6 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_
inline void clear_has_message_response(); inline void clear_has_message_response();
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
bool _is_default_instance_;
::google::protobuf::internal::ArenaStringPtr valid_host_; ::google::protobuf::internal::ArenaStringPtr valid_host_;
::grpc::reflection::v1alpha::ServerReflectionRequest* original_request_; ::grpc::reflection::v1alpha::ServerReflectionRequest* original_request_;
union MessageResponseUnion { union MessageResponseUnion {
@ -508,13 +519,15 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_
mutable int _cached_size_; mutable int _cached_size_;
::google::protobuf::uint32 _oneof_case_[1]; ::google::protobuf::uint32 _oneof_case_[1];
friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_InitDefaults_reflection_2eproto_impl();
friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance(); void InitAsDefaultInstance();
static ServerReflectionResponse* default_instance_;
}; };
extern ::google::protobuf::internal::ExplicitlyConstructed<ServerReflectionResponse> ServerReflectionResponse_default_instance_;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.FileDescriptorResponse) */ { class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.FileDescriptorResponse) */ {
@ -532,6 +545,8 @@ class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_in
static const ::google::protobuf::Descriptor* descriptor(); static const ::google::protobuf::Descriptor* descriptor();
static const FileDescriptorResponse& default_instance(); static const FileDescriptorResponse& default_instance();
static const FileDescriptorResponse* internal_default_instance();
void Swap(FileDescriptorResponse* other); void Swap(FileDescriptorResponse* other);
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
@ -546,7 +561,7 @@ class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_in
void Clear(); void Clear();
bool IsInitialized() const; bool IsInitialized() const;
int ByteSize() const; size_t ByteSizeLong() const;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input); ::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
@ -562,6 +577,7 @@ class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_in
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(FileDescriptorResponse* other); void InternalSwap(FileDescriptorResponse* other);
void UnsafeMergeFrom(const FileDescriptorResponse& from);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena(); return _internal_metadata_.arena();
@ -597,16 +613,17 @@ class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_in
private: private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
bool _is_default_instance_;
::google::protobuf::RepeatedPtrField< ::std::string> file_descriptor_proto_; ::google::protobuf::RepeatedPtrField< ::std::string> file_descriptor_proto_;
mutable int _cached_size_; mutable int _cached_size_;
friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_InitDefaults_reflection_2eproto_impl();
friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance(); void InitAsDefaultInstance();
static FileDescriptorResponse* default_instance_;
}; };
extern ::google::protobuf::internal::ExplicitlyConstructed<FileDescriptorResponse> FileDescriptorResponse_default_instance_;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ExtensionNumberResponse) */ { class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ExtensionNumberResponse) */ {
@ -624,6 +641,8 @@ class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_i
static const ::google::protobuf::Descriptor* descriptor(); static const ::google::protobuf::Descriptor* descriptor();
static const ExtensionNumberResponse& default_instance(); static const ExtensionNumberResponse& default_instance();
static const ExtensionNumberResponse* internal_default_instance();
void Swap(ExtensionNumberResponse* other); void Swap(ExtensionNumberResponse* other);
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
@ -638,7 +657,7 @@ class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_i
void Clear(); void Clear();
bool IsInitialized() const; bool IsInitialized() const;
int ByteSize() const; size_t ByteSizeLong() const;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input); ::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
@ -654,6 +673,7 @@ class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_i
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(ExtensionNumberResponse* other); void InternalSwap(ExtensionNumberResponse* other);
void UnsafeMergeFrom(const ExtensionNumberResponse& from);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena(); return _internal_metadata_.arena();
@ -696,18 +716,19 @@ class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_i
private: private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
bool _is_default_instance_;
::google::protobuf::internal::ArenaStringPtr base_type_name_;
::google::protobuf::RepeatedField< ::google::protobuf::int32 > extension_number_; ::google::protobuf::RepeatedField< ::google::protobuf::int32 > extension_number_;
mutable int _extension_number_cached_byte_size_; mutable int _extension_number_cached_byte_size_;
::google::protobuf::internal::ArenaStringPtr base_type_name_;
mutable int _cached_size_; mutable int _cached_size_;
friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_InitDefaults_reflection_2eproto_impl();
friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance(); void InitAsDefaultInstance();
static ExtensionNumberResponse* default_instance_;
}; };
extern ::google::protobuf::internal::ExplicitlyConstructed<ExtensionNumberResponse> ExtensionNumberResponse_default_instance_;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ListServiceResponse) */ { class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ListServiceResponse) */ {
@ -725,6 +746,8 @@ class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_inser
static const ::google::protobuf::Descriptor* descriptor(); static const ::google::protobuf::Descriptor* descriptor();
static const ListServiceResponse& default_instance(); static const ListServiceResponse& default_instance();
static const ListServiceResponse* internal_default_instance();
void Swap(ListServiceResponse* other); void Swap(ListServiceResponse* other);
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
@ -739,7 +762,7 @@ class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_inser
void Clear(); void Clear();
bool IsInitialized() const; bool IsInitialized() const;
int ByteSize() const; size_t ByteSizeLong() const;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input); ::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
@ -755,6 +778,7 @@ class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_inser
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(ListServiceResponse* other); void InternalSwap(ListServiceResponse* other);
void UnsafeMergeFrom(const ListServiceResponse& from);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena(); return _internal_metadata_.arena();
@ -786,16 +810,17 @@ class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_inser
private: private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
bool _is_default_instance_;
::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse > service_; ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse > service_;
mutable int _cached_size_; mutable int _cached_size_;
friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_InitDefaults_reflection_2eproto_impl();
friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance(); void InitAsDefaultInstance();
static ListServiceResponse* default_instance_;
}; };
extern ::google::protobuf::internal::ExplicitlyConstructed<ListServiceResponse> ListServiceResponse_default_instance_;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServiceResponse) */ { class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServiceResponse) */ {
@ -813,6 +838,8 @@ class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion
static const ::google::protobuf::Descriptor* descriptor(); static const ::google::protobuf::Descriptor* descriptor();
static const ServiceResponse& default_instance(); static const ServiceResponse& default_instance();
static const ServiceResponse* internal_default_instance();
void Swap(ServiceResponse* other); void Swap(ServiceResponse* other);
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
@ -827,7 +854,7 @@ class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion
void Clear(); void Clear();
bool IsInitialized() const; bool IsInitialized() const;
int ByteSize() const; size_t ByteSizeLong() const;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input); ::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
@ -843,6 +870,7 @@ class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(ServiceResponse* other); void InternalSwap(ServiceResponse* other);
void UnsafeMergeFrom(const ServiceResponse& from);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena(); return _internal_metadata_.arena();
@ -873,16 +901,17 @@ class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion
private: private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
bool _is_default_instance_;
::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::internal::ArenaStringPtr name_;
mutable int _cached_size_; mutable int _cached_size_;
friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_InitDefaults_reflection_2eproto_impl();
friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance(); void InitAsDefaultInstance();
static ServiceResponse* default_instance_;
}; };
extern ::google::protobuf::internal::ExplicitlyConstructed<ServiceResponse> ServiceResponse_default_instance_;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ErrorResponse) */ { class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ErrorResponse) */ {
@ -900,6 +929,8 @@ class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_p
static const ::google::protobuf::Descriptor* descriptor(); static const ::google::protobuf::Descriptor* descriptor();
static const ErrorResponse& default_instance(); static const ErrorResponse& default_instance();
static const ErrorResponse* internal_default_instance();
void Swap(ErrorResponse* other); void Swap(ErrorResponse* other);
// implements Message ---------------------------------------------- // implements Message ----------------------------------------------
@ -914,7 +945,7 @@ class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_p
void Clear(); void Clear();
bool IsInitialized() const; bool IsInitialized() const;
int ByteSize() const; size_t ByteSizeLong() const;
bool MergePartialFromCodedStream( bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input); ::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes( void SerializeWithCachedSizes(
@ -930,6 +961,7 @@ class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_p
void SharedDtor(); void SharedDtor();
void SetCachedSize(int size) const; void SetCachedSize(int size) const;
void InternalSwap(ErrorResponse* other); void InternalSwap(ErrorResponse* other);
void UnsafeMergeFrom(const ErrorResponse& from);
private: private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const { inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena(); return _internal_metadata_.arena();
@ -966,17 +998,18 @@ class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_p
private: private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
bool _is_default_instance_;
::google::protobuf::internal::ArenaStringPtr error_message_; ::google::protobuf::internal::ArenaStringPtr error_message_;
::google::protobuf::int32 error_code_; ::google::protobuf::int32 error_code_;
mutable int _cached_size_; mutable int _cached_size_;
friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_InitDefaults_reflection_2eproto_impl();
friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance(); void InitAsDefaultInstance();
static ErrorResponse* default_instance_;
}; };
extern ::google::protobuf::internal::ExplicitlyConstructed<ErrorResponse> ErrorResponse_default_instance_;
// =================================================================== // ===================================================================
@ -1410,6 +1443,9 @@ inline void ServerReflectionRequest::clear_has_message_request() {
inline ServerReflectionRequest::MessageRequestCase ServerReflectionRequest::message_request_case() const { inline ServerReflectionRequest::MessageRequestCase ServerReflectionRequest::message_request_case() const {
return ServerReflectionRequest::MessageRequestCase(_oneof_case_[0]); return ServerReflectionRequest::MessageRequestCase(_oneof_case_[0]);
} }
inline const ServerReflectionRequest* ServerReflectionRequest::internal_default_instance() {
return &ServerReflectionRequest_default_instance_.get();
}
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// ExtensionRequest // ExtensionRequest
@ -1472,6 +1508,9 @@ inline void ExtensionRequest::set_extension_number(::google::protobuf::int32 val
// @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number) // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number)
} }
inline const ExtensionRequest* ExtensionRequest::internal_default_instance() {
return &ExtensionRequest_default_instance_.get();
}
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// ServerReflectionResponse // ServerReflectionResponse
@ -1522,7 +1561,7 @@ inline void ServerReflectionResponse::set_allocated_valid_host(::std::string* va
// optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;
inline bool ServerReflectionResponse::has_original_request() const { inline bool ServerReflectionResponse::has_original_request() const {
return !_is_default_instance_ && original_request_ != NULL; return this != internal_default_instance() && original_request_ != NULL;
} }
inline void ServerReflectionResponse::clear_original_request() { inline void ServerReflectionResponse::clear_original_request() {
if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_;
@ -1530,7 +1569,8 @@ inline void ServerReflectionResponse::clear_original_request() {
} }
inline const ::grpc::reflection::v1alpha::ServerReflectionRequest& ServerReflectionResponse::original_request() const { inline const ::grpc::reflection::v1alpha::ServerReflectionRequest& ServerReflectionResponse::original_request() const {
// @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
return original_request_ != NULL ? *original_request_ : *default_instance_->original_request_; return original_request_ != NULL ? *original_request_
: *::grpc::reflection::v1alpha::ServerReflectionRequest::internal_default_instance();
} }
inline ::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::mutable_original_request() { inline ::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::mutable_original_request() {
@ -1759,6 +1799,9 @@ inline void ServerReflectionResponse::clear_has_message_response() {
inline ServerReflectionResponse::MessageResponseCase ServerReflectionResponse::message_response_case() const { inline ServerReflectionResponse::MessageResponseCase ServerReflectionResponse::message_response_case() const {
return ServerReflectionResponse::MessageResponseCase(_oneof_case_[0]); return ServerReflectionResponse::MessageResponseCase(_oneof_case_[0]);
} }
inline const ServerReflectionResponse* ServerReflectionResponse::internal_default_instance() {
return &ServerReflectionResponse_default_instance_.get();
}
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// FileDescriptorResponse // FileDescriptorResponse
@ -1818,6 +1861,9 @@ FileDescriptorResponse::mutable_file_descriptor_proto() {
return &file_descriptor_proto_; return &file_descriptor_proto_;
} }
inline const FileDescriptorResponse* FileDescriptorResponse::internal_default_instance() {
return &FileDescriptorResponse_default_instance_.get();
}
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// ExtensionNumberResponse // ExtensionNumberResponse
@ -1896,6 +1942,9 @@ ExtensionNumberResponse::mutable_extension_number() {
return &extension_number_; return &extension_number_;
} }
inline const ExtensionNumberResponse* ExtensionNumberResponse::internal_default_instance() {
return &ExtensionNumberResponse_default_instance_.get();
}
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// ListServiceResponse // ListServiceResponse
@ -1930,6 +1979,9 @@ ListServiceResponse::service() const {
return service_; return service_;
} }
inline const ListServiceResponse* ListServiceResponse::internal_default_instance() {
return &ListServiceResponse_default_instance_.get();
}
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// ServiceResponse // ServiceResponse
@ -1978,6 +2030,9 @@ inline void ServiceResponse::set_allocated_name(::std::string* name) {
// @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServiceResponse.name) // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServiceResponse.name)
} }
inline const ServiceResponse* ServiceResponse::internal_default_instance() {
return &ServiceResponse_default_instance_.get();
}
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// ErrorResponse // ErrorResponse
@ -2040,6 +2095,9 @@ inline void ErrorResponse::set_allocated_error_message(::std::string* error_mess
// @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message) // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message)
} }
inline const ErrorResponse* ErrorResponse::internal_default_instance() {
return &ErrorResponse_default_instance_.get();
}
#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
// ------------------------------------------------------------------- // -------------------------------------------------------------------

@ -0,0 +1,174 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <map>
#include "src/compiler/config.h"
#include "src/compiler/generator_helpers.h"
#include "src/compiler/php_generator_helpers.h"
using grpc::protobuf::FileDescriptor;
using grpc::protobuf::ServiceDescriptor;
using grpc::protobuf::MethodDescriptor;
using grpc::protobuf::Descriptor;
using grpc::protobuf::io::Printer;
using grpc::protobuf::io::StringOutputStream;
using std::map;
namespace grpc_php_generator {
namespace {
grpc::string MessageIdentifierName(const grpc::string &name) {
std::vector<grpc::string> tokens = grpc_generator::tokenize(name, ".");
std::ostringstream oss;
for (unsigned int i = 0; i < tokens.size(); i++) {
oss << (i == 0 ? "" : "\\")
<< grpc_generator::CapitalizeFirstLetter(tokens[i]);
}
return oss.str();
}
void PrintMethod(const MethodDescriptor *method, Printer *out) {
const Descriptor *input_type = method->input_type();
const Descriptor *output_type = method->output_type();
map<grpc::string, grpc::string> vars;
vars["service_name"] = method->service()->full_name();
vars["name"] = method->name();
vars["input_type_id"] = MessageIdentifierName(input_type->full_name());
vars["output_type_id"] = MessageIdentifierName(output_type->full_name());
out->Print("/**\n");
out->Print(GetPHPComments(method, " *").c_str());
if (method->client_streaming()) {
out->Print(vars,
" * @param array $$metadata metadata\n"
" * @param array $$options call options\n */\n"
"public function $name$($$metadata = [], "
"$$options = []) {\n");
out->Indent();
if (method->server_streaming()) {
out->Print("return $$this->_bidiRequest(");
} else {
out->Print("return $$this->_clientStreamRequest(");
}
out->Print(vars,
"'/$service_name$/$name$',\n"
"['\\$output_type_id$','decode'],\n"
"$$metadata, $$options);\n");
} else {
out->Print(vars,
" * @param \\$input_type_id$ $$argument input argument\n"
" * @param array $$metadata metadata\n"
" * @param array $$options call options\n */\n"
"public function $name$(\\$input_type_id$ $$argument,\n"
" $$metadata = [], $$options = []) {\n");
out->Indent();
if (method->server_streaming()) {
out->Print("return $$this->_serverStreamRequest(");
} else {
out->Print("return $$this->_simpleRequest(");
}
out->Print(vars,
"'/$service_name$/$name$',\n"
"$$argument,\n"
"['\\$output_type_id$', 'decode'],\n"
"$$metadata, $$options);\n");
}
out->Outdent();
out->Print("}\n\n");
}
// Prints out the service descriptor object
void PrintService(const ServiceDescriptor *service, Printer *out) {
map<grpc::string, grpc::string> vars;
out->Print(GetPHPComments(service, "//").c_str());
vars["name"] = service->name();
out->Print(vars, "class $name$Client extends \\Grpc\\BaseStub {\n\n");
out->Indent();
out->Print(
"/**\n * @param string $$hostname hostname\n"
" * @param array $$opts channel options\n"
" * @param Grpc\\Channel $$channel (optional) re-use channel "
"object\n */\n"
"public function __construct($$hostname, $$opts, "
"$$channel = null) {\n");
out->Indent();
out->Print("parent::__construct($$hostname, $$opts, $$channel);\n");
out->Outdent();
out->Print("}\n\n");
for (int i = 0; i < service->method_count(); i++) {
grpc::string method_name =
grpc_generator::LowercaseFirstLetter(service->method(i)->name());
PrintMethod(service->method(i), out);
}
out->Outdent();
out->Print("}\n\n");
}
void PrintServices(const FileDescriptor *file, Printer *out) {
map<grpc::string, grpc::string> vars;
vars["package"] = MessageIdentifierName(file->package());
out->Print(vars, "namespace $package$ {\n\n");
out->Indent();
for (int i = 0; i < file->service_count(); i++) {
PrintService(file->service(i), out);
}
out->Outdent();
out->Print("}\n");
}
}
grpc::string GenerateFile(const FileDescriptor *file) {
grpc::string output;
{
StringOutputStream output_stream(&output);
Printer out(&output_stream, '$');
if (file->service_count() == 0) {
return output;
}
out.Print("<?php\n");
out.Print("// GENERATED CODE -- DO NOT EDIT!\n\n");
grpc::string leading_comments = GetPHPComments(file, "//");
if (!leading_comments.empty()) {
out.Print("// Original file comments:\n");
out.Print(leading_comments.c_str());
}
PrintServices(file, &out);
}
return output;
}
} // namespace grpc_php_generator

@ -0,0 +1,45 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_INTERNAL_COMPILER_PHP_GENERATOR_H
#define GRPC_INTERNAL_COMPILER_PHP_GENERATOR_H
#include "src/compiler/config.h"
namespace grpc_php_generator {
grpc::string GenerateFile(const grpc::protobuf::FileDescriptor *file);
} // namespace grpc_php_generator
#endif // GRPC_INTERNAL_COMPILER_PHP_GENERATOR_H

@ -0,0 +1,58 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_INTERNAL_COMPILER_PHP_GENERATOR_HELPERS_H
#define GRPC_INTERNAL_COMPILER_PHP_GENERATOR_HELPERS_H
#include <algorithm>
#include "src/compiler/config.h"
#include "src/compiler/generator_helpers.h"
namespace grpc_php_generator {
inline grpc::string GetPHPServiceFilename(const grpc::string& filename) {
return grpc_generator::StripProto(filename) + "_grpc_pb.php";
}
// Get leading or trailing comments in a string. Comment lines start with "// ".
// Leading detached comments are put in in front of leading comments.
template <typename DescriptorType>
inline grpc::string GetPHPComments(const DescriptorType* desc,
grpc::string prefix) {
return grpc_generator::GetPrefixedComments(desc, true, prefix);
}
} // namespace grpc_php_generator
#endif // GRPC_INTERNAL_COMPILER_PHP_GENERATOR_HELPERS_H

@ -0,0 +1,73 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
// Generates PHP gRPC service interface out of Protobuf IDL.
#include <memory>
#include "src/compiler/config.h"
#include "src/compiler/php_generator.h"
#include "src/compiler/php_generator_helpers.h"
using grpc_php_generator::GenerateFile;
using grpc_php_generator::GetPHPServiceFilename;
class PHPGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
public:
PHPGrpcGenerator() {}
~PHPGrpcGenerator() {}
bool Generate(const grpc::protobuf::FileDescriptor *file,
const grpc::string &parameter,
grpc::protobuf::compiler::GeneratorContext *context,
grpc::string *error) const {
grpc::string code = GenerateFile(file);
if (code.size() == 0) {
return true;
}
// Get output file name
grpc::string file_name = GetPHPServiceFilename(file->name());
std::unique_ptr<grpc::protobuf::io::ZeroCopyOutputStream> output(
context->Open(file_name));
grpc::protobuf::io::CodedOutputStream coded_out(output.get());
coded_out.WriteRaw(code.data(), code.size());
return true;
}
};
int main(int argc, char *argv[]) {
PHPGrpcGenerator generator;
return grpc::protobuf::compiler::PluginMain(argc, argv, &generator);
}

File diff suppressed because it is too large Load Diff

@ -20,3 +20,6 @@ mkinstalldirs
ext/grpc/ltmain.sh ext/grpc/ltmain.sh
composer.lock composer.lock
vendor/ vendor/
*.pb.php
*_grpc_pb.php

@ -1,7 +1,8 @@
#Overview #Overview
This directory contains source code for PHP implementation of gRPC layered on shared C library. This directory contains source code for PHP implementation of gRPC layered on
shared C library.
#Status #Status
@ -9,17 +10,29 @@ GA
## Environment ## Environment
Prerequisite: **Prerequisite:**
* `php` 5.5 or above, 7.0 or above * `php` 5.5 or above, 7.0 or above
* `pear` and `pecl` * `pecl`
* `phpunit` * `composer`
* `phpunit` (optional)
**PEAR:** **Ubuntu/Debian:**
```sh
$ sudo apt-get install php5 php5-dev
```
**PEAR/PECL:**
```sh ```sh
$ curl -O http://pear.php.net/go-pear.phar $ curl -O http://pear.php.net/go-pear.phar
$ sudo php -d detect_unicode=0 go-pear.phar $ sudo php -d detect_unicode=0 go-pear.phar
``` ```
**Composer:**
```sh
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
```
**PHPUnit:** **PHPUnit:**
```sh ```sh
$ wget https://phar.phpunit.de/phpunit-old.phar $ wget https://phar.phpunit.de/phpunit-old.phar
@ -29,15 +42,31 @@ $ sudo mv phpunit-old.phar /usr/bin/phpunit
## Quick Install ## Quick Install
Install the gRPC PHP extension **Install the gRPC PHP extension**
```sh ```sh
sudo pecl install grpc sudo pecl install grpc
``` ```
This will compile and install the gRPC PHP extension into the standard PHP extension directory. You should be able to run the [unit tests](#unit-tests), with the PHP extension installed. This will compile and install the gRPC PHP extension into the standard PHP
extension directory. You should be able to run the [unit tests](#unit-tests),
with the PHP extension installed.
**Add the gRPC PHP library as a Composer dependency**
You need to add this to your project's `composer.json` file.
```
"require": {
"grpc/grpc": "v1.0.0"
}
```
To run tests with generated stub code from `.proto` files, you will also need
the `composer` and `protoc` binaries. You can find out how to get these
[below](#generated-code-tests).
To run tests with generated stub code from `.proto` files, you will also need the `composer`, `protoc` and `protoc-gen-php` binaries. You can find out how to get these [below](#generated-code-tests).
## Build from Source ## Build from Source
@ -98,45 +127,46 @@ $ ./bin/run_tests.sh
## Generated Code Tests ## Generated Code Tests
This section specifies the prerequisites for running the generated code tests, as well as how to run the tests themselves. This section specifies the prerequisites for running the generated code tests,
as well as how to run the tests themselves.
### Composer ### Composer
If you don't have it already, install `composer` to pull in some runtime dependencies based on the `composer.json` file. Install the runtime dependencies via `composer install`.
```sh ```sh
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
$ cd grpc/src/php $ cd grpc/src/php
$ composer install $ composer install
``` ```
### Protobuf compiler ### Protobuf compiler
Again if you don't have it already, you need to install the protobuf compiler `protoc`, version 3.0.0+. Again if you don't have it already, you need to install the protobuf compiler
`protoc`, version 3.1.0+.
If `protoc` hasn't been installed, you can download the `protoc` binaries from
[the protocol buffers Github repository](https://github.com/google/protobuf/releases).
If you compiled the gRPC C core library from source above, the `protoc` binary should have been installed as well. If it hasn't been installed, you can run the following commands to install it. If you really must compile `protoc` from source, you can run the following
commands, but this is risky because there is no easy way to uninstall /
upgrade to a newer release.
```sh ```sh
$ cd grpc/third_party/protobuf $ cd grpc/third_party/protobuf
$ sudo make install # 'make' should have been run by core grpc $ ./autogen.sh && ./configure && make
$ sudo make install
``` ```
Alternatively, you can download `protoc` binaries from [the protocol buffers Github repository](https://github.com/google/protobuf/releases).
### PHP Protoc Plugin
### PHP protobuf compiler You need the gRPC PHP protoc plugin to generate the client stub classes.
You need to install `protoc-gen-php` to generate stub class `.php` files from service definition `.proto` files. It should already been compiled when you run `make` from the root directory
of this repo. The plugin can be found in the `bins/opt` directory. We are
planning to provide a better way to download and install the plugin
in the future.
```sh
$ git clone https://github.com/stanley-cheung/Protobuf-PHP
$ cd Protobuf-PHP
$ gem install rake ronn
$ rake pear:package version=1.0
$ sudo pear install Protobuf-1.0.tgz
```
### Client Stub ### Client Stub
@ -149,7 +179,8 @@ $ ./bin/generate_proto_php.sh
### Run test server ### Run test server
Run a local server serving the math services. Please see [Node][] for how to run an example server. Run a local server serving the math services. Please see [Node][] for how to
run an example server.
```sh ```sh
$ cd grpc $ cd grpc

@ -32,7 +32,7 @@ default_extension_dir=$(php-config --extension-dir)
if [ ! -e $default_extension_dir/grpc.so ]; then if [ ! -e $default_extension_dir/grpc.so ]; then
# the grpc extension is not found in the default PHP extension dir # the grpc extension is not found in the default PHP extension dir
# try the source modules directory # try the source modules directory
module_dir=../ext/grpc/modules module_dir=$(pwd)/../ext/grpc/modules
if [ ! -e $module_dir/grpc.so ]; then if [ ! -e $module_dir/grpc.so ]; then
echo "Please run 'phpize && ./configure && make' from ext/grpc first" echo "Please run 'phpize && ./configure && make' from ext/grpc first"
exit 1 exit 1

@ -28,13 +28,32 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set +e set +e
cd $(dirname $0) cd $(dirname $0)/../../..
protoc --proto_path=src/proto/math \
--php_out=src/php/tests/generated_code \
--grpc_out=src/php/tests/generated_code \
--plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin \
src/proto/math/math.proto
gen_code='../tests/generated_code' # replace the Empty message with EmptyMessage
interop='../tests/interop' # because Empty is a PHP reserved word
sed -i 's/message Empty/message EmptyMessage/g' \
src/proto/grpc/testing/empty.proto
sed -i 's/grpc\.testing\.Empty/grpc\.testing\.EmptyMessage/g' \
src/proto/grpc/testing/test.proto
protoc-gen-php -i $gen_code -o $gen_code $gen_code/math.proto protoc --proto_path=. \
--php_out=src/php/tests/interop \
--grpc_out=src/php/tests/interop \
--plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin \
src/proto/grpc/testing/messages.proto \
src/proto/grpc/testing/empty.proto \
src/proto/grpc/testing/test.proto
protoc-gen-php -i $interop -o $interop $interop/test.proto # change it back
sed -i 's/message EmptyMessage/message Empty/g' \
src/proto/grpc/testing/empty.proto
sed -i 's/grpc\.testing\.EmptyMessage/grpc\.testing\.Empty/g' \
src/proto/grpc/testing/test.proto

@ -31,5 +31,6 @@
set -e set -e
cd $(dirname $0) cd $(dirname $0)
source ./determine_extension_dir.sh source ./determine_extension_dir.sh
cd ../tests/interop
php $extension_dir -d max_execution_time=300 \ php $extension_dir -d max_execution_time=300 \
../tests/interop/interop_client.php $@ 1>&2 interop_client.php $@ 1>&2

@ -8,7 +8,7 @@
"version": "1.1.0", "version": "1.1.0",
"require": { "require": {
"php": ">=5.5.0", "php": ">=5.5.0",
"stanley-cheung/protobuf-php": "v0.6" "google/protobuf": "v3.1.0-alpha-1"
}, },
"require-dev": { "require-dev": {
"google/auth": "v0.9" "google/auth": "v0.9"

@ -120,6 +120,23 @@ abstract class AbstractCall
$this->call->cancel(); $this->call->cancel();
} }
/**
* Serialize a message to the protobuf binary format
*
* @param mixed $data The Protobuf message
*
* @return string The protobuf binary format
*/
protected function serializeMessage($data) {
// Proto3 implementation
if (method_exists($data, 'encode')) {
return $data->encode();
}
// Protobuf-PHP implementation
return $data->serialize();
}
/** /**
* Deserialize a response value to an object. * Deserialize a response value to an object.
* *
@ -133,6 +150,15 @@ abstract class AbstractCall
return; return;
} }
// Proto3 implementation
if (is_array($this->deserialize)) {
list($className, $deserializeFunc) = $this->deserialize;
$obj = new $className();
$obj->$deserializeFunc($value);
return $obj;
}
// Protobuf-PHP implementation
return call_user_func($this->deserialize, $value); return call_user_func($this->deserialize, $value);
} }

@ -81,7 +81,7 @@ class BidiStreamingCall extends AbstractCall
*/ */
public function write($data, $options = []) public function write($data, $options = [])
{ {
$message_array = ['message' => $data->serialize()]; $message_array = ['message' => $this->serializeMessage($data)];
if (array_key_exists('flags', $options)) { if (array_key_exists('flags', $options)) {
$message_array['flags'] = $options['flags']; $message_array['flags'] = $options['flags'];
} }

@ -62,7 +62,7 @@ class ClientStreamingCall extends AbstractCall
*/ */
public function write($data, array $options = []) public function write($data, array $options = [])
{ {
$message_array = ['message' => $data->serialize()]; $message_array = ['message' => $this->serializeMessage($data)];
if (array_key_exists('flags', $options)) { if (array_key_exists('flags', $options)) {
$message_array['flags'] = $options['flags']; $message_array['flags'] = $options['flags'];
} }

@ -50,7 +50,7 @@ class ServerStreamingCall extends AbstractCall
*/ */
public function start($data, $metadata = [], $options = []) public function start($data, $metadata = [], $options = [])
{ {
$message_array = ['message' => $data->serialize()]; $message_array = ['message' => $this->serializeMessage($data)];
if (array_key_exists('flags', $options)) { if (array_key_exists('flags', $options)) {
$message_array['flags'] = $options['flags']; $message_array['flags'] = $options['flags'];
} }

@ -50,7 +50,7 @@ class UnaryCall extends AbstractCall
*/ */
public function start($data, $metadata = [], $options = []) public function start($data, $metadata = [], $options = [])
{ {
$message_array = ['message' => $data->serialize()]; $message_array = ['message' => $this->serializeMessage($data)];
if (isset($options['flags'])) { if (isset($options['flags'])) {
$message_array['flags'] = $options['flags']; $message_array['flags'] = $options['flags'];
} }

@ -32,7 +32,8 @@
* *
*/ */
require_once realpath(dirname(__FILE__).'/../../vendor/autoload.php'); require_once realpath(dirname(__FILE__).'/../../vendor/autoload.php');
require_once dirname(__FILE__).'/math.php'; require_once dirname(__FILE__).'/math.pb.php';
require_once dirname(__FILE__).'/math_grpc_pb.php';
abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
{ {
@ -92,7 +93,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
public function testTimeout() public function testTimeout()
{ {
$div_arg = new math\DivArgs(); $div_arg = new math\DivArgs();
$call = self::$client->Div($div_arg, [], ['timeout' => 100]); $call = self::$client->Div($div_arg, [], ['timeout' => 1]);
list($response, $status) = $call->wait(); list($response, $status) = $call->wait();
$this->assertSame(\Grpc\STATUS_DEADLINE_EXCEEDED, $status->code); $this->assertSame(\Grpc\STATUS_DEADLINE_EXCEEDED, $status->code);
} }

@ -1,83 +0,0 @@
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// TODO: start using src/proto/math/math.proto and remove this file once
// PHP supports proto3.
syntax = "proto2";
package math;
message DivArgs {
optional int64 dividend = 1 [default = 0];
optional int64 divisor = 2 [default = 0];
}
message DivReply {
optional int64 quotient = 1 [default = 0];
optional int64 remainder = 2 [default = 0];
}
message FibArgs {
optional int64 limit = 1 [default = 0];
}
message Num {
optional int64 num = 1 [default = 0];
}
message FibReply {
optional int64 count = 1 [default = 0];
}
service Math {
// Div divides args.dividend by args.divisor and returns the quotient and
// remainder.
rpc Div (DivArgs) returns (DivReply) {
}
// DivMany accepts an arbitrary number of division args from the client stream
// and sends back the results in the reply stream. The stream continues until
// the client closes its end; the server does the same after sending all the
// replies. The stream ends immediately if either end aborts.
rpc DivMany (stream DivArgs) returns (stream DivReply) {
}
// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib
// generates up to limit numbers; otherwise it continues until the call is
// canceled. Unlike Fib above, Fib has no final FibReply.
rpc Fib (FibArgs) returns (stream Num) {
}
// Sum sums a stream of numbers, returning the final result once the stream
// is closed.
rpc Sum (stream Num) returns (Num) {
}
}

@ -1,43 +0,0 @@
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto2";
package grpc.testing;
// An empty message that you can re-use to avoid defining duplicated empty
// messages in your project. A typical example is to use it as argument or the
// return value of a service API. For instance:
//
// service Foo {
// rpc Bar (grpc.testing.EmptyMessage) returns (grpc.testing.EmptyMessage) { };
// };
//
message EmptyMessage {}

@ -32,9 +32,8 @@
* *
*/ */
require_once realpath(dirname(__FILE__).'/../../vendor/autoload.php'); require_once realpath(dirname(__FILE__).'/../../vendor/autoload.php');
require 'empty.php'; require 'src/proto/grpc/testing/test.pb.php';
require 'messages.php'; require 'src/proto/grpc/testing/test_grpc_pb.php';
require 'test.php';
use Google\Auth\CredentialsLoader; use Google\Auth\CredentialsLoader;
use Google\Auth\ApplicationDefaultCredentials; use Google\Auth\ApplicationDefaultCredentials;
use GuzzleHttp\ClientInterface; use GuzzleHttp\ClientInterface;
@ -282,7 +281,7 @@ function serverStreaming($stub)
foreach ($sizes as $size) { foreach ($sizes as $size) {
$response_parameters = new grpc\testing\ResponseParameters(); $response_parameters = new grpc\testing\ResponseParameters();
$response_parameters->setSize($size); $response_parameters->setSize($size);
$request->addResponseParameters($response_parameters); $request->getResponseParameters()[] = $response_parameters;
} }
$call = $stub->StreamingOutputCall($request); $call = $stub->StreamingOutputCall($request);
@ -316,7 +315,7 @@ function pingPong($stub)
$request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE); $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
$response_parameters = new grpc\testing\ResponseParameters(); $response_parameters = new grpc\testing\ResponseParameters();
$response_parameters->setSize($response_lengths[$i]); $response_parameters->setSize($response_lengths[$i]);
$request->addResponseParameters($response_parameters); $request->getResponseParameters()[] = $response_parameters;
$payload = new grpc\testing\Payload(); $payload = new grpc\testing\Payload();
$payload->setBody(str_repeat("\0", $request_lengths[$i])); $payload->setBody(str_repeat("\0", $request_lengths[$i]));
$request->setPayload($payload); $request->setPayload($payload);
@ -376,7 +375,7 @@ function cancelAfterFirstResponse($stub)
$request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE); $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
$response_parameters = new grpc\testing\ResponseParameters(); $response_parameters = new grpc\testing\ResponseParameters();
$response_parameters->setSize(31415); $response_parameters->setSize(31415);
$request->addResponseParameters($response_parameters); $request->getResponseParameters()[] = $response_parameters;
$payload = new grpc\testing\Payload(); $payload = new grpc\testing\Payload();
$payload->setBody(str_repeat("\0", 27182)); $payload->setBody(str_repeat("\0", 27182));
$request->setPayload($payload); $request->setPayload($payload);
@ -396,7 +395,7 @@ function timeoutOnSleepingServer($stub)
$request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE); $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
$response_parameters = new grpc\testing\ResponseParameters(); $response_parameters = new grpc\testing\ResponseParameters();
$response_parameters->setSize(8); $response_parameters->setSize(8);
$request->addResponseParameters($response_parameters); $request->getResponseParameters()[] = $response_parameters;
$payload = new grpc\testing\Payload(); $payload = new grpc\testing\Payload();
$payload->setBody(str_repeat("\0", 9)); $payload->setBody(str_repeat("\0", 9));
$request->setPayload($payload); $request->setPayload($payload);

@ -1,162 +0,0 @@
// Copyright 2015-2016, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Message definitions to be used by integration test service definitions.
syntax = "proto2";
package grpc.testing;
// The type of payload that should be returned.
enum PayloadType {
// Compressable text format.
COMPRESSABLE = 0;
// Uncompressable binary format.
UNCOMPRESSABLE = 1;
}
// A block of data, to simply increase gRPC message size.
message Payload {
// The type of data in body.
optional PayloadType type = 1 [default = COMPRESSABLE];
// Primary contents of payload.
optional bytes body = 2;
}
// A protobuf representation for grpc status. This is used by test
// clients to specify a status that the server should attempt to return.
message EchoStatus {
optional int32 code = 1;
optional string message = 2;
}
// Unary request.
message SimpleRequest {
// Desired payload type in the response from the server.
// If response_type is RANDOM, server randomly chooses one from other formats.
optional PayloadType response_type = 1 [default = COMPRESSABLE];
// Desired payload size in the response from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
optional int32 response_size = 2;
// Optional input payload sent along with the request.
optional Payload payload = 3;
// Whether SimpleResponse should include username.
optional bool fill_username = 4;
// Whether SimpleResponse should include OAuth scope.
optional bool fill_oauth_scope = 5;
// Whether to request the server to compress the response.
optional bool request_compressed_response = 6;
// Whether server should return a given status
optional EchoStatus response_status = 7;
}
// Unary response, as configured by the request.
message SimpleResponse {
// Payload to increase message size.
optional Payload payload = 1;
// The user the request came from, for verifying authentication was
// successful when the client expected it.
optional string username = 2;
// OAuth scope.
optional string oauth_scope = 3;
}
// Client-streaming request.
message StreamingInputCallRequest {
// Optional input payload sent along with the request.
optional Payload payload = 1;
// Not expecting any payload from the response.
}
// Client-streaming response.
message StreamingInputCallResponse {
// Aggregated size of payloads received from the client.
optional int32 aggregated_payload_size = 1;
}
// Configuration for a particular response.
message ResponseParameters {
// Desired payload sizes in responses from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
optional int32 size = 1;
// Desired interval between consecutive responses in the response stream in
// microseconds.
optional int32 interval_us = 2;
}
// Server-streaming request.
message StreamingOutputCallRequest {
// Desired payload type in the response from the server.
// If response_type is RANDOM, the payload from each response in the stream
// might be of different types. This is to simulate a mixed type of payload
// stream.
optional PayloadType response_type = 1 [default = COMPRESSABLE];
// Configuration for each expected response message.
repeated ResponseParameters response_parameters = 2;
// Optional input payload sent along with the request.
optional Payload payload = 3;
// Whether to request the server to compress the response.
optional bool request_compressed_response = 6;
// Whether server should return a given status
optional EchoStatus response_status = 7;
}
// Server-streaming response, as configured by the request and parameters.
message StreamingOutputCallResponse {
// Payload to increase response size.
optional Payload payload = 1;
}
// For reconnect interop test only.
// Client tells server what reconnection parameters it used.
message ReconnectParams {
optional int32 max_reconnect_backoff_ms = 1;
}
// For reconnect interop test only.
// Server tells client whether its reconnects are following the spec and the
// reconnect backoffs it saw.
message ReconnectInfo {
optional bool passed = 1;
repeated int32 backoff_ms = 2;
}

@ -1,78 +0,0 @@
// Copyright 2015-2016, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// An integration test service that covers all the method signature permutations
// of unary/streaming requests/responses.
syntax = "proto2";
import "empty.proto";
import "messages.proto";
package grpc.testing;
// A simple service to test the various types of RPCs and experiment with
// performance with various types of payload.
service TestService {
// One empty request followed by one empty response.
rpc EmptyCall(grpc.testing.EmptyMessage) returns (grpc.testing.EmptyMessage);
// One request followed by one response.
rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
// One request followed by a sequence of responses (streamed download).
// The server returns the payload with client desired type and sizes.
rpc StreamingOutputCall(StreamingOutputCallRequest)
returns (stream StreamingOutputCallResponse);
// A sequence of requests followed by one response (streamed upload).
// The server returns the aggregated size of client payload as the result.
rpc StreamingInputCall(stream StreamingInputCallRequest)
returns (StreamingInputCallResponse);
// A sequence of requests with each request served by the server immediately.
// As one request could lead to multiple responses, this interface
// demonstrates the idea of full duplexing.
rpc FullDuplexCall(stream StreamingOutputCallRequest)
returns (stream StreamingOutputCallResponse);
// A sequence of requests followed by a sequence of responses.
// The server buffers all the client requests and then serves them in order. A
// stream of responses are returned to the client when the server starts with
// first request.
rpc HalfDuplexCall(stream StreamingOutputCallRequest)
returns (stream StreamingOutputCallResponse);
}
// A simple service NOT implemented at servers so clients can test for
// that case.
service UnimplementedService {
// A call that no server should implement
rpc UnimplementedCall(grpc.testing.EmptyMessage) returns (grpc.testing.EmptyMessage);
}

@ -9,7 +9,7 @@
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"require": { "require": {
"php": ">=5.5.0", "php": ">=5.5.0",
"stanley-cheung/protobuf-php": "v0.6" "google/protobuf": "v3.1.0-alpha-1"
}, },
"require-dev": { "require-dev": {
"google/auth": "v0.9" "google/auth": "v0.9"

@ -10,7 +10,7 @@
"version": "${settings.php_version.php_composer()}", "version": "${settings.php_version.php_composer()}",
"require": { "require": {
"php": ">=5.5.0", "php": ">=5.5.0",
"stanley-cheung/protobuf-php": "v0.6" "google/protobuf": "v3.1.0-alpha-1"
}, },
"require-dev": { "require-dev": {
"google/auth": "v0.9" "google/auth": "v0.9"

@ -32,7 +32,6 @@
FROM debian:jessie FROM debian:jessie
<%include file="../../apt_get_basic.include"/> <%include file="../../apt_get_basic.include"/>
<%include file="../../ruby_deps.include"/>
<%include file="../../php_deps.include"/> <%include file="../../php_deps.include"/>
<%include file="../../run_tests_addons.include"/> <%include file="../../run_tests_addons.include"/>
<%include file="../../php_common_deps.include"/> <%include file="../../php_common_deps.include"/>

@ -32,6 +32,5 @@
FROM debian:jessie FROM debian:jessie
<%include file="../../php7_deps.include"/> <%include file="../../php7_deps.include"/>
<%include file="../../ruby_deps.include"/>
<%include file="../../run_tests_addons.include"/> <%include file="../../run_tests_addons.include"/>
<%include file="../../php_common_deps.include"/> <%include file="../../php_common_deps.include"/>

@ -1,21 +1,6 @@
# ronn: a ruby tool used to convert markdown to man pages, used during the
# install of Protobuf extensions
#
# rake: a ruby version of make used to build the PHP Protobuf extension
RUN /bin/bash -l -c "rvm all do gem install ronn rake"
# Install composer # Install composer
RUN curl -sS https://getcomposer.org/installer | php RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer RUN mv composer.phar /usr/local/bin/composer
# Download the patched PHP protobuf so that PHP gRPC clients can be generated
# from proto3 schemas.
RUN git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php
RUN /bin/bash -l -c "rvm use ruby-2.1 ${'\\'}
&& cd /var/local/git/protobuf-php ${'\\'}
&& rvm all do rake pear:package version=1.0 ${'\\'}
&& pear install Protobuf-1.0.tgz"
# Define the default command. # Define the default command.
CMD ["bash"] CMD ["bash"]

@ -37,25 +37,10 @@
<%include file="../../gcp_api_libraries.include"/> <%include file="../../gcp_api_libraries.include"/>
<%include file="../../php_deps.include"/> <%include file="../../php_deps.include"/>
<%include file="../../run_tests_addons.include"/> <%include file="../../run_tests_addons.include"/>
# ronn: a ruby tool used to convert markdown to man pages, used during the
# install of Protobuf extensions
#
# rake: a ruby version of make used to build the PHP Protobuf extension
RUN /bin/bash -l -c "rvm all do gem install ronn rake"
# Install composer # Install composer
RUN curl -sS https://getcomposer.org/installer | php RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer RUN mv composer.phar /usr/local/bin/composer
# Download the patched PHP protobuf so that PHP gRPC clients can be generated
# from proto3 schemas.
RUN git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php
RUN /bin/bash -l -c "rvm use ruby-2.1 ${'\\'}
&& cd /var/local/git/protobuf-php ${'\\'}
&& rvm all do rake pear:package version=1.0 ${'\\'}
&& pear install Protobuf-1.0.tgz"
# Define the default command. # Define the default command.
CMD ["bash"] CMD ["bash"]

@ -0,0 +1,128 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <string.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include "test/core/end2end/cq_verifier.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
static void *tag(intptr_t i) { return (void *)i; }
static void run_test(bool fail_fast) {
grpc_channel *chan;
grpc_call *call;
gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(2);
grpc_completion_queue *cq;
cq_verifier *cqv;
grpc_op ops[6];
grpc_op *op;
grpc_metadata_array trailing_metadata_recv;
grpc_status_code status;
char *details = NULL;
size_t details_capacity = 0;
gpr_log(GPR_INFO, "TEST: fail_fast=%d", fail_fast);
grpc_init();
grpc_metadata_array_init(&trailing_metadata_recv);
cq = grpc_completion_queue_create(NULL);
cqv = cq_verifier_create(cq);
/* create a call, channel to a port which will refuse connection */
int port = grpc_pick_unused_port_or_die();
char *addr;
gpr_join_host_port(&addr, "localhost", port);
chan = grpc_insecure_channel_create(addr, NULL, NULL);
call = grpc_channel_create_call(chan, NULL, GRPC_PROPAGATE_DEFAULTS, cq,
"/Foo", "nonexistant", deadline, NULL);
gpr_free(addr);
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
op->flags = fail_fast ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY;
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv;
op->data.recv_status_on_client.status = &status;
op->data.recv_status_on_client.status_details = &details;
op->data.recv_status_on_client.status_details_capacity = &details_capacity;
op->flags = 0;
op->reserved = NULL;
op++;
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(
call, ops, (size_t)(op - ops), tag(1), NULL));
/* verify that all tags get completed */
CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
if (fail_fast) {
GPR_ASSERT(status == GRPC_STATUS_UNAVAILABLE);
} else {
GPR_ASSERT(status == GRPC_STATUS_DEADLINE_EXCEEDED);
}
grpc_completion_queue_shutdown(cq);
while (
grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), NULL)
.type != GRPC_QUEUE_SHUTDOWN)
;
grpc_completion_queue_destroy(cq);
grpc_call_destroy(call);
grpc_channel_destroy(chan);
cq_verifier_destroy(cqv);
gpr_free(details);
grpc_metadata_array_destroy(&trailing_metadata_recv);
grpc_shutdown();
}
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
run_test(true);
run_test(false);
return 0;
}

@ -36,6 +36,7 @@
#include <algorithm> #include <algorithm>
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <unordered_set>
#include <grpc++/support/config.h> #include <grpc++/support/config.h>
@ -87,6 +88,7 @@ ProtoFileParser::ProtoFileParser(std::shared_ptr<grpc::Channel> channel,
reflection_db_->GetServices(&service_list); reflection_db_->GetServices(&service_list);
} }
std::unordered_set<grpc::string> known_services;
if (!protofiles.empty()) { if (!protofiles.empty()) {
source_tree_.MapPath("", proto_path); source_tree_.MapPath("", proto_path);
error_printer_.reset(new ErrorPrinter(this)); error_printer_.reset(new ErrorPrinter(this));
@ -100,6 +102,7 @@ ProtoFileParser::ProtoFileParser(std::shared_ptr<grpc::Channel> channel,
if (file_desc) { if (file_desc) {
for (int i = 0; i < file_desc->service_count(); i++) { for (int i = 0; i < file_desc->service_count(); i++) {
service_desc_list_.push_back(file_desc->service(i)); service_desc_list_.push_back(file_desc->service(i));
known_services.insert(file_desc->service(i)->full_name());
} }
} else { } else {
std::cerr << file_name << " not found" << std::endl; std::cerr << file_name << " not found" << std::endl;
@ -127,9 +130,12 @@ ProtoFileParser::ProtoFileParser(std::shared_ptr<grpc::Channel> channel,
dynamic_factory_.reset(new protobuf::DynamicMessageFactory(desc_pool_.get())); dynamic_factory_.reset(new protobuf::DynamicMessageFactory(desc_pool_.get()));
for (auto it = service_list.begin(); it != service_list.end(); it++) { for (auto it = service_list.begin(); it != service_list.end(); it++) {
if (const protobuf::ServiceDescriptor* service_desc = if (known_services.find(*it) == known_services.end()) {
desc_pool_->FindServiceByName(*it)) { if (const protobuf::ServiceDescriptor* service_desc =
service_desc_list_.push_back(service_desc); desc_pool_->FindServiceByName(*it)) {
service_desc_list_.push_back(service_desc);
known_services.insert(*it);
}
} }
} }
} }
@ -146,7 +152,8 @@ grpc::string ProtoFileParser::GetFullMethodName(const grpc::string& method) {
const auto* method_desc = service_desc->method(j); const auto* method_desc = service_desc->method(j);
if (MethodNameMatch(method_desc->full_name(), method)) { if (MethodNameMatch(method_desc->full_name(), method)) {
if (method_descriptor) { if (method_descriptor) {
std::ostringstream error_stream("Ambiguous method names: "); std::ostringstream error_stream;
error_stream << "Ambiguous method names: ";
error_stream << method_descriptor->full_name() << " "; error_stream << method_descriptor->full_name() << " ";
error_stream << method_desc->full_name(); error_stream << method_desc->full_name();
LogError(error_stream.str()); LogError(error_stream.str());

@ -1 +1 @@
Subproject commit 1a586735085e817b1f52e53feec92ce418049f69 Subproject commit a428e42072765993ff674fda72863c9f1aa2d268

File diff suppressed because one or more lines are too long

@ -36,19 +36,12 @@ set -e
# to test instead of using "go get" to download from Github directly. # to test instead of using "go get" to download from Github directly.
git clone --recursive /var/local/jenkins/grpc-go src/google.golang.org/grpc git clone --recursive /var/local/jenkins/grpc-go src/google.golang.org/grpc
# Get all gRPC Go dependencies
(cd src/google.golang.org/grpc && go get -t .)
# copy service account keys if available # copy service account keys if available
cp -r /var/local/jenkins/service_account $HOME || true cp -r /var/local/jenkins/service_account $HOME || true
# Get dependencies from GitHub
# NOTE: once grpc-go dependencies change, this needs to be updated manually
# but we don't expect this to happen any time soon.
go get github.com/golang/protobuf/proto
go get golang.org/x/net/context
go get golang.org/x/net/trace
go get golang.org/x/oauth2
go get golang.org/x/oauth2/google
go get google.golang.org/cloud
# Build the interop client and server # Build the interop client and server
(cd src/google.golang.org/grpc/interop/client && go install) (cd src/google.golang.org/grpc/interop/client && go install)
(cd src/google.golang.org/grpc/interop/server && go install) (cd src/google.golang.org/grpc/interop/server && go install)

@ -63,21 +63,6 @@ RUN apt-get update && apt-get install -y \
# Build profiling # Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean RUN apt-get update && apt-get install -y time && apt-get clean
#==================
# Ruby dependencies
# Install rvm
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 2.1
RUN /bin/bash -l -c "rvm install ruby-2.1"
RUN /bin/bash -l -c "rvm use --default ruby-2.1"
RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
#================= #=================
# PHP dependencies # PHP dependencies
@ -97,25 +82,10 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
RUN mkdir /var/local/jenkins RUN mkdir /var/local/jenkins
# ronn: a ruby tool used to convert markdown to man pages, used during the
# install of Protobuf extensions
#
# rake: a ruby version of make used to build the PHP Protobuf extension
RUN /bin/bash -l -c "rvm all do gem install ronn rake"
# Install composer # Install composer
RUN curl -sS https://getcomposer.org/installer | php RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer RUN mv composer.phar /usr/local/bin/composer
# Download the patched PHP protobuf so that PHP gRPC clients can be generated
# from proto3 schemas.
RUN git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php
RUN /bin/bash -l -c "rvm use ruby-2.1 \
&& cd /var/local/git/protobuf-php \
&& rvm all do rake pear:package version=1.0 \
&& pear install Protobuf-1.0.tgz"
# Define the default command. # Define the default command.
CMD ["bash"] CMD ["bash"]

@ -38,7 +38,6 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
cp -r /var/local/jenkins/service_account $HOME || true cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc cd /var/local/git/grpc
rvm --default use ruby-2.1
# gRPC core and protobuf need to be installed # gRPC core and protobuf need to be installed
make install make install
@ -49,4 +48,4 @@ make install
(cd src/php && composer install) (cd src/php && composer install)
(cd src/php && protoc-gen-php -i tests/interop/ -o tests/interop/ tests/interop/test.proto) (cd src/php && ./bin/generate_proto_php.sh)

@ -75,21 +75,6 @@ RUN cd /var/local/git/php-src \
&& make \ && make \
&& make install && make install
#==================
# Ruby dependencies
# Install rvm
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 2.1
RUN /bin/bash -l -c "rvm install ruby-2.1"
RUN /bin/bash -l -c "rvm use --default ruby-2.1"
RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
# Prepare ccache # Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++ RUN ln -s /usr/bin/ccache /usr/local/bin/g++
@ -101,25 +86,10 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
RUN mkdir /var/local/jenkins RUN mkdir /var/local/jenkins
# ronn: a ruby tool used to convert markdown to man pages, used during the
# install of Protobuf extensions
#
# rake: a ruby version of make used to build the PHP Protobuf extension
RUN /bin/bash -l -c "rvm all do gem install ronn rake"
# Install composer # Install composer
RUN curl -sS https://getcomposer.org/installer | php RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer RUN mv composer.phar /usr/local/bin/composer
# Download the patched PHP protobuf so that PHP gRPC clients can be generated
# from proto3 schemas.
RUN git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php
RUN /bin/bash -l -c "rvm use ruby-2.1 \
&& cd /var/local/git/protobuf-php \
&& rvm all do rake pear:package version=1.0 \
&& pear install Protobuf-1.0.tgz"
# Define the default command. # Define the default command.
CMD ["bash"] CMD ["bash"]

@ -38,7 +38,6 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
cp -r /var/local/jenkins/service_account $HOME || true cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc cd /var/local/git/grpc
rvm --default use ruby-2.1
# gRPC core and protobuf need to be installed # gRPC core and protobuf need to be installed
make install make install
@ -49,4 +48,4 @@ make install
(cd src/php && composer install) (cd src/php && composer install)
(cd src/php && protoc-gen-php -i tests/interop/ -o tests/interop/ tests/interop/test.proto) (cd src/php && ./bin/generate_proto_php.sh)

@ -117,24 +117,9 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
RUN mkdir /var/local/jenkins RUN mkdir /var/local/jenkins
# ronn: a ruby tool used to convert markdown to man pages, used during the
# install of Protobuf extensions
#
# rake: a ruby version of make used to build the PHP Protobuf extension
RUN /bin/bash -l -c "rvm all do gem install ronn rake"
# Install composer # Install composer
RUN curl -sS https://getcomposer.org/installer | php RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer RUN mv composer.phar /usr/local/bin/composer
# Download the patched PHP protobuf so that PHP gRPC clients can be generated
# from proto3 schemas.
RUN git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php
RUN /bin/bash -l -c "rvm use ruby-2.1 \
&& cd /var/local/git/protobuf-php \
&& rvm all do rake pear:package version=1.0 \
&& pear install Protobuf-1.0.tgz"
# Define the default command. # Define the default command.
CMD ["bash"] CMD ["bash"]

@ -38,7 +38,6 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
cp -r /var/local/jenkins/service_account $HOME || true cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc cd /var/local/git/grpc
rvm --default use ruby-2.1
make install-certs make install-certs
@ -51,4 +50,4 @@ make install
(cd src/php && composer install) (cd src/php && composer install)
(cd src/php && protoc-gen-php -i tests/interop/ -o tests/interop/ tests/interop/test.proto) (cd src/php && ./bin/generate_proto_php.sh)

@ -38,7 +38,7 @@ cd $(dirname $0)/../..
tools/run_tests/run_performance_tests.py \ tools/run_tests/run_performance_tests.py \
-l c++ csharp node ruby java python go \ -l c++ csharp node ruby java python go \
--netperf \ --netperf \
--category all \ --category scalable \
--bq_result_table performance_test.performance_experiment \ --bq_result_table performance_test.performance_experiment \
--remote_worker_host grpc-performance-server-8core grpc-performance-client-8core grpc-performance-client2-8core \ --remote_worker_host grpc-performance-server-8core grpc-performance-client-8core grpc-performance-client2-8core \
|| EXIT_CODE=1 || EXIT_CODE=1
@ -53,4 +53,3 @@ tools/run_tests/run_performance_tests.py \
|| EXIT_CODE=1 || EXIT_CODE=1
exit $EXIT_CODE exit $EXIT_CODE

@ -31,49 +31,52 @@
import math import math
WARMUP_SECONDS = 5 WARMUP_SECONDS=5
JAVA_WARMUP_SECONDS = 15 # Java needs more warmup time for JIT to kick in. JAVA_WARMUP_SECONDS=15 # Java needs more warmup time for JIT to kick in.
BENCHMARK_SECONDS = 30 BENCHMARK_SECONDS=30
SMOKETEST = 'smoketest' SMOKETEST='smoketest'
SCALABLE = 'scalable' SCALABLE='scalable'
SWEEP = 'sweep' SWEEP='sweep'
DEFAULT_CATEGORIES = [SCALABLE, SMOKETEST] DEFAULT_CATEGORIES=[SCALABLE, SMOKETEST]
SECURE_SECARGS = {'use_test_ca': True, SECURE_SECARGS = {'use_test_ca': True,
'server_host_override': 'foo.test.google.fr'} 'server_host_override': 'foo.test.google.fr'}
HISTOGRAM_PARAMS = { HISTOGRAM_PARAMS = {
'resolution': 0.01, 'resolution': 0.01,
'max_possible': 60e9, 'max_possible': 60e9,
} }
EMPTY_GENERIC_PAYLOAD = { EMPTY_GENERIC_PAYLOAD = {
'bytebuf_params': { 'bytebuf_params': {
'req_size': 0, 'req_size': 0,
'resp_size': 0, 'resp_size': 0,
} }
} }
EMPTY_PROTO_PAYLOAD = { EMPTY_PROTO_PAYLOAD = {
'simple_params': { 'simple_params': {
'req_size': 0, 'req_size': 0,
'resp_size': 0, 'resp_size': 0,
} }
} }
BIG_GENERIC_PAYLOAD = { BIG_GENERIC_PAYLOAD = {
'bytebuf_params': { 'bytebuf_params': {
'req_size': 65536, 'req_size': 65536,
'resp_size': 65536, 'resp_size': 65536,
} }
} }
# target number of RPCs outstanding on across all client channels in # target number of RPCs outstanding on across all client channels in
# non-ping-pong tests (since we can only specify per-channel numbers, the # non-ping-pong tests (since we can only specify per-channel numbers, the
# actual target will be slightly higher) # actual target will be slightly higher)
OUTSTANDING_REQUESTS = {'async': 6400, 'sync': 1000} OUTSTANDING_REQUESTS={
'async': 6400,
'sync': 1000
}
# wide is the number of client channels in multi-channel tests (1 otherwise) # wide is the number of client channels in multi-channel tests (1 otherwise)
WIDE = 64 WIDE=64
def _get_secargs(is_secure): def _get_secargs(is_secure):
@ -99,10 +102,8 @@ def geometric_progression(start, stop, step):
n *= step n *= step
def _ping_pong_scenario(name, def _ping_pong_scenario(name, rpc_type,
rpc_type, client_type, server_type,
client_type,
server_type,
secure=True, secure=True,
use_generic_payload=False, use_generic_payload=False,
unconstrained_client=None, unconstrained_client=None,
@ -116,29 +117,29 @@ def _ping_pong_scenario(name,
outstanding=None): outstanding=None):
"""Creates a basic ping pong scenario.""" """Creates a basic ping pong scenario."""
scenario = { scenario = {
'name': name, 'name': name,
'num_servers': 1, 'num_servers': 1,
'num_clients': 1, 'num_clients': 1,
'client_config': { 'client_config': {
'client_type': client_type, 'client_type': client_type,
'security_params': _get_secargs(secure), 'security_params': _get_secargs(secure),
'outstanding_rpcs_per_channel': 1, 'outstanding_rpcs_per_channel': 1,
'client_channels': 1, 'client_channels': 1,
'async_client_threads': 1, 'async_client_threads': 1,
'rpc_type': rpc_type, 'rpc_type': rpc_type,
'load_params': { 'load_params': {
'closed_loop': {} 'closed_loop': {}
},
'histogram_params': HISTOGRAM_PARAMS,
}, },
'server_config': { 'histogram_params': HISTOGRAM_PARAMS,
'server_type': server_type, },
'security_params': _get_secargs(secure), 'server_config': {
'core_limit': server_core_limit, 'server_type': server_type,
'async_server_threads': async_server_threads, 'security_params': _get_secargs(secure),
}, 'core_limit': server_core_limit,
'warmup_seconds': warmup_seconds, 'async_server_threads': async_server_threads,
'benchmark_seconds': BENCHMARK_SECONDS },
'warmup_seconds': warmup_seconds,
'benchmark_seconds': BENCHMARK_SECONDS
} }
if use_generic_payload: if use_generic_payload:
if server_type != 'ASYNC_GENERIC_SERVER': if server_type != 'ASYNC_GENERIC_SERVER':
@ -150,8 +151,7 @@ def _ping_pong_scenario(name,
scenario['client_config']['payload_config'] = EMPTY_PROTO_PAYLOAD scenario['client_config']['payload_config'] = EMPTY_PROTO_PAYLOAD
if unconstrained_client: if unconstrained_client:
outstanding_calls = outstanding if outstanding is not None else OUTSTANDING_REQUESTS[ outstanding_calls = outstanding if outstanding is not None else OUTSTANDING_REQUESTS[unconstrained_client]
unconstrained_client]
wide = channels if channels is not None else WIDE wide = channels if channels is not None else WIDE
deep = int(math.ceil(1.0 * outstanding_calls / wide)) deep = int(math.ceil(1.0 * outstanding_calls / wide))
@ -190,16 +190,14 @@ class CXXLanguage:
# TODO(ctiller): add 70% load latency test # TODO(ctiller): add 70% load latency test
for secure in [True, False]: for secure in [True, False]:
secstr = 'secure' if secure else 'insecure' secstr = 'secure' if secure else 'insecure'
smoketest_categories = [SMOKETEST] if secure else [] smoketest_categories = ([SMOKETEST] if secure else []) + [SCALABLE]
yield _ping_pong_scenario( yield _ping_pong_scenario(
'cpp_generic_async_streaming_ping_pong_%s' % secstr, 'cpp_generic_async_streaming_ping_pong_%s' % secstr,
rpc_type='STREAMING', rpc_type='STREAMING',
client_type='ASYNC_CLIENT', client_type='ASYNC_CLIENT',
server_type='ASYNC_GENERIC_SERVER', server_type='ASYNC_GENERIC_SERVER',
use_generic_payload=True, use_generic_payload=True, server_core_limit=1, async_server_threads=1,
server_core_limit=1,
async_server_threads=1,
secure=secure, secure=secure,
categories=smoketest_categories) categories=smoketest_categories)
@ -208,71 +206,49 @@ class CXXLanguage:
rpc_type='STREAMING', rpc_type='STREAMING',
client_type='ASYNC_CLIENT', client_type='ASYNC_CLIENT',
server_type='ASYNC_GENERIC_SERVER', server_type='ASYNC_GENERIC_SERVER',
unconstrained_client='async', unconstrained_client='async', use_generic_payload=True,
use_generic_payload=True,
secure=secure, secure=secure,
categories=smoketest_categories + [SCALABLE]) categories=smoketest_categories+[SCALABLE])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'cpp_generic_async_streaming_qps_one_server_core_%s' % secstr, 'cpp_generic_async_streaming_qps_one_server_core_%s' % secstr,
rpc_type='STREAMING', rpc_type='STREAMING',
client_type='ASYNC_CLIENT', client_type='ASYNC_CLIENT',
server_type='ASYNC_GENERIC_SERVER', server_type='ASYNC_GENERIC_SERVER',
unconstrained_client='async', unconstrained_client='async', use_generic_payload=True,
use_generic_payload=True, server_core_limit=1, async_server_threads=1,
server_core_limit=1,
async_server_threads=1,
secure=secure) secure=secure)
yield _ping_pong_scenario(
'cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_%s' %
(secstr),
rpc_type='UNARY',
client_type='ASYNC_CLIENT',
server_type='SYNC_SERVER',
unconstrained_client='async',
secure=secure,
categories=smoketest_categories + [SCALABLE])
for rpc_type in ['unary', 'streaming']: for rpc_type in ['unary', 'streaming']:
for synchronicity in ['sync', 'async']: for synchronicity in ['sync', 'async']:
yield _ping_pong_scenario( yield _ping_pong_scenario(
'cpp_protobuf_%s_%s_ping_pong_%s' % 'cpp_protobuf_%s_%s_ping_pong_%s' % (synchronicity, rpc_type, secstr),
(synchronicity, rpc_type, secstr),
rpc_type=rpc_type.upper(), rpc_type=rpc_type.upper(),
client_type='%s_CLIENT' % synchronicity.upper(), client_type='%s_CLIENT' % synchronicity.upper(),
server_type='%s_SERVER' % synchronicity.upper(), server_type='%s_SERVER' % synchronicity.upper(),
server_core_limit=1, server_core_limit=1, async_server_threads=1,
async_server_threads=1,
secure=secure) secure=secure)
yield _ping_pong_scenario( yield _ping_pong_scenario(
'cpp_protobuf_%s_%s_qps_unconstrained_%s' % 'cpp_protobuf_%s_%s_qps_unconstrained_%s' % (synchronicity, rpc_type, secstr),
(synchronicity, rpc_type, secstr),
rpc_type=rpc_type.upper(), rpc_type=rpc_type.upper(),
client_type='%s_CLIENT' % synchronicity.upper(), client_type='%s_CLIENT' % synchronicity.upper(),
server_type='%s_SERVER' % synchronicity.upper(), server_type='%s_SERVER' % synchronicity.upper(),
unconstrained_client=synchronicity, unconstrained_client=synchronicity,
secure=secure, secure=secure,
categories=smoketest_categories + [SCALABLE]) categories=smoketest_categories+[SCALABLE])
for channels in geometric_progression(1, 20000, math.sqrt(10)): for channels in geometric_progression(1, 20000, math.sqrt(10)):
for outstanding in geometric_progression(1, 200000, math.sqrt(10)): for outstanding in geometric_progression(1, 200000, math.sqrt(10)):
if synchronicity == 'sync' and outstanding > 1200: if synchronicity == 'sync' and outstanding > 1200: continue
continue if outstanding < channels: continue
if outstanding < channels: yield _ping_pong_scenario(
continue 'cpp_protobuf_%s_%s_qps_unconstrained_%s_%d_channels_%d_outstanding' % (synchronicity, rpc_type, secstr, channels, outstanding),
yield _ping_pong_scenario( rpc_type=rpc_type.upper(),
'cpp_protobuf_%s_%s_qps_unconstrained_%s_%d_channels_%d_outstanding' client_type='%s_CLIENT' % synchronicity.upper(),
% (synchronicity, rpc_type, secstr, channels, outstanding), server_type='%s_SERVER' % synchronicity.upper(),
rpc_type=rpc_type.upper(), unconstrained_client=synchronicity, secure=secure,
client_type='%s_CLIENT' % synchronicity.upper(), categories=[SWEEP], channels=channels, outstanding=outstanding)
server_type='%s_SERVER' % synchronicity.upper(),
unconstrained_client=synchronicity,
secure=secure,
categories=[SWEEP],
channels=channels,
outstanding=outstanding)
def __str__(self): def __str__(self):
return 'c++' return 'c++'
@ -291,94 +267,66 @@ class CSharpLanguage:
def scenarios(self): def scenarios(self):
yield _ping_pong_scenario( yield _ping_pong_scenario(
'csharp_generic_async_streaming_ping_pong', 'csharp_generic_async_streaming_ping_pong', rpc_type='STREAMING',
rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
client_type='ASYNC_CLIENT',
server_type='ASYNC_GENERIC_SERVER',
use_generic_payload=True, use_generic_payload=True,
categories=[SMOKETEST]) categories=[SMOKETEST, SCALABLE])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'csharp_protobuf_async_streaming_ping_pong', 'csharp_protobuf_async_streaming_ping_pong', rpc_type='STREAMING',
rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER')
client_type='ASYNC_CLIENT',
server_type='ASYNC_SERVER')
yield _ping_pong_scenario( yield _ping_pong_scenario(
'csharp_protobuf_async_unary_ping_pong', 'csharp_protobuf_async_unary_ping_pong', rpc_type='UNARY',
rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='ASYNC_CLIENT', categories=[SMOKETEST, SCALABLE])
server_type='ASYNC_SERVER',
categories=[SMOKETEST])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'csharp_protobuf_sync_to_async_unary_ping_pong', 'csharp_protobuf_sync_to_async_unary_ping_pong', rpc_type='UNARY',
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='ASYNC_SERVER')
client_type='SYNC_CLIENT',
server_type='ASYNC_SERVER')
yield _ping_pong_scenario( yield _ping_pong_scenario(
'csharp_protobuf_async_unary_qps_unconstrained', 'csharp_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY',
rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='ASYNC_CLIENT',
server_type='ASYNC_SERVER',
unconstrained_client='async', unconstrained_client='async',
categories=[SMOKETEST, SCALABLE]) categories=[SMOKETEST,SCALABLE])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'csharp_protobuf_async_streaming_qps_unconstrained', 'csharp_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING',
rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='ASYNC_CLIENT',
server_type='ASYNC_SERVER',
unconstrained_client='async', unconstrained_client='async',
categories=[SCALABLE]) categories=[SCALABLE])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'csharp_to_cpp_protobuf_sync_unary_ping_pong', 'csharp_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY',
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
client_type='SYNC_CLIENT', server_language='c++', server_core_limit=1, async_server_threads=1,
server_type='SYNC_SERVER', categories=[SMOKETEST, SCALABLE])
server_language='c++',
server_core_limit=1,
async_server_threads=1,
categories=[SMOKETEST])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'csharp_to_cpp_protobuf_async_streaming_ping_pong', 'csharp_to_cpp_protobuf_async_streaming_ping_pong', rpc_type='STREAMING',
rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='ASYNC_CLIENT', server_language='c++', server_core_limit=1, async_server_threads=1)
server_type='ASYNC_SERVER',
server_language='c++',
server_core_limit=1,
async_server_threads=1)
yield _ping_pong_scenario( yield _ping_pong_scenario(
'csharp_to_cpp_protobuf_async_unary_qps_unconstrained', 'csharp_to_cpp_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY',
rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='ASYNC_CLIENT', unconstrained_client='async', server_language='c++',
server_type='ASYNC_SERVER',
unconstrained_client='async',
server_language='c++',
categories=[SCALABLE]) categories=[SCALABLE])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'csharp_to_cpp_protobuf_sync_to_async_unary_qps_unconstrained', 'csharp_to_cpp_protobuf_sync_to_async_unary_qps_unconstrained', rpc_type='UNARY',
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='SYNC_CLIENT', unconstrained_client='sync', server_language='c++',
server_type='ASYNC_SERVER',
unconstrained_client='sync',
server_language='c++',
categories=[SCALABLE]) categories=[SCALABLE])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'cpp_to_csharp_protobuf_async_unary_qps_unconstrained', 'cpp_to_csharp_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY',
rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='ASYNC_CLIENT', unconstrained_client='async', client_language='c++',
server_type='ASYNC_SERVER',
unconstrained_client='async',
client_language='c++',
categories=[SCALABLE]) categories=[SCALABLE])
def __str__(self): def __str__(self):
return 'csharp' return 'csharp'
@ -408,19 +356,15 @@ class NodeLanguage:
# client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER')
yield _ping_pong_scenario( yield _ping_pong_scenario(
'node_protobuf_unary_ping_pong', 'node_protobuf_unary_ping_pong', rpc_type='UNARY',
rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='ASYNC_CLIENT', categories=[SCALABLE, SMOKETEST])
server_type='ASYNC_SERVER',
categories=[SMOKETEST])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'node_protobuf_async_unary_qps_unconstrained', 'node_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY',
rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='ASYNC_CLIENT',
server_type='ASYNC_SERVER',
unconstrained_client='async', unconstrained_client='async',
categories=[SMOKETEST]) categories=[SCALABLE, SMOKETEST])
# TODO(jtattermusch): make this scenario work # TODO(jtattermusch): make this scenario work
#yield _ping_pong_scenario( #yield _ping_pong_scenario(
@ -443,7 +387,6 @@ class NodeLanguage:
def __str__(self): def __str__(self):
return 'node' return 'node'
class PythonLanguage: class PythonLanguage:
def __init__(self): def __init__(self):
@ -457,69 +400,48 @@ class PythonLanguage:
def scenarios(self): def scenarios(self):
yield _ping_pong_scenario( yield _ping_pong_scenario(
'python_generic_sync_streaming_ping_pong', 'python_generic_sync_streaming_ping_pong', rpc_type='STREAMING',
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
client_type='SYNC_CLIENT',
server_type='ASYNC_GENERIC_SERVER',
use_generic_payload=True, use_generic_payload=True,
categories=[SMOKETEST]) categories=[SMOKETEST, SCALABLE])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'python_protobuf_sync_streaming_ping_pong', 'python_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING',
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='ASYNC_SERVER')
client_type='SYNC_CLIENT',
server_type='ASYNC_SERVER')
yield _ping_pong_scenario( yield _ping_pong_scenario(
'python_protobuf_async_unary_ping_pong', 'python_protobuf_async_unary_ping_pong', rpc_type='UNARY',
rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER')
client_type='ASYNC_CLIENT',
server_type='ASYNC_SERVER')
yield _ping_pong_scenario( yield _ping_pong_scenario(
'python_protobuf_sync_unary_ping_pong', 'python_protobuf_sync_unary_ping_pong', rpc_type='UNARY',
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='SYNC_CLIENT', categories=[SMOKETEST, SCALABLE])
server_type='ASYNC_SERVER',
categories=[SMOKETEST])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'python_protobuf_sync_unary_qps_unconstrained', 'python_protobuf_sync_unary_qps_unconstrained', rpc_type='UNARY',
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='SYNC_CLIENT',
server_type='ASYNC_SERVER',
unconstrained_client='sync') unconstrained_client='sync')
yield _ping_pong_scenario( yield _ping_pong_scenario(
'python_protobuf_sync_streaming_qps_unconstrained', 'python_protobuf_sync_streaming_qps_unconstrained', rpc_type='STREAMING',
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='SYNC_CLIENT',
server_type='ASYNC_SERVER',
unconstrained_client='sync') unconstrained_client='sync')
yield _ping_pong_scenario( yield _ping_pong_scenario(
'python_to_cpp_protobuf_sync_unary_ping_pong', 'python_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY',
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='SYNC_CLIENT', server_language='c++', server_core_limit=1, async_server_threads=1,
server_type='ASYNC_SERVER', categories=[SMOKETEST, SCALABLE])
server_language='c++',
server_core_limit=1,
async_server_threads=1,
categories=[SMOKETEST])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'python_to_cpp_protobuf_sync_streaming_ping_pong', 'python_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING',
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='SYNC_CLIENT', server_language='c++', server_core_limit=1, async_server_threads=1)
server_type='ASYNC_SERVER',
server_language='c++',
server_core_limit=1,
async_server_threads=1)
def __str__(self): def __str__(self):
return 'python' return 'python'
class RubyLanguage: class RubyLanguage:
def __init__(self): def __init__(self):
@ -534,50 +456,34 @@ class RubyLanguage:
def scenarios(self): def scenarios(self):
yield _ping_pong_scenario( yield _ping_pong_scenario(
'ruby_protobuf_sync_streaming_ping_pong', 'ruby_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING',
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
client_type='SYNC_CLIENT', categories=[SMOKETEST, SCALABLE])
server_type='SYNC_SERVER',
categories=[SMOKETEST])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'ruby_protobuf_unary_ping_pong', 'ruby_protobuf_unary_ping_pong', rpc_type='UNARY',
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
client_type='SYNC_CLIENT', categories=[SMOKETEST, SCALABLE])
server_type='SYNC_SERVER',
categories=[SMOKETEST])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'ruby_protobuf_sync_unary_qps_unconstrained', 'ruby_protobuf_sync_unary_qps_unconstrained', rpc_type='UNARY',
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
client_type='SYNC_CLIENT',
server_type='SYNC_SERVER',
unconstrained_client='sync') unconstrained_client='sync')
yield _ping_pong_scenario( yield _ping_pong_scenario(
'ruby_protobuf_sync_streaming_qps_unconstrained', 'ruby_protobuf_sync_streaming_qps_unconstrained', rpc_type='STREAMING',
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
client_type='SYNC_CLIENT',
server_type='SYNC_SERVER',
unconstrained_client='sync') unconstrained_client='sync')
yield _ping_pong_scenario( yield _ping_pong_scenario(
'ruby_to_cpp_protobuf_sync_unary_ping_pong', 'ruby_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY',
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
client_type='SYNC_CLIENT', server_language='c++', server_core_limit=1, async_server_threads=1)
server_type='SYNC_SERVER',
server_language='c++',
server_core_limit=1,
async_server_threads=1)
yield _ping_pong_scenario( yield _ping_pong_scenario(
'ruby_to_cpp_protobuf_sync_streaming_ping_pong', 'ruby_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING',
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
client_type='SYNC_CLIENT', server_language='c++', server_core_limit=1, async_server_threads=1)
server_type='SYNC_SERVER',
server_language='c++',
server_core_limit=1,
async_server_threads=1)
def __str__(self): def __str__(self):
return 'ruby' return 'ruby'
@ -598,88 +504,61 @@ class JavaLanguage:
def scenarios(self): def scenarios(self):
for secure in [True, False]: for secure in [True, False]:
secstr = 'secure' if secure else 'insecure' secstr = 'secure' if secure else 'insecure'
smoketest_categories = [SMOKETEST] if secure else [] smoketest_categories = ([SMOKETEST] if secure else []) + [SCALABLE]
yield _ping_pong_scenario( yield _ping_pong_scenario(
'java_generic_async_streaming_ping_pong_%s' % secstr, 'java_generic_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING',
rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
client_type='ASYNC_CLIENT', use_generic_payload=True, async_server_threads=1,
server_type='ASYNC_GENERIC_SERVER', secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS,
use_generic_payload=True,
async_server_threads=1,
secure=secure,
warmup_seconds=JAVA_WARMUP_SECONDS,
categories=smoketest_categories) categories=smoketest_categories)
yield _ping_pong_scenario( yield _ping_pong_scenario(
'java_protobuf_async_streaming_ping_pong_%s' % secstr, 'java_protobuf_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING',
rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='ASYNC_CLIENT',
server_type='ASYNC_SERVER',
async_server_threads=1, async_server_threads=1,
secure=secure, secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS)
warmup_seconds=JAVA_WARMUP_SECONDS)
yield _ping_pong_scenario( yield _ping_pong_scenario(
'java_protobuf_async_unary_ping_pong_%s' % secstr, 'java_protobuf_async_unary_ping_pong_%s' % secstr, rpc_type='UNARY',
rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='ASYNC_CLIENT',
server_type='ASYNC_SERVER',
async_server_threads=1, async_server_threads=1,
secure=secure, secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS,
warmup_seconds=JAVA_WARMUP_SECONDS,
categories=smoketest_categories) categories=smoketest_categories)
yield _ping_pong_scenario( yield _ping_pong_scenario(
'java_protobuf_unary_ping_pong_%s' % secstr, 'java_protobuf_unary_ping_pong_%s' % secstr, rpc_type='UNARY',
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
client_type='SYNC_CLIENT',
server_type='SYNC_SERVER',
async_server_threads=1, async_server_threads=1,
secure=secure, secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS)
warmup_seconds=JAVA_WARMUP_SECONDS)
yield _ping_pong_scenario( yield _ping_pong_scenario(
'java_protobuf_async_unary_qps_unconstrained_%s' % secstr, 'java_protobuf_async_unary_qps_unconstrained_%s' % secstr, rpc_type='UNARY',
rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='ASYNC_CLIENT',
server_type='ASYNC_SERVER',
unconstrained_client='async', unconstrained_client='async',
secure=secure, secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS,
warmup_seconds=JAVA_WARMUP_SECONDS, categories=smoketest_categories+[SCALABLE])
categories=smoketest_categories + [SCALABLE])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'java_protobuf_async_streaming_qps_unconstrained_%s' % secstr, 'java_protobuf_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING',
rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
client_type='ASYNC_CLIENT',
server_type='ASYNC_SERVER',
unconstrained_client='async', unconstrained_client='async',
secure=secure, secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS,
warmup_seconds=JAVA_WARMUP_SECONDS,
categories=[SCALABLE]) categories=[SCALABLE])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'java_generic_async_streaming_qps_unconstrained_%s' % secstr, 'java_generic_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING',
rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
client_type='ASYNC_CLIENT', unconstrained_client='async', use_generic_payload=True,
server_type='ASYNC_GENERIC_SERVER', secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS,
unconstrained_client='async',
use_generic_payload=True,
secure=secure,
warmup_seconds=JAVA_WARMUP_SECONDS,
categories=[SCALABLE]) categories=[SCALABLE])
yield _ping_pong_scenario( yield _ping_pong_scenario(
'java_generic_async_streaming_qps_one_server_core_%s' % secstr, 'java_generic_async_streaming_qps_one_server_core_%s' % secstr, rpc_type='STREAMING',
rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
client_type='ASYNC_CLIENT', unconstrained_client='async', use_generic_payload=True,
server_type='ASYNC_GENERIC_SERVER',
unconstrained_client='async',
use_generic_payload=True,
async_server_threads=1, async_server_threads=1,
secure=secure, secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS)
warmup_seconds=JAVA_WARMUP_SECONDS)
# TODO(jtattermusch): add scenarios java vs C++ # TODO(jtattermusch): add scenarios java vs C++
@ -702,53 +581,42 @@ class GoLanguage:
def scenarios(self): def scenarios(self):
for secure in [True, False]: for secure in [True, False]:
secstr = 'secure' if secure else 'insecure' secstr = 'secure' if secure else 'insecure'
smoketest_categories = [SMOKETEST] if secure else [] smoketest_categories = ([SMOKETEST] if secure else []) + [SCALABLE]
# ASYNC_GENERIC_SERVER for Go actually uses a sync streaming server, # ASYNC_GENERIC_SERVER for Go actually uses a sync streaming server,
# but that's mostly because of lack of better name of the enum value. # but that's mostly because of lack of better name of the enum value.
yield _ping_pong_scenario( yield _ping_pong_scenario(
'go_generic_sync_streaming_ping_pong_%s' % secstr, 'go_generic_sync_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING',
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
client_type='SYNC_CLIENT', use_generic_payload=True, async_server_threads=1,
server_type='ASYNC_GENERIC_SERVER',
use_generic_payload=True,
async_server_threads=1,
secure=secure, secure=secure,
categories=smoketest_categories) categories=smoketest_categories)
yield _ping_pong_scenario( yield _ping_pong_scenario(
'go_protobuf_sync_streaming_ping_pong_%s' % secstr, 'go_protobuf_sync_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING',
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
client_type='SYNC_CLIENT',
server_type='SYNC_SERVER',
async_server_threads=1, async_server_threads=1,
secure=secure) secure=secure)
yield _ping_pong_scenario( yield _ping_pong_scenario(
'go_protobuf_sync_unary_ping_pong_%s' % secstr, 'go_protobuf_sync_unary_ping_pong_%s' % secstr, rpc_type='UNARY',
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
client_type='SYNC_CLIENT',
server_type='SYNC_SERVER',
async_server_threads=1, async_server_threads=1,
secure=secure, secure=secure,
categories=smoketest_categories) categories=smoketest_categories)
# unconstrained_client='async' is intended (client uses goroutines) # unconstrained_client='async' is intended (client uses goroutines)
yield _ping_pong_scenario( yield _ping_pong_scenario(
'go_protobuf_sync_unary_qps_unconstrained_%s' % secstr, 'go_protobuf_sync_unary_qps_unconstrained_%s' % secstr, rpc_type='UNARY',
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
client_type='SYNC_CLIENT',
server_type='SYNC_SERVER',
unconstrained_client='async', unconstrained_client='async',
secure=secure, secure=secure,
categories=smoketest_categories + [SCALABLE]) categories=smoketest_categories+[SCALABLE])
# unconstrained_client='async' is intended (client uses goroutines) # unconstrained_client='async' is intended (client uses goroutines)
yield _ping_pong_scenario( yield _ping_pong_scenario(
'go_protobuf_sync_streaming_qps_unconstrained_%s' % secstr, 'go_protobuf_sync_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING',
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
client_type='SYNC_CLIENT',
server_type='SYNC_SERVER',
unconstrained_client='async', unconstrained_client='async',
secure=secure, secure=secure,
categories=[SCALABLE]) categories=[SCALABLE])
@ -757,12 +625,9 @@ class GoLanguage:
# ASYNC_GENERIC_SERVER for Go actually uses a sync streaming server, # ASYNC_GENERIC_SERVER for Go actually uses a sync streaming server,
# but that's mostly because of lack of better name of the enum value. # but that's mostly because of lack of better name of the enum value.
yield _ping_pong_scenario( yield _ping_pong_scenario(
'go_generic_sync_streaming_qps_unconstrained_%s' % secstr, 'go_generic_sync_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING',
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
client_type='SYNC_CLIENT', unconstrained_client='async', use_generic_payload=True,
server_type='ASYNC_GENERIC_SERVER',
unconstrained_client='async',
use_generic_payload=True,
secure=secure, secure=secure,
categories=[SCALABLE]) categories=[SCALABLE])
@ -773,11 +638,11 @@ class GoLanguage:
LANGUAGES = { LANGUAGES = {
'c++': CXXLanguage(), 'c++' : CXXLanguage(),
'csharp': CSharpLanguage(), 'csharp' : CSharpLanguage(),
'node': NodeLanguage(), 'node' : NodeLanguage(),
'ruby': RubyLanguage(), 'ruby' : RubyLanguage(),
'java': JavaLanguage(), 'java' : JavaLanguage(),
'python': PythonLanguage(), 'python' : PythonLanguage(),
'go': GoLanguage(), 'go' : GoLanguage(),
} }

@ -280,7 +280,7 @@ def create_qpsworkers(languages, worker_hosts):
for worker_idx, worker in enumerate(workers)] for worker_idx, worker in enumerate(workers)]
Scenario = collections.namedtuple('Scenario', 'jobspec workers') Scenario = collections.namedtuple('Scenario', 'jobspec workers name')
def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*', def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*',
@ -307,7 +307,7 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*',
create_netperf_jobspec(server_host=netperf_server, create_netperf_jobspec(server_host=netperf_server,
client_host=netperf_client, client_host=netperf_client,
bq_result_table=bq_result_table), bq_result_table=bq_result_table),
_NO_WORKERS)) _NO_WORKERS, 'netperf'))
for language in languages: for language in languages:
for scenario_json in language.scenarios(): for scenario_json in language.scenarios():
@ -347,7 +347,8 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*',
[w.host_and_port for w in workers], [w.host_and_port for w in workers],
remote_host=remote_host, remote_host=remote_host,
bq_result_table=bq_result_table), bq_result_table=bq_result_table),
workers) workers,
scenario_json['name'])
scenarios.append(scenario) scenarios.append(scenario)
return scenarios return scenarios
@ -382,6 +383,11 @@ argp.add_argument('--remote_worker_host',
nargs='+', nargs='+',
default=[], default=[],
help='Worker hosts where to start QPS workers.') help='Worker hosts where to start QPS workers.')
argp.add_argument('--dry_run',
default=False,
action='store_const',
const=True,
help='Just list scenarios to be run, but don\'t run them.')
argp.add_argument('-r', '--regex', default='.*', type=str, argp.add_argument('-r', '--regex', default='.*', type=str,
help='Regex to select scenarios to run.') help='Regex to select scenarios to run.')
argp.add_argument('--bq_result_table', default=None, type=str, argp.add_argument('--bq_result_table', default=None, type=str,
@ -412,16 +418,18 @@ if args.remote_worker_host:
if args.remote_driver_host: if args.remote_driver_host:
remote_hosts.add(args.remote_driver_host) remote_hosts.add(args.remote_driver_host)
if remote_hosts: if not args.dry_run:
archive_repo(languages=[str(l) for l in languages]) if remote_hosts:
prepare_remote_hosts(remote_hosts, prepare_local=True) archive_repo(languages=[str(l) for l in languages])
else: prepare_remote_hosts(remote_hosts, prepare_local=True)
prepare_remote_hosts([], prepare_local=True) else:
prepare_remote_hosts([], prepare_local=True)
build_local = False build_local = False
if not args.remote_driver_host: if not args.remote_driver_host:
build_local = True build_local = True
build_on_remote_hosts(remote_hosts, languages=[str(l) for l in languages], build_local=build_local) if not args.dry_run:
build_on_remote_hosts(remote_hosts, languages=[str(l) for l in languages], build_local=build_local)
qpsworker_jobs = create_qpsworkers(languages, args.remote_worker_host) qpsworker_jobs = create_qpsworkers(languages, args.remote_worker_host)
@ -443,11 +451,14 @@ if not scenarios:
raise Exception('No scenarios to run') raise Exception('No scenarios to run')
for scenario in scenarios: for scenario in scenarios:
try: if args.dry_run:
for worker in scenario.workers: print(scenario.name)
worker.start() else:
jobset.run([scenario.jobspec, try:
create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)], for worker in scenario.workers:
newline_on_success=True, maxjobs=1) worker.start()
finally: jobset.run([scenario.jobspec,
finish_qps_workers(scenario.workers) create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)],
newline_on_success=True, maxjobs=1)
finally:
finish_qps_workers(scenario.workers)

@ -44,7 +44,7 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules
c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 third_party/boringssl (version_for_cocoapods_2.0-100-gc880e42) c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 third_party/boringssl (version_for_cocoapods_2.0-100-gc880e42)
05b155ff59114735ec8cd089f669c4c3d8f59029 third_party/gflags (v2.1.0-45-g05b155f) 05b155ff59114735ec8cd089f669c4c3d8f59029 third_party/gflags (v2.1.0-45-g05b155f)
c99458533a9b4c743ed51537e25989ea55944908 third_party/googletest (release-1.7.0) c99458533a9b4c743ed51537e25989ea55944908 third_party/googletest (release-1.7.0)
1a586735085e817b1f52e53feec92ce418049f69 third_party/protobuf (v3.0.2) a428e42072765993ff674fda72863c9f1aa2d268 third_party/protobuf (v3.1.0)
50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8) 50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8)
bcad91771b7f0bff28a1cac1981d7ef2b9bcef3c third_party/thrift bcad91771b7f0bff28a1cac1981d7ef2b9bcef3c third_party/thrift
EOF EOF

@ -346,6 +346,22 @@
"headers": [], "headers": [],
"is_filegroup": false, "is_filegroup": false,
"language": "c", "language": "c",
"name": "connection_refused_test",
"src": [
"test/core/end2end/connection_refused_test.c"
],
"third_party": false,
"type": "target"
},
{
"deps": [
"gpr",
"gpr_test_util",
"grpc",
"grpc_test_util"
],
"headers": [],
"language": "c",
"name": "dns_resolver_connectivity_test", "name": "dns_resolver_connectivity_test",
"src": [ "src": [
"test/core/client_config/resolvers/dns_resolver_connectivity_test.c" "test/core/client_config/resolvers/dns_resolver_connectivity_test.c"
@ -2482,6 +2498,20 @@
"third_party": false, "third_party": false,
"type": "target" "type": "target"
}, },
{
"deps": [
"grpc_plugin_support"
],
"headers": [],
"is_filegroup": false,
"language": "c++",
"name": "grpc_php_plugin",
"src": [
"src/compiler/php_plugin.cc"
],
"third_party": false,
"type": "target"
},
{ {
"deps": [ "deps": [
"grpc_plugin_support" "grpc_plugin_support"
@ -5047,6 +5077,8 @@
"src/compiler/node_generator_helpers.h", "src/compiler/node_generator_helpers.h",
"src/compiler/objective_c_generator.h", "src/compiler/objective_c_generator.h",
"src/compiler/objective_c_generator_helpers.h", "src/compiler/objective_c_generator_helpers.h",
"src/compiler/php_generator.h",
"src/compiler/php_generator_helpers.h",
"src/compiler/python_generator.h", "src/compiler/python_generator.h",
"src/compiler/ruby_generator.h", "src/compiler/ruby_generator.h",
"src/compiler/ruby_generator_helpers-inl.h", "src/compiler/ruby_generator_helpers-inl.h",
@ -5071,6 +5103,9 @@
"src/compiler/objective_c_generator.cc", "src/compiler/objective_c_generator.cc",
"src/compiler/objective_c_generator.h", "src/compiler/objective_c_generator.h",
"src/compiler/objective_c_generator_helpers.h", "src/compiler/objective_c_generator_helpers.h",
"src/compiler/php_generator.cc",
"src/compiler/php_generator.h",
"src/compiler/php_generator_helpers.h",
"src/compiler/python_generator.cc", "src/compiler/python_generator.cc",
"src/compiler/python_generator.h", "src/compiler/python_generator.h",
"src/compiler/ruby_generator.cc", "src/compiler/ruby_generator.cc",

@ -379,6 +379,27 @@
"windows" "windows"
] ]
}, },
{
"args": [],
"ci_platforms": [
"linux",
"mac",
"posix",
"windows"
],
"cpu_cost": 0.1,
"exclude_configs": [],
"flaky": false,
"gtest": false,
"language": "c",
"name": "connection_refused_test",
"platforms": [
"linux",
"mac",
"posix",
"windows"
]
},
{ {
"args": [], "args": [],
"ci_platforms": [ "ci_platforms": [

@ -6,3 +6,6 @@ race:cleanse_ctr
race:ssleay_rand_add race:ssleay_rand_add
race:ssleay_rand_bytes race:ssleay_rand_bytes
race:__sleep_for race:__sleep_for
# protobuf has an idempotent write race in ByteSize
# https://github.com/google/protobuf/issues/2169
race:ByteSize

@ -231,6 +231,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "connection_prefix_bad_clien
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "connection_refused_test", "vcxproj\test\connection_refused_test\connection_refused_test.vcxproj", "{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}"
ProjectSection(myProperties) = preProject
lib = "False"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}
{29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9}
{EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037}
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dns_resolver_connectivity_test", "vcxproj\test\dns_resolver_connectivity_test\dns_resolver_connectivity_test.vcxproj", "{F7B6FE68-E847-D7CA-4062-E737E542BCC3}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dns_resolver_connectivity_test", "vcxproj\test\dns_resolver_connectivity_test\dns_resolver_connectivity_test.vcxproj", "{F7B6FE68-E847-D7CA-4062-E737E542BCC3}"
ProjectSection(myProperties) = preProject ProjectSection(myProperties) = preProject
lib = "False" lib = "False"
@ -1855,6 +1866,22 @@ Global
{AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release-DLL|Win32.Build.0 = Release|Win32 {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release-DLL|Win32.Build.0 = Release|Win32
{AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release-DLL|x64.ActiveCfg = Release|x64 {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release-DLL|x64.ActiveCfg = Release|x64
{AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release-DLL|x64.Build.0 = Release|x64 {AF9D0EB2-2A53-B815-3A63-E82C7F91DB29}.Release-DLL|x64.Build.0 = Release|x64
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug|Win32.ActiveCfg = Debug|Win32
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug|x64.ActiveCfg = Debug|x64
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release|Win32.ActiveCfg = Release|Win32
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release|x64.ActiveCfg = Release|x64
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug|Win32.Build.0 = Debug|Win32
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug|x64.Build.0 = Debug|x64
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release|Win32.Build.0 = Release|Win32
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release|x64.Build.0 = Release|x64
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug-DLL|Win32.Build.0 = Debug|Win32
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug-DLL|x64.ActiveCfg = Debug|x64
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Debug-DLL|x64.Build.0 = Debug|x64
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release-DLL|Win32.ActiveCfg = Release|Win32
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release-DLL|Win32.Build.0 = Release|Win32
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release-DLL|x64.ActiveCfg = Release|x64
{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}.Release-DLL|x64.Build.0 = Release|x64
{F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Debug|Win32.ActiveCfg = Debug|Win32 {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Debug|Win32.ActiveCfg = Debug|Win32
{F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Debug|x64.ActiveCfg = Debug|x64 {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Debug|x64.ActiveCfg = Debug|x64
{F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Release|Win32.ActiveCfg = Release|Win32 {F7B6FE68-E847-D7CA-4062-E737E542BCC3}.Release|Win32.ActiveCfg = Release|Win32

@ -35,6 +35,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_objective_c_plugin", "
{B6E81D84-2ACB-41B8-8781-493A944C7817} = {B6E81D84-2ACB-41B8-8781-493A944C7817} {B6E81D84-2ACB-41B8-8781-493A944C7817} = {B6E81D84-2ACB-41B8-8781-493A944C7817}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_php_plugin", "vcxproj\.\grpc_php_plugin\grpc_php_plugin.vcxproj", "{2C5F74B5-2F1E-A7A7-45EA-250AF73A1CEC}"
ProjectSection(myProperties) = preProject
lib = "False"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
{B6E81D84-2ACB-41B8-8781-493A944C7817} = {B6E81D84-2ACB-41B8-8781-493A944C7817}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_plugin_support", "vcxproj\.\grpc_plugin_support\grpc_plugin_support.vcxproj", "{B6E81D84-2ACB-41B8-8781-493A944C7817}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_plugin_support", "vcxproj\.\grpc_plugin_support\grpc_plugin_support.vcxproj", "{B6E81D84-2ACB-41B8-8781-493A944C7817}"
ProjectSection(myProperties) = preProject ProjectSection(myProperties) = preProject
lib = "True" lib = "True"
@ -96,6 +104,14 @@ Global
{19564640-CEE6-4921-ABA5-676ED79A36F6}.Debug|x64.Build.0 = Debug|x64 {19564640-CEE6-4921-ABA5-676ED79A36F6}.Debug|x64.Build.0 = Debug|x64
{19564640-CEE6-4921-ABA5-676ED79A36F6}.Release|Win32.Build.0 = Release|Win32 {19564640-CEE6-4921-ABA5-676ED79A36F6}.Release|Win32.Build.0 = Release|Win32
{19564640-CEE6-4921-ABA5-676ED79A36F6}.Release|x64.Build.0 = Release|x64 {19564640-CEE6-4921-ABA5-676ED79A36F6}.Release|x64.Build.0 = Release|x64
{2C5F74B5-2F1E-A7A7-45EA-250AF73A1CEC}.Debug|Win32.ActiveCfg = Debug|Win32
{2C5F74B5-2F1E-A7A7-45EA-250AF73A1CEC}.Debug|x64.ActiveCfg = Debug|x64
{2C5F74B5-2F1E-A7A7-45EA-250AF73A1CEC}.Release|Win32.ActiveCfg = Release|Win32
{2C5F74B5-2F1E-A7A7-45EA-250AF73A1CEC}.Release|x64.ActiveCfg = Release|x64
{2C5F74B5-2F1E-A7A7-45EA-250AF73A1CEC}.Debug|Win32.Build.0 = Debug|Win32
{2C5F74B5-2F1E-A7A7-45EA-250AF73A1CEC}.Debug|x64.Build.0 = Debug|x64
{2C5F74B5-2F1E-A7A7-45EA-250AF73A1CEC}.Release|Win32.Build.0 = Release|Win32
{2C5F74B5-2F1E-A7A7-45EA-250AF73A1CEC}.Release|x64.Build.0 = Release|x64
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|Win32.ActiveCfg = Debug|Win32 {B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|Win32.ActiveCfg = Debug|Win32
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|x64.ActiveCfg = Debug|x64 {B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|x64.ActiveCfg = Debug|x64
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Release|Win32.ActiveCfg = Release|Win32 {B6E81D84-2ACB-41B8-8781-493A944C7817}.Release|Win32.ActiveCfg = Release|Win32

@ -0,0 +1,168 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{2C5F74B5-2F1E-A7A7-45EA-250AF73A1CEC}</ProjectGuid>
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration">
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration">
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
<Import Project="$(SolutionDir)\..\vsprojects\protobuf.props" />
<Import Project="$(SolutionDir)\..\vsprojects\protoc.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<TargetName>grpc_php_plugin</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>grpc_php_plugin</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\src\compiler\php_plugin.cc">
</ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_plugin_support\grpc_plugin_support.vcxproj">
<Project>{B6E81D84-2ACB-41B8-8781-493A944C7817}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>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}.</ErrorText>
</PropertyGroup>
</Target>
</Project>

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\src\compiler\php_plugin.cc">
<Filter>src\compiler</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="src">
<UniqueIdentifier>{d7fb4039-77f4-10f2-59fe-bb98fb56950a}</UniqueIdentifier>
</Filter>
<Filter Include="src\compiler">
<UniqueIdentifier>{5560fb58-2ae8-75cc-fbca-e630a50c15bf}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

@ -161,6 +161,8 @@
<ClInclude Include="$(SolutionDir)\..\src\compiler\node_generator_helpers.h" /> <ClInclude Include="$(SolutionDir)\..\src\compiler\node_generator_helpers.h" />
<ClInclude Include="$(SolutionDir)\..\src\compiler\objective_c_generator.h" /> <ClInclude Include="$(SolutionDir)\..\src\compiler\objective_c_generator.h" />
<ClInclude Include="$(SolutionDir)\..\src\compiler\objective_c_generator_helpers.h" /> <ClInclude Include="$(SolutionDir)\..\src\compiler\objective_c_generator_helpers.h" />
<ClInclude Include="$(SolutionDir)\..\src\compiler\php_generator.h" />
<ClInclude Include="$(SolutionDir)\..\src\compiler\php_generator_helpers.h" />
<ClInclude Include="$(SolutionDir)\..\src\compiler\python_generator.h" /> <ClInclude Include="$(SolutionDir)\..\src\compiler\python_generator.h" />
<ClInclude Include="$(SolutionDir)\..\src\compiler\ruby_generator.h" /> <ClInclude Include="$(SolutionDir)\..\src\compiler\ruby_generator.h" />
<ClInclude Include="$(SolutionDir)\..\src\compiler\ruby_generator_helpers-inl.h" /> <ClInclude Include="$(SolutionDir)\..\src\compiler\ruby_generator_helpers-inl.h" />
@ -176,6 +178,8 @@
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\compiler\objective_c_generator.cc"> <ClCompile Include="$(SolutionDir)\..\src\compiler\objective_c_generator.cc">
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\compiler\php_generator.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\compiler\python_generator.cc"> <ClCompile Include="$(SolutionDir)\..\src\compiler\python_generator.cc">
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\compiler\ruby_generator.cc"> <ClCompile Include="$(SolutionDir)\..\src\compiler\ruby_generator.cc">

@ -13,6 +13,9 @@
<ClCompile Include="$(SolutionDir)\..\src\compiler\objective_c_generator.cc"> <ClCompile Include="$(SolutionDir)\..\src\compiler\objective_c_generator.cc">
<Filter>src\compiler</Filter> <Filter>src\compiler</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\compiler\php_generator.cc">
<Filter>src\compiler</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\compiler\python_generator.cc"> <ClCompile Include="$(SolutionDir)\..\src\compiler\python_generator.cc">
<Filter>src\compiler</Filter> <Filter>src\compiler</Filter>
</ClCompile> </ClCompile>
@ -56,6 +59,12 @@
<ClInclude Include="$(SolutionDir)\..\src\compiler\objective_c_generator_helpers.h"> <ClInclude Include="$(SolutionDir)\..\src\compiler\objective_c_generator_helpers.h">
<Filter>src\compiler</Filter> <Filter>src\compiler</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\compiler\php_generator.h">
<Filter>src\compiler</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\compiler\php_generator_helpers.h">
<Filter>src\compiler</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\compiler\python_generator.h"> <ClInclude Include="$(SolutionDir)\..\src\compiler\python_generator.h">
<Filter>src\compiler</Filter> <Filter>src\compiler</Filter>
</ClInclude> </ClInclude>

@ -0,0 +1,199 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{961DFABF-18F2-7D46-4D69-B82A5E9A78B2}</ProjectGuid>
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration">
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration">
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
<Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<TargetName>connection_refused_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
<Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>connection_refused_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
<Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\connection_refused_test.c">
</ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_test_util\grpc_test_util.vcxproj">
<Project>{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}</Project>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc\grpc.vcxproj">
<Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr_test_util\gpr_test_util.vcxproj">
<Project>{EAB0A629-17A9-44DB-B5FF-E91A721FE037}</Project>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj">
<Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>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}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
</Target>
</Project>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\connection_refused_test.c">
<Filter>test\core\end2end</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="test">
<UniqueIdentifier>{4b0c4345-e702-8911-ab5a-c8fb187ff62a}</UniqueIdentifier>
</Filter>
<Filter Include="test\core">
<UniqueIdentifier>{bf069703-6525-081f-b965-b73017288d02}</UniqueIdentifier>
</Filter>
<Filter Include="test\core\end2end">
<UniqueIdentifier>{4700e535-ec1c-027a-7d48-afa5ba66e3d3}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>
Loading…
Cancel
Save