Merge github.com:grpc/grpc into qps_failya

pull/12856/head
Craig Tiller 7 years ago
commit d6e18652b9
  1. 11
      gRPC-Core.podspec
  2. 3
      gRPC.podspec
  3. 32
      include/grpc/module.modulemap
  4. 19
      src/core/ext/transport/chttp2/transport/flow_control.cc
  5. 7
      src/core/lib/iomgr/block_annotate.h
  6. 2
      src/core/lib/iomgr/ev_epollsig_linux.cc
  7. 2
      src/core/lib/iomgr/timer_uv.cc
  8. 6
      src/core/lib/support/log_android.cc
  9. 6
      src/objective-c/BoringSSL.podspec
  10. 56
      src/php/tests/qps/client.php
  11. 33
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Core/Stats.php
  12. 215
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Control.php
  13. 21
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/ProxyService.php
  14. 53
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Services.php
  15. 47
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Stats.php
  16. 75
      src/php/tests/qps/generated_code/Grpc/Core/Bucket.php
  17. 49
      src/php/tests/qps/generated_code/Grpc/Core/Histogram.php
  18. 102
      src/php/tests/qps/generated_code/Grpc/Core/Metric.php
  19. 49
      src/php/tests/qps/generated_code/Grpc/Core/Stats.php
  20. 50
      src/php/tests/qps/generated_code/Grpc/Testing/BenchmarkServiceClient.php
  21. 21
      src/php/tests/qps/generated_code/Grpc/Testing/BoolValue.php
  22. 24
      src/php/tests/qps/generated_code/Grpc/Testing/ByteBufferParams.php
  23. 34
      src/php/tests/qps/generated_code/Grpc/Testing/ChannelArg.php
  24. 27
      src/php/tests/qps/generated_code/Grpc/Testing/ClientArgs.php
  25. 288
      src/php/tests/qps/generated_code/Grpc/Testing/ClientConfig.php
  26. 147
      src/php/tests/qps/generated_code/Grpc/Testing/ClientStats.php
  27. 15
      src/php/tests/qps/generated_code/Grpc/Testing/ClientStatus.php
  28. 12
      src/php/tests/qps/generated_code/Grpc/Testing/ClientType.php
  29. 4
      src/php/tests/qps/generated_code/Grpc/Testing/ClosedLoopParams.php
  30. 4
      src/php/tests/qps/generated_code/Grpc/Testing/ComplexProtoParams.php
  31. 2
      src/php/tests/qps/generated_code/Grpc/Testing/CoreRequest.php
  32. 19
      src/php/tests/qps/generated_code/Grpc/Testing/CoreResponse.php
  33. 26
      src/php/tests/qps/generated_code/Grpc/Testing/EchoStatus.php
  34. 76
      src/php/tests/qps/generated_code/Grpc/Testing/HistogramData.php
  35. 38
      src/php/tests/qps/generated_code/Grpc/Testing/HistogramParams.php
  36. 27
      src/php/tests/qps/generated_code/Grpc/Testing/LoadParams.php
  37. 21
      src/php/tests/qps/generated_code/Grpc/Testing/Mark.php
  38. 38
      src/php/tests/qps/generated_code/Grpc/Testing/Payload.php
  39. 38
      src/php/tests/qps/generated_code/Grpc/Testing/PayloadConfig.php
  40. 8
      src/php/tests/qps/generated_code/Grpc/Testing/PayloadType.php
  41. 21
      src/php/tests/qps/generated_code/Grpc/Testing/PoissonParams.php
  42. 16
      src/php/tests/qps/generated_code/Grpc/Testing/ProxyClientServiceClient.php
  43. 13
      src/php/tests/qps/generated_code/Grpc/Testing/ProxyStat.php
  44. 32
      src/php/tests/qps/generated_code/Grpc/Testing/ReconnectInfo.php
  45. 15
      src/php/tests/qps/generated_code/Grpc/Testing/ReconnectParams.php
  46. 50
      src/php/tests/qps/generated_code/Grpc/Testing/ReportQpsScenarioServiceClient.php
  47. 24
      src/php/tests/qps/generated_code/Grpc/Testing/RequestResultCount.php
  48. 57
      src/php/tests/qps/generated_code/Grpc/Testing/ResponseParameters.php
  49. 18
      src/php/tests/qps/generated_code/Grpc/Testing/RpcType.php
  50. 144
      src/php/tests/qps/generated_code/Grpc/Testing/Scenario.php
  51. 193
      src/php/tests/qps/generated_code/Grpc/Testing/ScenarioResult.php
  52. 352
      src/php/tests/qps/generated_code/Grpc/Testing/ScenarioResultSummary.php
  53. 21
      src/php/tests/qps/generated_code/Grpc/Testing/Scenarios.php
  54. 52
      src/php/tests/qps/generated_code/Grpc/Testing/SecurityParams.php
  55. 27
      src/php/tests/qps/generated_code/Grpc/Testing/ServerArgs.php
  56. 211
      src/php/tests/qps/generated_code/Grpc/Testing/ServerConfig.php
  57. 151
      src/php/tests/qps/generated_code/Grpc/Testing/ServerStats.php
  58. 49
      src/php/tests/qps/generated_code/Grpc/Testing/ServerStatus.php
  59. 12
      src/php/tests/qps/generated_code/Grpc/Testing/ServerType.php
  60. 24
      src/php/tests/qps/generated_code/Grpc/Testing/SimpleProtoParams.php
  61. 148
      src/php/tests/qps/generated_code/Grpc/Testing/SimpleRequest.php
  62. 57
      src/php/tests/qps/generated_code/Grpc/Testing/SimpleResponse.php
  63. 42
      src/php/tests/qps/generated_code/Grpc/Testing/StreamingInputCallRequest.php
  64. 21
      src/php/tests/qps/generated_code/Grpc/Testing/StreamingInputCallResponse.php
  65. 82
      src/php/tests/qps/generated_code/Grpc/Testing/StreamingOutputCallRequest.php
  66. 23
      src/php/tests/qps/generated_code/Grpc/Testing/StreamingOutputCallResponse.php
  67. 2
      src/php/tests/qps/generated_code/Grpc/Testing/Void.php
  68. 10
      src/php/tests/qps/generated_code/Grpc/Testing/WorkerServiceClient.php
  69. 93
      src/php/tests/qps/histogram.php
  70. 2
      src/proto/grpc/testing/proxy-service.proto
  71. 15
      src/ruby/qps/histogram.rb
  72. 40
      src/ruby/qps/proxy-worker.rb
  73. 1
      src/ruby/qps/src/proto/grpc/testing/proxy-service_pb.rb
  74. 1
      src/ruby/qps/src/proto/grpc/testing/proxy-service_services_pb.rb
  75. 10
      templates/gRPC-Core.podspec.template
  76. 3
      templates/gRPC.podspec.template
  77. 32
      templates/include/grpc/module.modulemap.template
  78. 3
      templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template
  79. 5
      test/core/backoff/backoff_test.c
  80. 20
      test/core/iomgr/tcp_client_uv_test.c
  81. 4
      test/core/iomgr/tcp_server_uv_test.c
  82. 14
      test/core/transport/timeout_encoding_test.c
  83. 3
      tools/dockerfile/test/node_jessie_x64/Dockerfile
  84. 13
      tools/internal_ci/helper_scripts/prepare_build_macos_rc
  85. 2
      tools/internal_ci/linux/grpc_interop_toprod.sh
  86. 2
      tools/jenkins/run_full_performance.sh
  87. 9
      tools/run_tests/performance/build_performance.sh
  88. 30
      tools/run_tests/performance/build_performance_php7.sh
  89. 12
      tools/run_tests/performance/run_worker_php.sh
  90. 43
      tools/run_tests/performance/scenario_config.py

@ -106,6 +106,8 @@ Pod::Spec.new do |s|
ss.source_files = 'include/grpc/support/alloc.h', ss.source_files = 'include/grpc/support/alloc.h',
'include/grpc/support/atm.h', 'include/grpc/support/atm.h',
'include/grpc/support/atm_gcc_atomic.h', 'include/grpc/support/atm_gcc_atomic.h',
'include/grpc/support/atm_gcc_sync.h',
'include/grpc/support/atm_windows.h',
'include/grpc/support/avl.h', 'include/grpc/support/avl.h',
'include/grpc/support/cmdline.h', 'include/grpc/support/cmdline.h',
'include/grpc/support/cpu.h', 'include/grpc/support/cpu.h',
@ -120,13 +122,18 @@ Pod::Spec.new do |s|
'include/grpc/support/sync_custom.h', 'include/grpc/support/sync_custom.h',
'include/grpc/support/sync_generic.h', 'include/grpc/support/sync_generic.h',
'include/grpc/support/sync_posix.h', 'include/grpc/support/sync_posix.h',
'include/grpc/support/sync_windows.h',
'include/grpc/support/thd.h', 'include/grpc/support/thd.h',
'include/grpc/support/time.h', 'include/grpc/support/time.h',
'include/grpc/support/tls.h', 'include/grpc/support/tls.h',
'include/grpc/support/tls_gcc.h',
'include/grpc/support/tls_msvc.h',
'include/grpc/support/tls_pthread.h', 'include/grpc/support/tls_pthread.h',
'include/grpc/support/useful.h', 'include/grpc/support/useful.h',
'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_slice.h',
'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/gpr_types.h',
'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/port_platform.h',
@ -134,6 +141,7 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/sync_custom.h', 'include/grpc/impl/codegen/sync_custom.h',
'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h', 'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/impl/codegen/byte_buffer.h', 'include/grpc/impl/codegen/byte_buffer.h',
'include/grpc/impl/codegen/byte_buffer_reader.h', 'include/grpc/impl/codegen/byte_buffer_reader.h',
'include/grpc/impl/codegen/compression_types.h', 'include/grpc/impl/codegen/compression_types.h',
@ -145,6 +153,8 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/status.h', 'include/grpc/impl/codegen/status.h',
'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_slice.h',
'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/gpr_types.h',
'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/port_platform.h',
@ -152,6 +162,7 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/sync_custom.h', 'include/grpc/impl/codegen/sync_custom.h',
'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h', 'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/grpc_security.h', 'include/grpc/grpc_security.h',
'include/grpc/byte_buffer.h', 'include/grpc/byte_buffer.h',
'include/grpc/byte_buffer_reader.h', 'include/grpc/byte_buffer_reader.h',

@ -63,10 +63,13 @@ Pod::Spec.new do |s|
end end
s.subspec 'GID' do |ss| s.subspec 'GID' do |ss|
ss.ios.deployment_target = '7.0'
ss.header_mappings_dir = "#{src_dir}" ss.header_mappings_dir = "#{src_dir}"
ss.source_files = "#{src_dir}/GRPCCall+GID.{h,m}" ss.source_files = "#{src_dir}/GRPCCall+GID.{h,m}"
ss.dependency "#{s.name}/Main", version
ss.dependency 'Google/SignIn' ss.dependency 'Google/SignIn'
end end
end end

@ -4,7 +4,6 @@ framework module grpc {
header "support/alloc.h" header "support/alloc.h"
header "support/atm.h" header "support/atm.h"
header "support/atm_gcc_atomic.h"
header "support/avl.h" header "support/avl.h"
header "support/cmdline.h" header "support/cmdline.h"
header "support/cpu.h" header "support/cpu.h"
@ -16,23 +15,17 @@ framework module grpc {
header "support/string_util.h" header "support/string_util.h"
header "support/subprocess.h" header "support/subprocess.h"
header "support/sync.h" header "support/sync.h"
header "support/sync_custom.h"
header "support/sync_generic.h" header "support/sync_generic.h"
header "support/sync_posix.h"
header "support/thd.h" header "support/thd.h"
header "support/time.h" header "support/time.h"
header "support/tls.h" header "support/tls.h"
header "support/tls_pthread.h"
header "support/useful.h" header "support/useful.h"
header "impl/codegen/atm.h" header "impl/codegen/atm.h"
header "impl/codegen/atm_gcc_atomic.h"
header "impl/codegen/gpr_slice.h" header "impl/codegen/gpr_slice.h"
header "impl/codegen/gpr_types.h" header "impl/codegen/gpr_types.h"
header "impl/codegen/port_platform.h" header "impl/codegen/port_platform.h"
header "impl/codegen/sync.h" header "impl/codegen/sync.h"
header "impl/codegen/sync_custom.h"
header "impl/codegen/sync_generic.h" header "impl/codegen/sync_generic.h"
header "impl/codegen/sync_posix.h"
header "impl/codegen/byte_buffer.h" header "impl/codegen/byte_buffer.h"
header "impl/codegen/byte_buffer_reader.h" header "impl/codegen/byte_buffer_reader.h"
header "impl/codegen/compression_types.h" header "impl/codegen/compression_types.h"
@ -43,14 +36,11 @@ framework module grpc {
header "impl/codegen/slice.h" header "impl/codegen/slice.h"
header "impl/codegen/status.h" header "impl/codegen/status.h"
header "impl/codegen/atm.h" header "impl/codegen/atm.h"
header "impl/codegen/atm_gcc_atomic.h"
header "impl/codegen/gpr_slice.h" header "impl/codegen/gpr_slice.h"
header "impl/codegen/gpr_types.h" header "impl/codegen/gpr_types.h"
header "impl/codegen/port_platform.h" header "impl/codegen/port_platform.h"
header "impl/codegen/sync.h" header "impl/codegen/sync.h"
header "impl/codegen/sync_custom.h"
header "impl/codegen/sync_generic.h" header "impl/codegen/sync_generic.h"
header "impl/codegen/sync_posix.h"
header "grpc_security.h" header "grpc_security.h"
header "byte_buffer.h" header "byte_buffer.h"
header "byte_buffer_reader.h" header "byte_buffer_reader.h"
@ -65,6 +55,28 @@ framework module grpc {
header "support/workaround_list.h" header "support/workaround_list.h"
header "census.h" header "census.h"
textual header "support/atm_gcc_atomic.h"
textual header "support/atm_gcc_sync.h"
textual header "support/atm_windows.h"
textual header "support/sync_custom.h"
textual header "support/sync_posix.h"
textual header "support/sync_windows.h"
textual header "support/tls_gcc.h"
textual header "support/tls_msvc.h"
textual header "support/tls_pthread.h"
textual header "impl/codegen/atm_gcc_atomic.h"
textual header "impl/codegen/atm_gcc_sync.h"
textual header "impl/codegen/atm_windows.h"
textual header "impl/codegen/sync_custom.h"
textual header "impl/codegen/sync_posix.h"
textual header "impl/codegen/sync_windows.h"
textual header "impl/codegen/atm_gcc_atomic.h"
textual header "impl/codegen/atm_gcc_sync.h"
textual header "impl/codegen/atm_windows.h"
textual header "impl/codegen/sync_custom.h"
textual header "impl/codegen/sync_posix.h"
textual header "impl/codegen/sync_windows.h"
export * export *
module * { export * } module * { export * }
} }

@ -399,15 +399,16 @@ static double get_pid_controller_guess(grpc_exec_ctx* exec_ctx,
if (!tfc->pid_controller_initialized) { if (!tfc->pid_controller_initialized) {
tfc->last_pid_update = now; tfc->last_pid_update = now;
tfc->pid_controller_initialized = true; tfc->pid_controller_initialized = true;
grpc_pid_controller_init( grpc_pid_controller_args args;
&tfc->pid_controller, memset(&args, 0, sizeof(args));
(grpc_pid_controller_args){.gain_p = 4, args.gain_p = 4;
.gain_i = 8, args.gain_i = 8;
.gain_d = 0, args.gain_d = 0;
.initial_control_value = target, args.initial_control_value = target;
.min_control_value = -1, args.min_control_value = -1;
.max_control_value = 25, args.max_control_value = 25;
.integral_range = 10}); args.integral_range = 10;
grpc_pid_controller_init(&tfc->pid_controller, args);
return pow(2, target); return pow(2, target);
} }
double bdp_error = target - grpc_pid_controller_last(&tfc->pid_controller); double bdp_error = target - grpc_pid_controller_last(&tfc->pid_controller);

@ -39,9 +39,14 @@ void gpr_thd_end_blocking_region();
do { \ do { \
gpr_thd_start_blocking_region(); \ gpr_thd_start_blocking_region(); \
} while (0) } while (0)
#define GRPC_SCHEDULING_END_BLOCKING_REGION \ #define GRPC_SCHEDULING_END_BLOCKING_REGION_NO_EXEC_CTX \
do { \
gpr_thd_end_blocking_region(); \
} while (0)
#define GRPC_SCHEDULING_END_BLOCKING_REGION_WITH_EXEC_CTX(ec) \
do { \ do { \
gpr_thd_end_blocking_region(); \ gpr_thd_end_blocking_region(); \
grpc_exec_ctx_invalidate_now((ec)); \
} while (0) } while (0)
#else #else
#define GRPC_SCHEDULING_START_BLOCKING_REGION \ #define GRPC_SCHEDULING_START_BLOCKING_REGION \

@ -18,6 +18,8 @@
#include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/port.h"
#include <grpc/grpc_posix.h>
/* This polling engine is only relevant on linux kernels supporting epoll() */ /* This polling engine is only relevant on linux kernels supporting epoll() */
#ifdef GRPC_LINUX_EPOLL #ifdef GRPC_LINUX_EPOLL

@ -94,7 +94,7 @@ grpc_timer_check_result grpc_timer_check(grpc_exec_ctx *exec_ctx,
return GRPC_TIMERS_NOT_CHECKED; return GRPC_TIMERS_NOT_CHECKED;
} }
void grpc_timer_list_init(gpr_timespec now) {} void grpc_timer_list_init(grpc_exec_ctx *exec_ctx) {}
void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx) {} void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx) {}
void grpc_timer_consume_kick(void) {} void grpc_timer_consume_kick(void) {}

@ -39,7 +39,7 @@ static android_LogPriority severity_to_log_priority(gpr_log_severity severity) {
return ANDROID_LOG_DEFAULT; return ANDROID_LOG_DEFAULT;
} }
void gpr_log(const char *file, int line, gpr_log_severity severity, extern "C" void gpr_log(const char *file, int line, gpr_log_severity severity,
const char *format, ...) { const char *format, ...) {
char *message = NULL; char *message = NULL;
va_list args; va_list args;
@ -50,8 +50,8 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
free(message); free(message);
} }
void gpr_default_log(gpr_log_func_args *args) { extern "C" void gpr_default_log(gpr_log_func_args *args) {
char *final_slash; const char *final_slash;
const char *display_file; const char *display_file;
char *output = NULL; char *output = NULL;

@ -31,7 +31,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'BoringSSL' s.name = 'BoringSSL'
version = '9.0' version = '9.1'
s.version = version s.version = version
s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google’s needs.' s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google’s needs.'
# Adapted from the homepage: # Adapted from the homepage:
@ -67,9 +67,10 @@ Pod::Spec.new do |s|
# "The name and email addresses of the library maintainers, not the Podspec maintainer." # "The name and email addresses of the library maintainers, not the Podspec maintainer."
s.authors = 'Adam Langley', 'David Benjamin', 'Matt Braithwaite' s.authors = 'Adam Langley', 'David Benjamin', 'Matt Braithwaite'
major_version = version[0] + '.0'
s.source = { s.source = {
:git => 'https://boringssl.googlesource.com/boringssl', :git => 'https://boringssl.googlesource.com/boringssl',
:tag => "version_for_cocoapods_#{version}", :tag => "version_for_cocoapods_#{major_version}",
} }
name = 'openssl' name = 'openssl'
@ -186,6 +187,7 @@ Pod::Spec.new do |s|
cat > include/openssl/BoringSSL.modulemap <<EOF cat > include/openssl/BoringSSL.modulemap <<EOF
framework module openssl { framework module openssl {
umbrella header "umbrella.h" umbrella header "umbrella.h"
textual header "arm_arch.h"
export * export *
module * { export * } module * { export * }
} }

@ -37,6 +37,7 @@
*/ */
require dirname(__FILE__).'/vendor/autoload.php'; require dirname(__FILE__).'/vendor/autoload.php';
require dirname(__FILE__).'/histogram.php';
/** /**
* Assertion function that always exits with an error code if the assertion is * Assertion function that always exits with an error code if the assertion is
@ -63,19 +64,19 @@ function hardAssertIfStatusOk($status)
} }
/* Start the actual client */ /* Start the actual client */
function qps_client_main($proxy_address, $server_ind) {
function qps_client_main($proxy_address) { echo "[php-client] Initiating php client\n";
echo "Initiating php client\n";
$proxystubopts = []; $proxystubopts = [];
$proxystubopts['credentials'] = Grpc\ChannelCredentials::createInsecure(); $proxystubopts['credentials'] = Grpc\ChannelCredentials::createInsecure();
$proxystub = new Grpc\Testing\ProxyClientServiceClient($proxy_address, $proxystubopts); $proxystub = new Grpc\Testing\ProxyClientServiceClient($proxy_address, $proxystubopts);
list($config, $status) = $proxystub->GetConfig(new Grpc\Testing\Void())->wait(); list($config, $status) = $proxystub->GetConfig(new Grpc\Testing\Void())->wait();
hardAssertIfStatusOk($status); hardAssertIfStatusOk($status);
hardAssert($config->getClientChannels() == 1, "Only 1 channel supported");
hardAssert($config->getOutstandingRpcsPerChannel() == 1, "Only 1 outstanding RPC supported"); hardAssert($config->getOutstandingRpcsPerChannel() == 1, "Only 1 outstanding RPC supported");
echo "Got configuration from proxy, target is " . $config->getServerTargets()[0] . "\n"; echo "[php-client] Got configuration from proxy, target is '$server_ind'th server" . $config->getServerTargets()[$server_ind] . "\n";
$histres = $config->getHistogramParams()->getResolution();
$histmax = $config->getHistogramParams()->getMaxPossible();
$stubopts = []; $stubopts = [];
if ($config->getSecurityParams()) { if ($config->getSecurityParams()) {
@ -93,10 +94,10 @@ function qps_client_main($proxy_address) {
} else { } else {
$stubopts['credentials'] = Grpc\ChannelCredentials::createInsecure(); $stubopts['credentials'] = Grpc\ChannelCredentials::createInsecure();
} }
echo "Initiating php benchmarking client\n"; echo "[php-client] Initiating php benchmarking client\n";
$stub = new Grpc\Testing\BenchmarkServiceClient( $stub = new Grpc\Testing\BenchmarkServiceClient(
$config->getServerTargets()[0], $stubopts); $config->getServerTargets()[$server_ind], $stubopts);
$req = new Grpc\Testing\SimpleRequest(); $req = new Grpc\Testing\SimpleRequest();
$req->setResponseType(Grpc\Testing\PayloadType::COMPRESSABLE); $req->setResponseType(Grpc\Testing\PayloadType::COMPRESSABLE);
@ -115,8 +116,11 @@ function qps_client_main($proxy_address) {
} else { } else {
$poisson = false; $poisson = false;
} }
$metric = new Grpc\Testing\ProxyStat; $histogram = new Histogram($histres, $histmax);
$telemetry = $proxystub->ReportTime(); $histogram->clean();
$count = 0;
$histogram_result = new Grpc\Testing\HistogramData;
$telehist = $proxystub->ReportHist();
if ($config->getRpcType() == Grpc\Testing\RpcType::UNARY) { if ($config->getRpcType() == Grpc\Testing\RpcType::UNARY) {
while (1) { while (1) {
if ($poisson) { if ($poisson) {
@ -126,8 +130,20 @@ function qps_client_main($proxy_address) {
$startreq = microtime(true); $startreq = microtime(true);
list($resp,$status) = $stub->UnaryCall($req)->wait(); list($resp,$status) = $stub->UnaryCall($req)->wait();
hardAssertIfStatusOk($status); hardAssertIfStatusOk($status);
$metric->setLatency(microtime(true)-$startreq); $histogram->add((microtime(true)-$startreq)*1e9);
$telemetry->write($metric); $count += 1;
if ($count == 2000) {
$contents = $histogram->contents();
$histogram_result->setBucket($contents);
$histogram_result->setMinSeen($histogram->minimum());
$histogram_result->setMaxSeen($histogram->maximum());
$histogram_result->setSum($histogram->sum());
$histogram_result->setSumOfSquares($histogram->sum_of_squares());
$histogram_result->setCount($histogram->count());
$telehist->write($histogram_result);
$histogram->clean();
$count = 0;
}
} }
} else { } else {
$stream = $stub->StreamingCall(); $stream = $stub->StreamingCall();
@ -139,8 +155,20 @@ function qps_client_main($proxy_address) {
$startreq = microtime(true); $startreq = microtime(true);
$stream->write($req); $stream->write($req);
$resp = $stream->read(); $resp = $stream->read();
$metric->setLatency(microtime(true)-$startreq); $histogram->add((microtime(true)-$startreq)*1e9);
$telemetry->write($metric); $count += 1;
if ($count == 2000) {
$contents = $histogram->contents();
$histogram_result->setBucket($contents);
$histogram_result->setMinSeen($histogram->minimum());
$histogram_result->setMaxSeen($histogram->maximum());
$histogram_result->setSum($histogram->sum());
$histogram_result->setSumOfSquares($histogram->sum_of_squares());
$histogram_result->setCount($histogram->count());
$telehist->write($histogram_result);
$histogram->clean();
$count = 0;
}
} }
} }
} }
@ -148,4 +176,4 @@ function qps_client_main($proxy_address) {
ini_set('display_startup_errors', 1); ini_set('display_startup_errors', 1);
ini_set('display_errors', 1); ini_set('display_errors', 1);
error_reporting(-1); error_reporting(-1);
qps_client_main($argv[1]); qps_client_main($argv[1], $argv[2]);

@ -0,0 +1,33 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/core/stats.proto
namespace GPBMetadata\Src\Proto\Grpc\Core;
class Stats
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0a97020a1f7372632f70726f746f2f677270632f636f72652f7374617473" .
"2e70726f746f1209677270632e636f726522260a064275636b6574120d0a" .
"057374617274180120012801120d0a05636f756e74180220012804222f0a" .
"09486973746f6772616d12220a076275636b65747318012003280b32112e" .
"677270632e636f72652e4275636b6574225b0a064d6574726963120c0a04" .
"6e616d65180120012809120f0a05636f756e74180a20012804480012290a" .
"09686973746f6772616d180b2001280b32142e677270632e636f72652e48" .
"6973746f6772616d480042070a0576616c7565222b0a0553746174731222" .
"0a076d65747269637318012003280b32112e677270632e636f72652e4d65" .
"74726963620670726f746f33"
));
static::$is_initialized = true;
}
}

@ -17,108 +17,119 @@ class Control
\GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
$pool->internalAddGeneratedFile(hex2bin( $pool->internalAddGeneratedFile(hex2bin(
"0add170a247372632f70726f746f2f677270632f74657374696e672f636f" . "0aa21a0a247372632f70726f746f2f677270632f74657374696e672f636f" .
"6e74726f6c2e70726f746f120c677270632e74657374696e671a25737263" . "6e74726f6c2e70726f746f120c677270632e74657374696e671a22737263" .
"2f70726f746f2f677270632f74657374696e672f7061796c6f6164732e70" . "2f70726f746f2f677270632f74657374696e672f73746174732e70726f74" .
"726f746f1a227372632f70726f746f2f677270632f74657374696e672f73" . "6f22250a0d506f6973736f6e506172616d7312140a0c6f6666657265645f" .
"746174732e70726f746f22250a0d506f6973736f6e506172616d7312140a" . "6c6f616418012001280122120a10436c6f7365644c6f6f70506172616d73" .
"0c6f6666657265645f6c6f616418012001280122120a10436c6f7365644c" . "227b0a0a4c6f6164506172616d7312350a0b636c6f7365645f6c6f6f7018" .
"6f6f70506172616d73227b0a0a4c6f6164506172616d7312350a0b636c6f" . "012001280b321e2e677270632e74657374696e672e436c6f7365644c6f6f" .
"7365645f6c6f6f7018012001280b321e2e677270632e74657374696e672e" . "70506172616d734800122e0a07706f6973736f6e18022001280b321b2e67" .
"436c6f7365644c6f6f70506172616d734800122e0a07706f6973736f6e18" . "7270632e74657374696e672e506f6973736f6e506172616d73480042060a" .
"022001280b321b2e677270632e74657374696e672e506f6973736f6e5061" . "046c6f616422560a0e5365637572697479506172616d7312130a0b757365" .
"72616d73480042060a046c6f616422430a0e536563757269747950617261" . "5f746573745f6361180120012808121c0a147365727665725f686f73745f" .
"6d7312130a0b7573655f746573745f6361180120012808121c0a14736572" . "6f7665727269646518022001280912110a09637265645f74797065180320" .
"7665725f686f73745f6f76657272696465180220012809224d0a0a436861" . "012809224d0a0a4368616e6e656c417267120c0a046e616d651801200128" .
"6e6e656c417267120c0a046e616d6518012001280912130a097374725f76" . "0912130a097374725f76616c7565180220012809480012130a09696e745f" .
"616c7565180220012809480012130a09696e745f76616c75651803200128" . "76616c7565180320012805480042070a0576616c756522d5040a0c436c69" .
"05480042070a0576616c756522a0040a0c436c69656e74436f6e66696712" . "656e74436f6e66696712160a0e7365727665725f74617267657473180120" .
"160a0e7365727665725f74617267657473180120032809122d0a0b636c69" . "032809122d0a0b636c69656e745f7479706518022001280e32182e677270" .
"656e745f7479706518022001280e32182e677270632e74657374696e672e" . "632e74657374696e672e436c69656e745479706512350a0f736563757269" .
"436c69656e745479706512350a0f73656375726974795f706172616d7318" . "74795f706172616d7318032001280b321c2e677270632e74657374696e67" .
"032001280b321c2e677270632e74657374696e672e536563757269747950" . "2e5365637572697479506172616d7312240a1c6f75747374616e64696e67" .
"6172616d7312240a1c6f75747374616e64696e675f727063735f7065725f" . "5f727063735f7065725f6368616e6e656c18042001280512170a0f636c69" .
"6368616e6e656c18042001280512170a0f636c69656e745f6368616e6e65" . "656e745f6368616e6e656c73180520012805121c0a146173796e635f636c" .
"6c73180520012805121c0a146173796e635f636c69656e745f7468726561" . "69656e745f7468726561647318072001280512270a087270635f74797065" .
"647318072001280512270a087270635f7479706518082001280e32152e67" . "18082001280e32152e677270632e74657374696e672e5270635479706512" .
"7270632e74657374696e672e52706354797065122d0a0b6c6f61645f7061" . "2d0a0b6c6f61645f706172616d73180a2001280b32182e677270632e7465" .
"72616d73180a2001280b32182e677270632e74657374696e672e4c6f6164" . "7374696e672e4c6f6164506172616d7312330a0e7061796c6f61645f636f" .
"506172616d7312330a0e7061796c6f61645f636f6e666967180b2001280b" . "6e666967180b2001280b321b2e677270632e74657374696e672e5061796c" .
"321b2e677270632e74657374696e672e5061796c6f6164436f6e66696712" . "6f6164436f6e66696712370a10686973746f6772616d5f706172616d7318" .
"370a10686973746f6772616d5f706172616d73180c2001280b321d2e6772" . "0c2001280b321d2e677270632e74657374696e672e486973746f6772616d" .
"70632e74657374696e672e486973746f6772616d506172616d7312110a09" . "506172616d7312110a09636f72655f6c697374180d2003280512120a0a63" .
"636f72655f6c697374180d2003280512120a0a636f72655f6c696d697418" . "6f72655f6c696d6974180e2001280512180a106f746865725f636c69656e" .
"0e2001280512180a106f746865725f636c69656e745f617069180f200128" . "745f617069180f20012809122e0a0c6368616e6e656c5f61726773181020" .
"09122e0a0c6368616e6e656c5f6172677318102003280b32182e67727063" . "03280b32182e677270632e74657374696e672e4368616e6e656c41726712" .
"2e74657374696e672e4368616e6e656c41726722380a0c436c69656e7453" . "160a0e746872656164735f7065725f6371181120012805121b0a136d6573" .
"746174757312280a05737461747318012001280b32192e677270632e7465" . "73616765735f7065725f73747265616d18122001280522380a0c436c6965" .
"7374696e672e436c69656e74537461747322150a044d61726b120d0a0572" . "6e7453746174757312280a05737461747318012001280b32192e67727063" .
"6573657418012001280822680a0a436c69656e7441726773122b0a057365" . "2e74657374696e672e436c69656e74537461747322150a044d61726b120d" .
"74757018012001280b321a2e677270632e74657374696e672e436c69656e" . "0a05726573657418012001280822680a0a436c69656e7441726773122b0a" .
"74436f6e666967480012220a046d61726b18022001280b32122e67727063" . "05736574757018012001280b321a2e677270632e74657374696e672e436c" .
"2e74657374696e672e4d61726b480042090a076172677479706522b4020a" . "69656e74436f6e666967480012220a046d61726b18022001280b32122e67" .
"0c536572766572436f6e666967122d0a0b7365727665725f747970651801" . "7270632e74657374696e672e4d61726b480042090a076172677479706522" .
"2001280e32182e677270632e74657374696e672e53657276657254797065" . "fd020a0c536572766572436f6e666967122d0a0b7365727665725f747970" .
"12350a0f73656375726974795f706172616d7318022001280b321c2e6772" . "6518012001280e32182e677270632e74657374696e672e53657276657254" .
"70632e74657374696e672e5365637572697479506172616d73120c0a0470" . "79706512350a0f73656375726974795f706172616d7318022001280b321c" .
"6f7274180420012805121c0a146173796e635f7365727665725f74687265" . "2e677270632e74657374696e672e5365637572697479506172616d73120c" .
"61647318072001280512120a0a636f72655f6c696d697418082001280512" . "0a04706f7274180420012805121c0a146173796e635f7365727665725f74" .
"330a0e7061796c6f61645f636f6e66696718092001280b321b2e67727063" . "68726561647318072001280512120a0a636f72655f6c696d697418082001" .
"2e74657374696e672e5061796c6f6164436f6e66696712110a09636f7265" . "280512330a0e7061796c6f61645f636f6e66696718092001280b321b2e67" .
"5f6c697374180a2003280512180a106f746865725f7365727665725f6170" . "7270632e74657374696e672e5061796c6f6164436f6e66696712110a0963" .
"69180b20012809121c0a137265736f757263655f71756f74615f73697a65" . "6f72655f6c697374180a2003280512180a106f746865725f736572766572" .
"18e9072001280522680a0a53657276657241726773122b0a057365747570" . "5f617069180b2001280912160a0e746872656164735f7065725f6371180c" .
"18012001280b321a2e677270632e74657374696e672e536572766572436f" . "20012805121c0a137265736f757263655f71756f74615f73697a6518e907" .
"6e666967480012220a046d61726b18022001280b32122e677270632e7465" . "20012805122f0a0c6368616e6e656c5f6172677318ea072003280b32182e" .
"7374696e672e4d61726b480042090a076172677479706522550a0c536572" . "677270632e74657374696e672e4368616e6e656c41726722680a0a536572" .
"76657253746174757312280a05737461747318012001280b32192e677270" . "76657241726773122b0a05736574757018012001280b321a2e677270632e" .
"632e74657374696e672e5365727665725374617473120c0a04706f727418" . "74657374696e672e536572766572436f6e666967480012220a046d61726b" .
"0220012805120d0a05636f726573180320012805220d0a0b436f72655265" . "18022001280b32122e677270632e74657374696e672e4d61726b48004209" .
"7175657374221d0a0c436f7265526573706f6e7365120d0a05636f726573" . "0a076172677479706522550a0c53657276657253746174757312280a0573" .
"18012001280522060a04566f696422fd010a085363656e6172696f120c0a" . "7461747318012001280b32192e677270632e74657374696e672e53657276" .
"046e616d6518012001280912310a0d636c69656e745f636f6e6669671802" . "65725374617473120c0a04706f7274180220012805120d0a05636f726573" .
"2001280b321a2e677270632e74657374696e672e436c69656e74436f6e66" . "180320012805220d0a0b436f726552657175657374221d0a0c436f726552" .
"696712130a0b6e756d5f636c69656e747318032001280512310a0d736572" . "6573706f6e7365120d0a05636f72657318012001280522060a04566f6964" .
"7665725f636f6e66696718042001280b321a2e677270632e74657374696e" . "22fd010a085363656e6172696f120c0a046e616d6518012001280912310a" .
"672e536572766572436f6e66696712130a0b6e756d5f7365727665727318" . "0d636c69656e745f636f6e66696718022001280b321a2e677270632e7465" .
"052001280512160a0e7761726d75705f7365636f6e647318062001280512" . "7374696e672e436c69656e74436f6e66696712130a0b6e756d5f636c6965" .
"190a1162656e63686d61726b5f7365636f6e647318072001280512200a18" . "6e747318032001280512310a0d7365727665725f636f6e66696718042001" .
"737061776e5f6c6f63616c5f776f726b65725f636f756e74180820012805" . "280b321a2e677270632e74657374696e672e536572766572436f6e666967" .
"22360a095363656e6172696f7312290a097363656e6172696f7318012003" . "12130a0b6e756d5f7365727665727318052001280512160a0e7761726d75" .
"280b32162e677270632e74657374696e672e5363656e6172696f22f8020a" . "705f7365636f6e647318062001280512190a1162656e63686d61726b5f73" .
"155363656e6172696f526573756c7453756d6d617279120b0a0371707318" . "65636f6e647318072001280512200a18737061776e5f6c6f63616c5f776f" .
"0120012801121b0a137170735f7065725f7365727665725f636f72651802" . "726b65725f636f756e7418082001280522360a095363656e6172696f7312" .
"20012801121a0a127365727665725f73797374656d5f74696d6518032001" . "290a097363656e6172696f7318012003280b32162e677270632e74657374" .
"280112180a107365727665725f757365725f74696d65180420012801121a" . "696e672e5363656e6172696f2284040a155363656e6172696f526573756c" .
"0a12636c69656e745f73797374656d5f74696d6518052001280112180a10" . "7453756d6d617279120b0a03717073180120012801121b0a137170735f70" .
"636c69656e745f757365725f74696d6518062001280112120a0a6c617465" . "65725f7365727665725f636f7265180220012801121a0a12736572766572" .
"6e63795f353018072001280112120a0a6c6174656e63795f393018082001" . "5f73797374656d5f74696d6518032001280112180a107365727665725f75" .
"280112120a0a6c6174656e63795f393518092001280112120a0a6c617465" . "7365725f74696d65180420012801121a0a12636c69656e745f7379737465" .
"6e63795f3939180a2001280112130a0b6c6174656e63795f393939180b20" . "6d5f74696d6518052001280112180a10636c69656e745f757365725f7469" .
"01280112180a107365727665725f6370755f7573616765180c2001280112" . "6d6518062001280112120a0a6c6174656e63795f35301807200128011212" .
"260a1e7375636365737366756c5f72657175657374735f7065725f736563" . "0a0a6c6174656e63795f393018082001280112120a0a6c6174656e63795f" .
"6f6e64180d2001280112220a1a6661696c65645f72657175657374735f70" . "393518092001280112120a0a6c6174656e63795f3939180a200128011213" .
"65725f7365636f6e64180e200128012283030a0e5363656e6172696f5265" . "0a0b6c6174656e63795f393939180b2001280112180a107365727665725f" .
"73756c7412280a087363656e6172696f18012001280b32162e677270632e" . "6370755f7573616765180c2001280112260a1e7375636365737366756c5f" .
"74657374696e672e5363656e6172696f122e0a096c6174656e6369657318" . "72657175657374735f7065725f7365636f6e64180d2001280112220a1a66" .
"022001280b321b2e677270632e74657374696e672e486973746f6772616d" . "61696c65645f72657175657374735f7065725f7365636f6e64180e200128" .
"44617461122f0a0c636c69656e745f737461747318032003280b32192e67" . "0112200a18636c69656e745f706f6c6c735f7065725f7265717565737418" .
"7270632e74657374696e672e436c69656e745374617473122f0a0c736572" . "0f2001280112200a187365727665725f706f6c6c735f7065725f72657175" .
"7665725f737461747318042003280b32192e677270632e74657374696e67" . "65737418102001280112220a1a7365727665725f717565726965735f7065" .
"2e536572766572537461747312140a0c7365727665725f636f7265731805" . "725f6370755f73656318112001280112220a1a636c69656e745f71756572" .
"2003280512340a0773756d6d61727918062001280b32232e677270632e74" . "6965735f7065725f6370755f7365631812200128012283030a0e5363656e" .
"657374696e672e5363656e6172696f526573756c7453756d6d6172791216" . "6172696f526573756c7412280a087363656e6172696f18012001280b3216" .
"0a0e636c69656e745f7375636365737318072003280812160a0e73657276" . "2e677270632e74657374696e672e5363656e6172696f122e0a096c617465" .
"65725f7375636365737318082003280812390a0f726571756573745f7265" . "6e6369657318022001280b321b2e677270632e74657374696e672e486973" .
"73756c747318092003280b32202e677270632e74657374696e672e526571" . "746f6772616d44617461122f0a0c636c69656e745f737461747318032003" .
"75657374526573756c74436f756e742a410a0a436c69656e745479706512" . "280b32192e677270632e74657374696e672e436c69656e74537461747312" .
"0f0a0b53594e435f434c49454e54100012100a0c4153594e435f434c4945" . "2f0a0c7365727665725f737461747318042003280b32192e677270632e74" .
"4e54100112100a0c4f544845525f434c49454e5410022a5b0a0a53657276" . "657374696e672e536572766572537461747312140a0c7365727665725f63" .
"657254797065120f0a0b53594e435f534552564552100012100a0c415359" . "6f72657318052003280512340a0773756d6d61727918062001280b32232e" .
"4e435f534552564552100112180a144153594e435f47454e455249435f53" . "677270632e74657374696e672e5363656e6172696f526573756c7453756d" .
"4552564552100212100a0c4f544845525f53455256455210032a230a0752" . "6d61727912160a0e636c69656e745f737563636573731807200328081216" .
"70635479706512090a05554e4152591000120d0a0953545245414d494e47" . "0a0e7365727665725f7375636365737318082003280812390a0f72657175" .
"1001620670726f746f33" "6573745f726573756c747318092003280b32202e677270632e7465737469" .
"6e672e52657175657374526573756c74436f756e742a410a0a436c69656e" .
"7454797065120f0a0b53594e435f434c49454e54100012100a0c4153594e" .
"435f434c49454e54100112100a0c4f544845525f434c49454e5410022a5b" .
"0a0a53657276657254797065120f0a0b53594e435f534552564552100012" .
"100a0c4153594e435f534552564552100112180a144153594e435f47454e" .
"455249435f534552564552100212100a0c4f544845525f53455256455210" .
"032a720a075270635479706512090a05554e4152591000120d0a09535452" .
"45414d494e47100112190a1553545245414d494e475f46524f4d5f434c49" .
"454e54100212190a1553545245414d494e475f46524f4d5f534552564552" .
"100312170a1353545245414d494e475f424f54485f574159531004620670" .
"726f746f33"
)); ));
static::$is_initialized = true; static::$is_initialized = true;

@ -15,17 +15,20 @@ class ProxyService
return; return;
} }
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
$pool->internalAddGeneratedFile(hex2bin( $pool->internalAddGeneratedFile(hex2bin(
"0a97020a2a7372632f70726f746f2f677270632f74657374696e672f7072" . "0ad6020a2a7372632f70726f746f2f677270632f74657374696e672f7072" .
"6f78792d736572766963652e70726f746f120c677270632e74657374696e" . "6f78792d736572766963652e70726f746f120c677270632e74657374696e" .
"671a247372632f70726f746f2f677270632f74657374696e672f636f6e74" . "671a227372632f70726f746f2f677270632f74657374696e672f73746174" .
"726f6c2e70726f746f221c0a0950726f787953746174120f0a076c617465" . "732e70726f746f221c0a0950726f787953746174120f0a076c6174656e63" .
"6e6379180120012801328e010a1250726f7879436c69656e745365727669" . "7918012001280132cf010a1250726f7879436c69656e7453657276696365" .
"6365123b0a09476574436f6e66696712122e677270632e74657374696e67" . "123b0a09476574436f6e66696712122e677270632e74657374696e672e56" .
"2e566f69641a1a2e677270632e74657374696e672e436c69656e74436f6e" . "6f69641a1a2e677270632e74657374696e672e436c69656e74436f6e6669" .
"666967123b0a0a5265706f727454696d6512172e677270632e7465737469" . "67123b0a0a5265706f727454696d6512172e677270632e74657374696e67" .
"6e672e50726f7879537461741a122e677270632e74657374696e672e566f" . "2e50726f7879537461741a122e677270632e74657374696e672e566f6964" .
"69642801620670726f746f33" "2801123f0a0a5265706f727448697374121b2e677270632e74657374696e" .
"672e486973746f6772616d446174611a122e677270632e74657374696e67" .
"2e566f69642801620670726f746f33"
)); ));
static::$is_initialized = true; static::$is_initialized = true;

@ -16,27 +16,40 @@ class Services
} }
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
$pool->internalAddGeneratedFile(hex2bin( $pool->internalAddGeneratedFile(hex2bin(
"0ad1040a257372632f70726f746f2f677270632f74657374696e672f7365" . "0aaa070a257372632f70726f746f2f677270632f74657374696e672f7365" .
"7276696365732e70726f746f120c677270632e74657374696e671a257372" . "7276696365732e70726f746f120c677270632e74657374696e671a247372" .
"632f70726f746f2f677270632f74657374696e672f6d657373616765732e" . "632f70726f746f2f677270632f74657374696e672f636f6e74726f6c2e70" .
"70726f746f1a247372632f70726f746f2f677270632f74657374696e672f" . "726f746f1a227372632f70726f746f2f677270632f74657374696e672f73" .
"636f6e74726f6c2e70726f746f32aa010a1042656e63686d61726b536572" . "746174732e70726f746f32a6030a1042656e63686d61726b536572766963" .
"7669636512460a09556e61727943616c6c121b2e677270632e7465737469" . "6512460a09556e61727943616c6c121b2e677270632e74657374696e672e" .
"6e672e53696d706c65526571756573741a1c2e677270632e74657374696e" . "53696d706c65526571756573741a1c2e677270632e74657374696e672e53" .
"672e53696d706c65526573706f6e7365124e0a0d53747265616d696e6743" . "696d706c65526573706f6e7365124e0a0d53747265616d696e6743616c6c" .
"616c6c121b2e677270632e74657374696e672e53696d706c655265717565" . "121b2e677270632e74657374696e672e53696d706c65526571756573741a" .
"73741a1c2e677270632e74657374696e672e53696d706c65526573706f6e" . "1c2e677270632e74657374696e672e53696d706c65526573706f6e736528" .
"7365280130013297020a0d576f726b65725365727669636512450a095275" . "01300112520a1353747265616d696e6746726f6d436c69656e74121b2e67" .
"6e53657276657212182e677270632e74657374696e672e53657276657241" . "7270632e74657374696e672e53696d706c65526571756573741a1c2e6772" .
"7267731a1a2e677270632e74657374696e672e5365727665725374617475" . "70632e74657374696e672e53696d706c65526573706f6e7365280112520a" .
"732801300112450a0952756e436c69656e7412182e677270632e74657374" . "1353747265616d696e6746726f6d536572766572121b2e677270632e7465" .
"696e672e436c69656e74417267731a1a2e677270632e74657374696e672e" . "7374696e672e53696d706c65526571756573741a1c2e677270632e746573" .
"436c69656e745374617475732801300112420a09436f7265436f756e7412" . "74696e672e53696d706c65526573706f6e7365300112520a115374726561" .
"192e677270632e74657374696e672e436f7265526571756573741a1a2e67" . "6d696e67426f746857617973121b2e677270632e74657374696e672e5369" .
"7270632e74657374696e672e436f7265526573706f6e736512340a0a5175" . "6d706c65526571756573741a1c2e677270632e74657374696e672e53696d" .
"6974576f726b657212122e677270632e74657374696e672e566f69641a12" . "706c65526573706f6e7365280130013297020a0d576f726b657253657276" .
"2e677270632e74657374696e672e566f6964620670726f746f33" "69636512450a0952756e53657276657212182e677270632e74657374696e" .
"672e536572766572417267731a1a2e677270632e74657374696e672e5365" .
"727665725374617475732801300112450a0952756e436c69656e7412182e" .
"677270632e74657374696e672e436c69656e74417267731a1a2e67727063" .
"2e74657374696e672e436c69656e745374617475732801300112420a0943" .
"6f7265436f756e7412192e677270632e74657374696e672e436f72655265" .
"71756573741a1a2e677270632e74657374696e672e436f7265526573706f" .
"6e736512340a0a51756974576f726b657212122e677270632e7465737469" .
"6e672e566f69641a122e677270632e74657374696e672e566f6964325e0a" .
"185265706f72745170735363656e6172696f5365727669636512420a0e52" .
"65706f72745363656e6172696f121c2e677270632e74657374696e672e53" .
"63656e6172696f526573756c741a122e677270632e74657374696e672e56" .
"6f6964620670726f746f33"
)); ));
static::$is_initialized = true; static::$is_initialized = true;

@ -14,28 +14,33 @@ class Stats
if (static::$is_initialized == true) { if (static::$is_initialized == true) {
return; return;
} }
\GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce();
$pool->internalAddGeneratedFile(hex2bin( $pool->internalAddGeneratedFile(hex2bin(
"0adf040a227372632f70726f746f2f677270632f74657374696e672f7374" . "0ada050a227372632f70726f746f2f677270632f74657374696e672f7374" .
"6174732e70726f746f120c677270632e74657374696e67227a0a0b536572" . "6174732e70726f746f120c677270632e74657374696e6722b7010a0b5365" .
"766572537461747312140a0c74696d655f656c6170736564180120012801" . "72766572537461747312140a0c74696d655f656c61707365641801200128" .
"12110a0974696d655f7573657218022001280112130a0b74696d655f7379" . "0112110a0974696d655f7573657218022001280112130a0b74696d655f73" .
"7374656d18032001280112160a0e746f74616c5f6370755f74696d651804" . "797374656d18032001280112160a0e746f74616c5f6370755f74696d6518" .
"2001280412150a0d69646c655f6370755f74696d65180520012804223b0a" . "042001280412150a0d69646c655f6370755f74696d651805200128041215" .
"0f486973746f6772616d506172616d7312120a0a7265736f6c7574696f6e" . "0a0d63715f706f6c6c5f636f756e7418062001280412240a0a636f72655f" .
"18012001280112140a0c6d61785f706f737369626c651802200128012277" . "737461747318072001280b32102e677270632e636f72652e537461747322" .
"0a0d486973746f6772616d44617461120e0a066275636b65741801200328" . "3b0a0f486973746f6772616d506172616d7312120a0a7265736f6c757469" .
"0d12100a086d696e5f7365656e18022001280112100a086d61785f736565" . "6f6e18012001280112140a0c6d61785f706f737369626c65180220012801" .
"6e180320012801120b0a0373756d18042001280112160a0e73756d5f6f66" . "22770a0d486973746f6772616d44617461120e0a066275636b6574180120" .
"5f73717561726573180520012801120d0a05636f756e7418062001280122" . "03280d12100a086d696e5f7365656e18022001280112100a086d61785f73" .
"380a1252657175657374526573756c74436f756e7412130a0b7374617475" . "65656e180320012801120b0a0373756d18042001280112160a0e73756d5f" .
"735f636f6465180120012805120d0a05636f756e7418022001280322b601" . "6f665f73717561726573180520012801120d0a05636f756e741806200128" .
"0a0b436c69656e745374617473122e0a096c6174656e6369657318012001" . "0122380a1252657175657374526573756c74436f756e7412130a0b737461" .
"280b321b2e677270632e74657374696e672e486973746f6772616d446174" . "7475735f636f6465180120012805120d0a05636f756e7418022001280322" .
"6112140a0c74696d655f656c617073656418022001280112110a0974696d" . "f3010a0b436c69656e745374617473122e0a096c6174656e636965731801" .
"655f7573657218032001280112130a0b74696d655f73797374656d180420" . "2001280b321b2e677270632e74657374696e672e486973746f6772616d44" .
"01280112390a0f726571756573745f726573756c747318052003280b3220" . "61746112140a0c74696d655f656c617073656418022001280112110a0974" .
"2e677270632e74657374696e672e52657175657374526573756c74436f75" . "696d655f7573657218032001280112130a0b74696d655f73797374656d18" .
"6e74620670726f746f33" "042001280112390a0f726571756573745f726573756c747318052003280b" .
"32202e677270632e74657374696e672e52657175657374526573756c7443" .
"6f756e7412150a0d63715f706f6c6c5f636f756e7418062001280412240a" .
"0a636f72655f737461747318072001280b32102e677270632e636f72652e" .
"5374617473620670726f746f33"
)); ));
static::$is_initialized = true; static::$is_initialized = true;

@ -0,0 +1,75 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/core/stats.proto
namespace Grpc\Core;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>grpc.core.Bucket</code>
*/
class Bucket extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>double start = 1;</code>
*/
private $start = 0.0;
/**
* Generated from protobuf field <code>uint64 count = 2;</code>
*/
private $count = 0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce();
parent::__construct();
}
/**
* Generated from protobuf field <code>double start = 1;</code>
* @return float
*/
public function getStart()
{
return $this->start;
}
/**
* Generated from protobuf field <code>double start = 1;</code>
* @param float $var
* @return $this
*/
public function setStart($var)
{
GPBUtil::checkDouble($var);
$this->start = $var;
return $this;
}
/**
* Generated from protobuf field <code>uint64 count = 2;</code>
* @return int|string
*/
public function getCount()
{
return $this->count;
}
/**
* Generated from protobuf field <code>uint64 count = 2;</code>
* @param int|string $var
* @return $this
*/
public function setCount($var)
{
GPBUtil::checkUint64($var);
$this->count = $var;
return $this;
}
}

@ -0,0 +1,49 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/core/stats.proto
namespace Grpc\Core;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>grpc.core.Histogram</code>
*/
class Histogram extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>repeated .grpc.core.Bucket buckets = 1;</code>
*/
private $buckets;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce();
parent::__construct();
}
/**
* Generated from protobuf field <code>repeated .grpc.core.Bucket buckets = 1;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getBuckets()
{
return $this->buckets;
}
/**
* Generated from protobuf field <code>repeated .grpc.core.Bucket buckets = 1;</code>
* @param \Grpc\Core\Bucket[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setBuckets($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Core\Bucket::class);
$this->buckets = $arr;
return $this;
}
}

@ -0,0 +1,102 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/core/stats.proto
namespace Grpc\Core;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>grpc.core.Metric</code>
*/
class Metric extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string name = 1;</code>
*/
private $name = '';
protected $value;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce();
parent::__construct();
}
/**
* Generated from protobuf field <code>string name = 1;</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Generated from protobuf field <code>string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Generated from protobuf field <code>uint64 count = 10;</code>
* @return int|string
*/
public function getCount()
{
return $this->readOneof(10);
}
/**
* Generated from protobuf field <code>uint64 count = 10;</code>
* @param int|string $var
* @return $this
*/
public function setCount($var)
{
GPBUtil::checkUint64($var);
$this->writeOneof(10, $var);
return $this;
}
/**
* Generated from protobuf field <code>.grpc.core.Histogram histogram = 11;</code>
* @return \Grpc\Core\Histogram
*/
public function getHistogram()
{
return $this->readOneof(11);
}
/**
* Generated from protobuf field <code>.grpc.core.Histogram histogram = 11;</code>
* @param \Grpc\Core\Histogram $var
* @return $this
*/
public function setHistogram($var)
{
GPBUtil::checkMessage($var, \Grpc\Core\Histogram::class);
$this->writeOneof(11, $var);
return $this;
}
/**
* @return string
*/
public function getValue()
{
return $this->whichOneof("value");
}
}

@ -0,0 +1,49 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/core/stats.proto
namespace Grpc\Core;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>grpc.core.Stats</code>
*/
class Stats extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>repeated .grpc.core.Metric metrics = 1;</code>
*/
private $metrics;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce();
parent::__construct();
}
/**
* Generated from protobuf field <code>repeated .grpc.core.Metric metrics = 1;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getMetrics()
{
return $this->metrics;
}
/**
* Generated from protobuf field <code>repeated .grpc.core.Metric metrics = 1;</code>
* @param \Grpc\Core\Metric[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setMetrics($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Core\Metric::class);
$this->metrics = $arr;
return $this;
}
}

@ -18,14 +18,16 @@
// //
// An integration test service that covers all the method signature permutations // An integration test service that covers all the method signature permutations
// of unary/streaming requests/responses. // of unary/streaming requests/responses.
namespace Grpc\Testing { namespace Grpc\Testing;
class BenchmarkServiceClient extends \Grpc\BaseStub { /**
*/
class BenchmarkServiceClient extends \Grpc\BaseStub {
/** /**
* @param string $hostname hostname * @param string $hostname hostname
* @param array $opts channel options * @param array $opts channel options
* @param Grpc\Channel $channel (optional) re-use channel object * @param \Grpc\Channel $channel (optional) re-use channel object
*/ */
public function __construct($hostname, $opts, $channel = null) { public function __construct($hostname, $opts, $channel = null) {
parent::__construct($hostname, $opts, $channel); parent::__construct($hostname, $opts, $channel);
@ -47,8 +49,9 @@ namespace Grpc\Testing {
} }
/** /**
* One request followed by one response. * Repeated sequence of one request followed by one response.
* The server returns the client payload as-is. * Should be called streaming ping-pong
* The server returns the client payload as-is on each response
* @param array $metadata metadata * @param array $metadata metadata
* @param array $options call options * @param array $options call options
*/ */
@ -58,6 +61,43 @@ namespace Grpc\Testing {
$metadata, $options); $metadata, $options);
} }
/**
* Single-sided unbounded streaming from client to server
* The server returns the client payload as-is once the client does WritesDone
* @param array $metadata metadata
* @param array $options call options
*/
public function StreamingFromClient($metadata = [], $options = []) {
return $this->_clientStreamRequest('/grpc.testing.BenchmarkService/StreamingFromClient',
['\Grpc\Testing\SimpleResponse','decode'],
$metadata, $options);
}
/**
* Single-sided unbounded streaming from server to client
* The server repeatedly returns the client payload as-is
* @param \Grpc\Testing\SimpleRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function StreamingFromServer(\Grpc\Testing\SimpleRequest $argument,
$metadata = [], $options = []) {
return $this->_serverStreamRequest('/grpc.testing.BenchmarkService/StreamingFromServer',
$argument,
['\Grpc\Testing\SimpleResponse', 'decode'],
$metadata, $options);
}
/**
* Two-sided unbounded streaming between server to client
* Both sides send the content of their own choice to the other
* @param array $metadata metadata
* @param array $options call options
*/
public function StreamingBothWays($metadata = [], $options = []) {
return $this->_bidiRequest('/grpc.testing.BenchmarkService/StreamingBothWays',
['\Grpc\Testing\SimpleResponse','decode'],
$metadata, $options);
} }
} }

@ -9,22 +9,18 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* TODO(dgq): Go back to using well-known types once * TODO(dgq): Go back to using well-known types once
* https://github.com/grpc/grpc/issues/6980 has been fixed. * https://github.com/grpc/grpc/issues/6980 has been fixed.
* import "google/protobuf/wrappers.proto"; * import "google/protobuf/wrappers.proto";
* </pre>
* *
* Protobuf type <code>grpc.testing.BoolValue</code> * Generated from protobuf message <code>grpc.testing.BoolValue</code>
*/ */
class BoolValue extends \Google\Protobuf\Internal\Message class BoolValue extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* The bool value. * The bool value.
* </pre>
* *
* <code>bool value = 1;</code> * Generated from protobuf field <code>bool value = 1;</code>
*/ */
private $value = false; private $value = false;
@ -34,11 +30,10 @@ class BoolValue extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* The bool value. * The bool value.
* </pre>
* *
* <code>bool value = 1;</code> * Generated from protobuf field <code>bool value = 1;</code>
* @return bool
*/ */
public function getValue() public function getValue()
{ {
@ -46,16 +41,18 @@ class BoolValue extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* The bool value. * The bool value.
* </pre>
* *
* <code>bool value = 1;</code> * Generated from protobuf field <code>bool value = 1;</code>
* @param bool $var
* @return $this
*/ */
public function setValue($var) public function setValue($var)
{ {
GPBUtil::checkBool($var); GPBUtil::checkBool($var);
$this->value = $var; $this->value = $var;
return $this;
} }
} }

@ -9,16 +9,16 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.ByteBufferParams</code> * Generated from protobuf message <code>grpc.testing.ByteBufferParams</code>
*/ */
class ByteBufferParams extends \Google\Protobuf\Internal\Message class ByteBufferParams extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>int32 req_size = 1;</code> * Generated from protobuf field <code>int32 req_size = 1;</code>
*/ */
private $req_size = 0; private $req_size = 0;
/** /**
* <code>int32 resp_size = 2;</code> * Generated from protobuf field <code>int32 resp_size = 2;</code>
*/ */
private $resp_size = 0; private $resp_size = 0;
@ -28,7 +28,8 @@ class ByteBufferParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 req_size = 1;</code> * Generated from protobuf field <code>int32 req_size = 1;</code>
* @return int
*/ */
public function getReqSize() public function getReqSize()
{ {
@ -36,16 +37,21 @@ class ByteBufferParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 req_size = 1;</code> * Generated from protobuf field <code>int32 req_size = 1;</code>
* @param int $var
* @return $this
*/ */
public function setReqSize($var) public function setReqSize($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->req_size = $var; $this->req_size = $var;
return $this;
} }
/** /**
* <code>int32 resp_size = 2;</code> * Generated from protobuf field <code>int32 resp_size = 2;</code>
* @return int
*/ */
public function getRespSize() public function getRespSize()
{ {
@ -53,12 +59,16 @@ class ByteBufferParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 resp_size = 2;</code> * Generated from protobuf field <code>int32 resp_size = 2;</code>
* @param int $var
* @return $this
*/ */
public function setRespSize($var) public function setRespSize($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->resp_size = $var; $this->resp_size = $var;
return $this;
} }
} }

@ -9,12 +9,12 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.ChannelArg</code> * Generated from protobuf message <code>grpc.testing.ChannelArg</code>
*/ */
class ChannelArg extends \Google\Protobuf\Internal\Message class ChannelArg extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>string name = 1;</code> * Generated from protobuf field <code>string name = 1;</code>
*/ */
private $name = ''; private $name = '';
protected $value; protected $value;
@ -25,7 +25,8 @@ class ChannelArg extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>string name = 1;</code> * Generated from protobuf field <code>string name = 1;</code>
* @return string
*/ */
public function getName() public function getName()
{ {
@ -33,16 +34,21 @@ class ChannelArg extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>string name = 1;</code> * Generated from protobuf field <code>string name = 1;</code>
* @param string $var
* @return $this
*/ */
public function setName($var) public function setName($var)
{ {
GPBUtil::checkString($var, True); GPBUtil::checkString($var, True);
$this->name = $var; $this->name = $var;
return $this;
} }
/** /**
* <code>string str_value = 2;</code> * Generated from protobuf field <code>string str_value = 2;</code>
* @return string
*/ */
public function getStrValue() public function getStrValue()
{ {
@ -50,16 +56,21 @@ class ChannelArg extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>string str_value = 2;</code> * Generated from protobuf field <code>string str_value = 2;</code>
* @param string $var
* @return $this
*/ */
public function setStrValue($var) public function setStrValue($var)
{ {
GPBUtil::checkString($var, True); GPBUtil::checkString($var, True);
$this->writeOneof(2, $var); $this->writeOneof(2, $var);
return $this;
} }
/** /**
* <code>int32 int_value = 3;</code> * Generated from protobuf field <code>int32 int_value = 3;</code>
* @return int
*/ */
public function getIntValue() public function getIntValue()
{ {
@ -67,14 +78,21 @@ class ChannelArg extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 int_value = 3;</code> * Generated from protobuf field <code>int32 int_value = 3;</code>
* @param int $var
* @return $this
*/ */
public function setIntValue($var) public function setIntValue($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->writeOneof(3, $var); $this->writeOneof(3, $var);
return $this;
} }
/**
* @return string
*/
public function getValue() public function getValue()
{ {
return $this->whichOneof("value"); return $this->whichOneof("value");

@ -9,7 +9,7 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.ClientArgs</code> * Generated from protobuf message <code>grpc.testing.ClientArgs</code>
*/ */
class ClientArgs extends \Google\Protobuf\Internal\Message class ClientArgs extends \Google\Protobuf\Internal\Message
{ {
@ -21,7 +21,8 @@ class ClientArgs extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ClientConfig setup = 1;</code> * Generated from protobuf field <code>.grpc.testing.ClientConfig setup = 1;</code>
* @return \Grpc\Testing\ClientConfig
*/ */
public function getSetup() public function getSetup()
{ {
@ -29,16 +30,21 @@ class ClientArgs extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ClientConfig setup = 1;</code> * Generated from protobuf field <code>.grpc.testing.ClientConfig setup = 1;</code>
* @param \Grpc\Testing\ClientConfig $var
* @return $this
*/ */
public function setSetup(&$var) public function setSetup($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\ClientConfig::class); GPBUtil::checkMessage($var, \Grpc\Testing\ClientConfig::class);
$this->writeOneof(1, $var); $this->writeOneof(1, $var);
return $this;
} }
/** /**
* <code>.grpc.testing.Mark mark = 2;</code> * Generated from protobuf field <code>.grpc.testing.Mark mark = 2;</code>
* @return \Grpc\Testing\Mark
*/ */
public function getMark() public function getMark()
{ {
@ -46,14 +52,21 @@ class ClientArgs extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.Mark mark = 2;</code> * Generated from protobuf field <code>.grpc.testing.Mark mark = 2;</code>
* @param \Grpc\Testing\Mark $var
* @return $this
*/ */
public function setMark(&$var) public function setMark($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\Mark::class); GPBUtil::checkMessage($var, \Grpc\Testing\Mark::class);
$this->writeOneof(2, $var); $this->writeOneof(2, $var);
return $this;
} }
/**
* @return string
*/
public function getArgtype() public function getArgtype()
{ {
return $this->whichOneof("argtype"); return $this->whichOneof("argtype");

@ -9,96 +9,94 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.ClientConfig</code> * Generated from protobuf message <code>grpc.testing.ClientConfig</code>
*/ */
class ClientConfig extends \Google\Protobuf\Internal\Message class ClientConfig extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* List of targets to connect to. At least one target needs to be specified. * List of targets to connect to. At least one target needs to be specified.
* </pre>
* *
* <code>repeated string server_targets = 1;</code> * Generated from protobuf field <code>repeated string server_targets = 1;</code>
*/ */
private $server_targets; private $server_targets;
/** /**
* <code>.grpc.testing.ClientType client_type = 2;</code> * Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code>
*/ */
private $client_type = 0; private $client_type = 0;
/** /**
* <code>.grpc.testing.SecurityParams security_params = 3;</code> * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code>
*/ */
private $security_params = null; private $security_params = null;
/** /**
* <pre>
* How many concurrent RPCs to start for each channel. * How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC. * For synchronous client, use a separate thread for each outstanding RPC.
* </pre>
* *
* <code>int32 outstanding_rpcs_per_channel = 4;</code> * Generated from protobuf field <code>int32 outstanding_rpcs_per_channel = 4;</code>
*/ */
private $outstanding_rpcs_per_channel = 0; private $outstanding_rpcs_per_channel = 0;
/** /**
* <pre>
* Number of independent client channels to create. * Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()] * i-th channel will connect to server_target[i % server_targets.size()]
* </pre>
* *
* <code>int32 client_channels = 5;</code> * Generated from protobuf field <code>int32 client_channels = 5;</code>
*/ */
private $client_channels = 0; private $client_channels = 0;
/** /**
* <pre>
* Only for async client. Number of threads to use to start/manage RPCs. * Only for async client. Number of threads to use to start/manage RPCs.
* </pre>
* *
* <code>int32 async_client_threads = 7;</code> * Generated from protobuf field <code>int32 async_client_threads = 7;</code>
*/ */
private $async_client_threads = 0; private $async_client_threads = 0;
/** /**
* <code>.grpc.testing.RpcType rpc_type = 8;</code> * Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
*/ */
private $rpc_type = 0; private $rpc_type = 0;
/** /**
* <pre>
* The requested load for the entire client (aggregated over all the threads). * The requested load for the entire client (aggregated over all the threads).
* </pre>
* *
* <code>.grpc.testing.LoadParams load_params = 10;</code> * Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code>
*/ */
private $load_params = null; private $load_params = null;
/** /**
* <code>.grpc.testing.PayloadConfig payload_config = 11;</code> * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
*/ */
private $payload_config = null; private $payload_config = null;
/** /**
* <code>.grpc.testing.HistogramParams histogram_params = 12;</code> * Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
*/ */
private $histogram_params = null; private $histogram_params = null;
/** /**
* <pre>
* Specify the cores we should run the client on, if desired * Specify the cores we should run the client on, if desired
* </pre>
* *
* <code>repeated int32 core_list = 13;</code> * Generated from protobuf field <code>repeated int32 core_list = 13;</code>
*/ */
private $core_list; private $core_list;
/** /**
* <code>int32 core_limit = 14;</code> * Generated from protobuf field <code>int32 core_limit = 14;</code>
*/ */
private $core_limit = 0; private $core_limit = 0;
/** /**
* <pre>
* If we use an OTHER_CLIENT client_type, this string gives more detail * If we use an OTHER_CLIENT client_type, this string gives more detail
* </pre>
* *
* <code>string other_client_api = 15;</code> * Generated from protobuf field <code>string other_client_api = 15;</code>
*/ */
private $other_client_api = ''; private $other_client_api = '';
/** /**
* <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code> * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
*/ */
private $channel_args; private $channel_args;
/**
* Number of threads that share each completion queue
*
* Generated from protobuf field <code>int32 threads_per_cq = 17;</code>
*/
private $threads_per_cq = 0;
/**
* Number of messages on a stream before it gets finished/restarted
*
* Generated from protobuf field <code>int32 messages_per_stream = 18;</code>
*/
private $messages_per_stream = 0;
public function __construct() { public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
@ -106,11 +104,10 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* List of targets to connect to. At least one target needs to be specified. * List of targets to connect to. At least one target needs to be specified.
* </pre>
* *
* <code>repeated string server_targets = 1;</code> * Generated from protobuf field <code>repeated string server_targets = 1;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getServerTargets() public function getServerTargets()
{ {
@ -118,20 +115,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* List of targets to connect to. At least one target needs to be specified. * List of targets to connect to. At least one target needs to be specified.
* </pre>
* *
* <code>repeated string server_targets = 1;</code> * Generated from protobuf field <code>repeated string server_targets = 1;</code>
* @param string[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setServerTargets(&$var) public function setServerTargets($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->server_targets = $var; $this->server_targets = $arr;
return $this;
} }
/** /**
* <code>.grpc.testing.ClientType client_type = 2;</code> * Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code>
* @return int
*/ */
public function getClientType() public function getClientType()
{ {
@ -139,16 +139,21 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ClientType client_type = 2;</code> * Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code>
* @param int $var
* @return $this
*/ */
public function setClientType($var) public function setClientType($var)
{ {
GPBUtil::checkEnum($var, \Grpc\Testing\ClientType::class); GPBUtil::checkEnum($var, \Grpc\Testing\ClientType::class);
$this->client_type = $var; $this->client_type = $var;
return $this;
} }
/** /**
* <code>.grpc.testing.SecurityParams security_params = 3;</code> * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code>
* @return \Grpc\Testing\SecurityParams
*/ */
public function getSecurityParams() public function getSecurityParams()
{ {
@ -156,21 +161,24 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.SecurityParams security_params = 3;</code> * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code>
* @param \Grpc\Testing\SecurityParams $var
* @return $this
*/ */
public function setSecurityParams(&$var) public function setSecurityParams($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class); GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class);
$this->security_params = $var; $this->security_params = $var;
return $this;
} }
/** /**
* <pre>
* How many concurrent RPCs to start for each channel. * How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC. * For synchronous client, use a separate thread for each outstanding RPC.
* </pre>
* *
* <code>int32 outstanding_rpcs_per_channel = 4;</code> * Generated from protobuf field <code>int32 outstanding_rpcs_per_channel = 4;</code>
* @return int
*/ */
public function getOutstandingRpcsPerChannel() public function getOutstandingRpcsPerChannel()
{ {
@ -178,26 +186,27 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* How many concurrent RPCs to start for each channel. * How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC. * For synchronous client, use a separate thread for each outstanding RPC.
* </pre>
* *
* <code>int32 outstanding_rpcs_per_channel = 4;</code> * Generated from protobuf field <code>int32 outstanding_rpcs_per_channel = 4;</code>
* @param int $var
* @return $this
*/ */
public function setOutstandingRpcsPerChannel($var) public function setOutstandingRpcsPerChannel($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->outstanding_rpcs_per_channel = $var; $this->outstanding_rpcs_per_channel = $var;
return $this;
} }
/** /**
* <pre>
* Number of independent client channels to create. * Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()] * i-th channel will connect to server_target[i % server_targets.size()]
* </pre>
* *
* <code>int32 client_channels = 5;</code> * Generated from protobuf field <code>int32 client_channels = 5;</code>
* @return int
*/ */
public function getClientChannels() public function getClientChannels()
{ {
@ -205,25 +214,26 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Number of independent client channels to create. * Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()] * i-th channel will connect to server_target[i % server_targets.size()]
* </pre>
* *
* <code>int32 client_channels = 5;</code> * Generated from protobuf field <code>int32 client_channels = 5;</code>
* @param int $var
* @return $this
*/ */
public function setClientChannels($var) public function setClientChannels($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->client_channels = $var; $this->client_channels = $var;
return $this;
} }
/** /**
* <pre>
* Only for async client. Number of threads to use to start/manage RPCs. * Only for async client. Number of threads to use to start/manage RPCs.
* </pre>
* *
* <code>int32 async_client_threads = 7;</code> * Generated from protobuf field <code>int32 async_client_threads = 7;</code>
* @return int
*/ */
public function getAsyncClientThreads() public function getAsyncClientThreads()
{ {
@ -231,20 +241,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Only for async client. Number of threads to use to start/manage RPCs. * Only for async client. Number of threads to use to start/manage RPCs.
* </pre>
* *
* <code>int32 async_client_threads = 7;</code> * Generated from protobuf field <code>int32 async_client_threads = 7;</code>
* @param int $var
* @return $this
*/ */
public function setAsyncClientThreads($var) public function setAsyncClientThreads($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->async_client_threads = $var; $this->async_client_threads = $var;
return $this;
} }
/** /**
* <code>.grpc.testing.RpcType rpc_type = 8;</code> * Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
* @return int
*/ */
public function getRpcType() public function getRpcType()
{ {
@ -252,20 +265,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.RpcType rpc_type = 8;</code> * Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
* @param int $var
* @return $this
*/ */
public function setRpcType($var) public function setRpcType($var)
{ {
GPBUtil::checkEnum($var, \Grpc\Testing\RpcType::class); GPBUtil::checkEnum($var, \Grpc\Testing\RpcType::class);
$this->rpc_type = $var; $this->rpc_type = $var;
return $this;
} }
/** /**
* <pre>
* The requested load for the entire client (aggregated over all the threads). * The requested load for the entire client (aggregated over all the threads).
* </pre>
* *
* <code>.grpc.testing.LoadParams load_params = 10;</code> * Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code>
* @return \Grpc\Testing\LoadParams
*/ */
public function getLoadParams() public function getLoadParams()
{ {
@ -273,20 +289,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* The requested load for the entire client (aggregated over all the threads). * The requested load for the entire client (aggregated over all the threads).
* </pre>
* *
* <code>.grpc.testing.LoadParams load_params = 10;</code> * Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code>
* @param \Grpc\Testing\LoadParams $var
* @return $this
*/ */
public function setLoadParams(&$var) public function setLoadParams($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\LoadParams::class); GPBUtil::checkMessage($var, \Grpc\Testing\LoadParams::class);
$this->load_params = $var; $this->load_params = $var;
return $this;
} }
/** /**
* <code>.grpc.testing.PayloadConfig payload_config = 11;</code> * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
* @return \Grpc\Testing\PayloadConfig
*/ */
public function getPayloadConfig() public function getPayloadConfig()
{ {
@ -294,16 +313,21 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.PayloadConfig payload_config = 11;</code> * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
* @param \Grpc\Testing\PayloadConfig $var
* @return $this
*/ */
public function setPayloadConfig(&$var) public function setPayloadConfig($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class); GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class);
$this->payload_config = $var; $this->payload_config = $var;
return $this;
} }
/** /**
* <code>.grpc.testing.HistogramParams histogram_params = 12;</code> * Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
* @return \Grpc\Testing\HistogramParams
*/ */
public function getHistogramParams() public function getHistogramParams()
{ {
@ -311,20 +335,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.HistogramParams histogram_params = 12;</code> * Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
* @param \Grpc\Testing\HistogramParams $var
* @return $this
*/ */
public function setHistogramParams(&$var) public function setHistogramParams($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\HistogramParams::class); GPBUtil::checkMessage($var, \Grpc\Testing\HistogramParams::class);
$this->histogram_params = $var; $this->histogram_params = $var;
return $this;
} }
/** /**
* <pre>
* Specify the cores we should run the client on, if desired * Specify the cores we should run the client on, if desired
* </pre>
* *
* <code>repeated int32 core_list = 13;</code> * Generated from protobuf field <code>repeated int32 core_list = 13;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getCoreList() public function getCoreList()
{ {
@ -332,20 +359,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Specify the cores we should run the client on, if desired * Specify the cores we should run the client on, if desired
* </pre>
* *
* <code>repeated int32 core_list = 13;</code> * Generated from protobuf field <code>repeated int32 core_list = 13;</code>
* @param int[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setCoreList(&$var) public function setCoreList($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
$this->core_list = $var; $this->core_list = $arr;
return $this;
} }
/** /**
* <code>int32 core_limit = 14;</code> * Generated from protobuf field <code>int32 core_limit = 14;</code>
* @return int
*/ */
public function getCoreLimit() public function getCoreLimit()
{ {
@ -353,20 +383,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 core_limit = 14;</code> * Generated from protobuf field <code>int32 core_limit = 14;</code>
* @param int $var
* @return $this
*/ */
public function setCoreLimit($var) public function setCoreLimit($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->core_limit = $var; $this->core_limit = $var;
return $this;
} }
/** /**
* <pre>
* If we use an OTHER_CLIENT client_type, this string gives more detail * If we use an OTHER_CLIENT client_type, this string gives more detail
* </pre>
* *
* <code>string other_client_api = 15;</code> * Generated from protobuf field <code>string other_client_api = 15;</code>
* @return string
*/ */
public function getOtherClientApi() public function getOtherClientApi()
{ {
@ -374,20 +407,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* If we use an OTHER_CLIENT client_type, this string gives more detail * If we use an OTHER_CLIENT client_type, this string gives more detail
* </pre>
* *
* <code>string other_client_api = 15;</code> * Generated from protobuf field <code>string other_client_api = 15;</code>
* @param string $var
* @return $this
*/ */
public function setOtherClientApi($var) public function setOtherClientApi($var)
{ {
GPBUtil::checkString($var, True); GPBUtil::checkString($var, True);
$this->other_client_api = $var; $this->other_client_api = $var;
return $this;
} }
/** /**
* <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code> * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getChannelArgs() public function getChannelArgs()
{ {
@ -395,12 +431,68 @@ class ClientConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code> * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
* @param \Grpc\Testing\ChannelArg[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setChannelArgs($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ChannelArg::class);
$this->channel_args = $arr;
return $this;
}
/**
* Number of threads that share each completion queue
*
* Generated from protobuf field <code>int32 threads_per_cq = 17;</code>
* @return int
*/
public function getThreadsPerCq()
{
return $this->threads_per_cq;
}
/**
* Number of threads that share each completion queue
*
* Generated from protobuf field <code>int32 threads_per_cq = 17;</code>
* @param int $var
* @return $this
*/
public function setThreadsPerCq($var)
{
GPBUtil::checkInt32($var);
$this->threads_per_cq = $var;
return $this;
}
/**
* Number of messages on a stream before it gets finished/restarted
*
* Generated from protobuf field <code>int32 messages_per_stream = 18;</code>
* @return int
*/
public function getMessagesPerStream()
{
return $this->messages_per_stream;
}
/**
* Number of messages on a stream before it gets finished/restarted
*
* Generated from protobuf field <code>int32 messages_per_stream = 18;</code>
* @param int $var
* @return $this
*/ */
public function setChannelArgs(&$var) public function setMessagesPerStream($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ChannelArg::class); GPBUtil::checkInt32($var);
$this->channel_args = $var; $this->messages_per_stream = $var;
return $this;
} }
} }

@ -9,42 +9,48 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.ClientStats</code> * Generated from protobuf message <code>grpc.testing.ClientStats</code>
*/ */
class ClientStats extends \Google\Protobuf\Internal\Message class ClientStats extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* Latency histogram. Data points are in nanoseconds. * Latency histogram. Data points are in nanoseconds.
* </pre>
* *
* <code>.grpc.testing.HistogramData latencies = 1;</code> * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 1;</code>
*/ */
private $latencies = null; private $latencies = null;
/** /**
* <pre>
* See ServerStats for details. * See ServerStats for details.
* </pre>
* *
* <code>double time_elapsed = 2;</code> * Generated from protobuf field <code>double time_elapsed = 2;</code>
*/ */
private $time_elapsed = 0.0; private $time_elapsed = 0.0;
/** /**
* <code>double time_user = 3;</code> * Generated from protobuf field <code>double time_user = 3;</code>
*/ */
private $time_user = 0.0; private $time_user = 0.0;
/** /**
* <code>double time_system = 4;</code> * Generated from protobuf field <code>double time_system = 4;</code>
*/ */
private $time_system = 0.0; private $time_system = 0.0;
/** /**
* <pre>
* Number of failed requests (one row per status code seen) * Number of failed requests (one row per status code seen)
* </pre>
* *
* <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code> * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code>
*/ */
private $request_results; private $request_results;
/**
* Number of polls called inside completion queue
*
* Generated from protobuf field <code>uint64 cq_poll_count = 6;</code>
*/
private $cq_poll_count = 0;
/**
* Core library stats
*
* Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code>
*/
private $core_stats = null;
public function __construct() { public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
@ -52,11 +58,10 @@ class ClientStats extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Latency histogram. Data points are in nanoseconds. * Latency histogram. Data points are in nanoseconds.
* </pre>
* *
* <code>.grpc.testing.HistogramData latencies = 1;</code> * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 1;</code>
* @return \Grpc\Testing\HistogramData
*/ */
public function getLatencies() public function getLatencies()
{ {
@ -64,24 +69,25 @@ class ClientStats extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Latency histogram. Data points are in nanoseconds. * Latency histogram. Data points are in nanoseconds.
* </pre>
* *
* <code>.grpc.testing.HistogramData latencies = 1;</code> * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 1;</code>
* @param \Grpc\Testing\HistogramData $var
* @return $this
*/ */
public function setLatencies(&$var) public function setLatencies($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class); GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class);
$this->latencies = $var; $this->latencies = $var;
return $this;
} }
/** /**
* <pre>
* See ServerStats for details. * See ServerStats for details.
* </pre>
* *
* <code>double time_elapsed = 2;</code> * Generated from protobuf field <code>double time_elapsed = 2;</code>
* @return float
*/ */
public function getTimeElapsed() public function getTimeElapsed()
{ {
@ -89,20 +95,23 @@ class ClientStats extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* See ServerStats for details. * See ServerStats for details.
* </pre>
* *
* <code>double time_elapsed = 2;</code> * Generated from protobuf field <code>double time_elapsed = 2;</code>
* @param float $var
* @return $this
*/ */
public function setTimeElapsed($var) public function setTimeElapsed($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->time_elapsed = $var; $this->time_elapsed = $var;
return $this;
} }
/** /**
* <code>double time_user = 3;</code> * Generated from protobuf field <code>double time_user = 3;</code>
* @return float
*/ */
public function getTimeUser() public function getTimeUser()
{ {
@ -110,16 +119,21 @@ class ClientStats extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double time_user = 3;</code> * Generated from protobuf field <code>double time_user = 3;</code>
* @param float $var
* @return $this
*/ */
public function setTimeUser($var) public function setTimeUser($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->time_user = $var; $this->time_user = $var;
return $this;
} }
/** /**
* <code>double time_system = 4;</code> * Generated from protobuf field <code>double time_system = 4;</code>
* @return float
*/ */
public function getTimeSystem() public function getTimeSystem()
{ {
@ -127,20 +141,23 @@ class ClientStats extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double time_system = 4;</code> * Generated from protobuf field <code>double time_system = 4;</code>
* @param float $var
* @return $this
*/ */
public function setTimeSystem($var) public function setTimeSystem($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->time_system = $var; $this->time_system = $var;
return $this;
} }
/** /**
* <pre>
* Number of failed requests (one row per status code seen) * Number of failed requests (one row per status code seen)
* </pre>
* *
* <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code> * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getRequestResults() public function getRequestResults()
{ {
@ -148,16 +165,70 @@ class ClientStats extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Number of failed requests (one row per status code seen) * Number of failed requests (one row per status code seen)
* </pre>
* *
* <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code> * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code>
* @param \Grpc\Testing\RequestResultCount[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setRequestResults(&$var) public function setRequestResults($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class);
$this->request_results = $var; $this->request_results = $arr;
return $this;
}
/**
* Number of polls called inside completion queue
*
* Generated from protobuf field <code>uint64 cq_poll_count = 6;</code>
* @return int|string
*/
public function getCqPollCount()
{
return $this->cq_poll_count;
}
/**
* Number of polls called inside completion queue
*
* Generated from protobuf field <code>uint64 cq_poll_count = 6;</code>
* @param int|string $var
* @return $this
*/
public function setCqPollCount($var)
{
GPBUtil::checkUint64($var);
$this->cq_poll_count = $var;
return $this;
}
/**
* Core library stats
*
* Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code>
* @return \Grpc\Core\Stats
*/
public function getCoreStats()
{
return $this->core_stats;
}
/**
* Core library stats
*
* Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code>
* @param \Grpc\Core\Stats $var
* @return $this
*/
public function setCoreStats($var)
{
GPBUtil::checkMessage($var, \Grpc\Core\Stats::class);
$this->core_stats = $var;
return $this;
} }
} }

@ -9,12 +9,12 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.ClientStatus</code> * Generated from protobuf message <code>grpc.testing.ClientStatus</code>
*/ */
class ClientStatus extends \Google\Protobuf\Internal\Message class ClientStatus extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>.grpc.testing.ClientStats stats = 1;</code> * Generated from protobuf field <code>.grpc.testing.ClientStats stats = 1;</code>
*/ */
private $stats = null; private $stats = null;
@ -24,7 +24,8 @@ class ClientStatus extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ClientStats stats = 1;</code> * Generated from protobuf field <code>.grpc.testing.ClientStats stats = 1;</code>
* @return \Grpc\Testing\ClientStats
*/ */
public function getStats() public function getStats()
{ {
@ -32,12 +33,16 @@ class ClientStatus extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ClientStats stats = 1;</code> * Generated from protobuf field <code>.grpc.testing.ClientStats stats = 1;</code>
* @param \Grpc\Testing\ClientStats $var
* @return $this
*/ */
public function setStats(&$var) public function setStats($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\ClientStats::class); GPBUtil::checkMessage($var, \Grpc\Testing\ClientStats::class);
$this->stats = $var; $this->stats = $var;
return $this;
} }
} }

@ -5,29 +5,25 @@
namespace Grpc\Testing; namespace Grpc\Testing;
/** /**
* Protobuf enum <code>grpc.testing.ClientType</code> * Protobuf enum <code>Grpc\Testing\ClientType</code>
*/ */
class ClientType class ClientType
{ {
/** /**
* <pre>
* Many languages support a basic distinction between using * Many languages support a basic distinction between using
* sync or async client, and this allows the specification * sync or async client, and this allows the specification
* </pre>
* *
* <code>SYNC_CLIENT = 0;</code> * Generated from protobuf enum <code>SYNC_CLIENT = 0;</code>
*/ */
const SYNC_CLIENT = 0; const SYNC_CLIENT = 0;
/** /**
* <code>ASYNC_CLIENT = 1;</code> * Generated from protobuf enum <code>ASYNC_CLIENT = 1;</code>
*/ */
const ASYNC_CLIENT = 1; const ASYNC_CLIENT = 1;
/** /**
* <pre>
* used for some language-specific variants * used for some language-specific variants
* </pre>
* *
* <code>OTHER_CLIENT = 2;</code> * Generated from protobuf enum <code>OTHER_CLIENT = 2;</code>
*/ */
const OTHER_CLIENT = 2; const OTHER_CLIENT = 2;
} }

@ -9,12 +9,10 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Once an RPC finishes, immediately start a new one. * Once an RPC finishes, immediately start a new one.
* No configuration parameters needed. * No configuration parameters needed.
* </pre>
* *
* Protobuf type <code>grpc.testing.ClosedLoopParams</code> * Generated from protobuf message <code>grpc.testing.ClosedLoopParams</code>
*/ */
class ClosedLoopParams extends \Google\Protobuf\Internal\Message class ClosedLoopParams extends \Google\Protobuf\Internal\Message
{ {

@ -9,12 +9,10 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* TODO (vpai): Fill this in once the details of complex, representative * TODO (vpai): Fill this in once the details of complex, representative
* protos are decided * protos are decided
* </pre>
* *
* Protobuf type <code>grpc.testing.ComplexProtoParams</code> * Generated from protobuf message <code>grpc.testing.ComplexProtoParams</code>
*/ */
class ComplexProtoParams extends \Google\Protobuf\Internal\Message class ComplexProtoParams extends \Google\Protobuf\Internal\Message
{ {

@ -9,7 +9,7 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.CoreRequest</code> * Generated from protobuf message <code>grpc.testing.CoreRequest</code>
*/ */
class CoreRequest extends \Google\Protobuf\Internal\Message class CoreRequest extends \Google\Protobuf\Internal\Message
{ {

@ -9,16 +9,14 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.CoreResponse</code> * Generated from protobuf message <code>grpc.testing.CoreResponse</code>
*/ */
class CoreResponse extends \Google\Protobuf\Internal\Message class CoreResponse extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* Number of cores available on the server * Number of cores available on the server
* </pre>
* *
* <code>int32 cores = 1;</code> * Generated from protobuf field <code>int32 cores = 1;</code>
*/ */
private $cores = 0; private $cores = 0;
@ -28,11 +26,10 @@ class CoreResponse extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Number of cores available on the server * Number of cores available on the server
* </pre>
* *
* <code>int32 cores = 1;</code> * Generated from protobuf field <code>int32 cores = 1;</code>
* @return int
*/ */
public function getCores() public function getCores()
{ {
@ -40,16 +37,18 @@ class CoreResponse extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Number of cores available on the server * Number of cores available on the server
* </pre>
* *
* <code>int32 cores = 1;</code> * Generated from protobuf field <code>int32 cores = 1;</code>
* @param int $var
* @return $this
*/ */
public function setCores($var) public function setCores($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->cores = $var; $this->cores = $var;
return $this;
} }
} }

@ -9,21 +9,19 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* A protobuf representation for grpc status. This is used by test * A protobuf representation for grpc status. This is used by test
* clients to specify a status that the server should attempt to return. * clients to specify a status that the server should attempt to return.
* </pre>
* *
* Protobuf type <code>grpc.testing.EchoStatus</code> * Generated from protobuf message <code>grpc.testing.EchoStatus</code>
*/ */
class EchoStatus extends \Google\Protobuf\Internal\Message class EchoStatus extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>int32 code = 1;</code> * Generated from protobuf field <code>int32 code = 1;</code>
*/ */
private $code = 0; private $code = 0;
/** /**
* <code>string message = 2;</code> * Generated from protobuf field <code>string message = 2;</code>
*/ */
private $message = ''; private $message = '';
@ -33,7 +31,8 @@ class EchoStatus extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 code = 1;</code> * Generated from protobuf field <code>int32 code = 1;</code>
* @return int
*/ */
public function getCode() public function getCode()
{ {
@ -41,16 +40,21 @@ class EchoStatus extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 code = 1;</code> * Generated from protobuf field <code>int32 code = 1;</code>
* @param int $var
* @return $this
*/ */
public function setCode($var) public function setCode($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->code = $var; $this->code = $var;
return $this;
} }
/** /**
* <code>string message = 2;</code> * Generated from protobuf field <code>string message = 2;</code>
* @return string
*/ */
public function getMessage() public function getMessage()
{ {
@ -58,12 +62,16 @@ class EchoStatus extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>string message = 2;</code> * Generated from protobuf field <code>string message = 2;</code>
* @param string $var
* @return $this
*/ */
public function setMessage($var) public function setMessage($var)
{ {
GPBUtil::checkString($var, True); GPBUtil::checkString($var, True);
$this->message = $var; $this->message = $var;
return $this;
} }
} }

@ -9,36 +9,34 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Histogram data based on grpc/support/histogram.c * Histogram data based on grpc/support/histogram.c
* </pre>
* *
* Protobuf type <code>grpc.testing.HistogramData</code> * Generated from protobuf message <code>grpc.testing.HistogramData</code>
*/ */
class HistogramData extends \Google\Protobuf\Internal\Message class HistogramData extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>repeated uint32 bucket = 1;</code> * Generated from protobuf field <code>repeated uint32 bucket = 1;</code>
*/ */
private $bucket; private $bucket;
/** /**
* <code>double min_seen = 2;</code> * Generated from protobuf field <code>double min_seen = 2;</code>
*/ */
private $min_seen = 0.0; private $min_seen = 0.0;
/** /**
* <code>double max_seen = 3;</code> * Generated from protobuf field <code>double max_seen = 3;</code>
*/ */
private $max_seen = 0.0; private $max_seen = 0.0;
/** /**
* <code>double sum = 4;</code> * Generated from protobuf field <code>double sum = 4;</code>
*/ */
private $sum = 0.0; private $sum = 0.0;
/** /**
* <code>double sum_of_squares = 5;</code> * Generated from protobuf field <code>double sum_of_squares = 5;</code>
*/ */
private $sum_of_squares = 0.0; private $sum_of_squares = 0.0;
/** /**
* <code>double count = 6;</code> * Generated from protobuf field <code>double count = 6;</code>
*/ */
private $count = 0.0; private $count = 0.0;
@ -48,7 +46,8 @@ class HistogramData extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>repeated uint32 bucket = 1;</code> * Generated from protobuf field <code>repeated uint32 bucket = 1;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getBucket() public function getBucket()
{ {
@ -56,16 +55,21 @@ class HistogramData extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>repeated uint32 bucket = 1;</code> * Generated from protobuf field <code>repeated uint32 bucket = 1;</code>
* @param int[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setBucket(&$var) public function setBucket($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32);
$this->bucket = $var; $this->bucket = $arr;
return $this;
} }
/** /**
* <code>double min_seen = 2;</code> * Generated from protobuf field <code>double min_seen = 2;</code>
* @return float
*/ */
public function getMinSeen() public function getMinSeen()
{ {
@ -73,16 +77,21 @@ class HistogramData extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double min_seen = 2;</code> * Generated from protobuf field <code>double min_seen = 2;</code>
* @param float $var
* @return $this
*/ */
public function setMinSeen($var) public function setMinSeen($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->min_seen = $var; $this->min_seen = $var;
return $this;
} }
/** /**
* <code>double max_seen = 3;</code> * Generated from protobuf field <code>double max_seen = 3;</code>
* @return float
*/ */
public function getMaxSeen() public function getMaxSeen()
{ {
@ -90,16 +99,21 @@ class HistogramData extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double max_seen = 3;</code> * Generated from protobuf field <code>double max_seen = 3;</code>
* @param float $var
* @return $this
*/ */
public function setMaxSeen($var) public function setMaxSeen($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->max_seen = $var; $this->max_seen = $var;
return $this;
} }
/** /**
* <code>double sum = 4;</code> * Generated from protobuf field <code>double sum = 4;</code>
* @return float
*/ */
public function getSum() public function getSum()
{ {
@ -107,16 +121,21 @@ class HistogramData extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double sum = 4;</code> * Generated from protobuf field <code>double sum = 4;</code>
* @param float $var
* @return $this
*/ */
public function setSum($var) public function setSum($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->sum = $var; $this->sum = $var;
return $this;
} }
/** /**
* <code>double sum_of_squares = 5;</code> * Generated from protobuf field <code>double sum_of_squares = 5;</code>
* @return float
*/ */
public function getSumOfSquares() public function getSumOfSquares()
{ {
@ -124,16 +143,21 @@ class HistogramData extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double sum_of_squares = 5;</code> * Generated from protobuf field <code>double sum_of_squares = 5;</code>
* @param float $var
* @return $this
*/ */
public function setSumOfSquares($var) public function setSumOfSquares($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->sum_of_squares = $var; $this->sum_of_squares = $var;
return $this;
} }
/** /**
* <code>double count = 6;</code> * Generated from protobuf field <code>double count = 6;</code>
* @return float
*/ */
public function getCount() public function getCount()
{ {
@ -141,12 +165,16 @@ class HistogramData extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double count = 6;</code> * Generated from protobuf field <code>double count = 6;</code>
* @param float $var
* @return $this
*/ */
public function setCount($var) public function setCount($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->count = $var; $this->count = $var;
return $this;
} }
} }

@ -9,28 +9,22 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Histogram params based on grpc/support/histogram.c * Histogram params based on grpc/support/histogram.c
* </pre>
* *
* Protobuf type <code>grpc.testing.HistogramParams</code> * Generated from protobuf message <code>grpc.testing.HistogramParams</code>
*/ */
class HistogramParams extends \Google\Protobuf\Internal\Message class HistogramParams extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* first bucket is [0, 1 + resolution) * first bucket is [0, 1 + resolution)
* </pre>
* *
* <code>double resolution = 1;</code> * Generated from protobuf field <code>double resolution = 1;</code>
*/ */
private $resolution = 0.0; private $resolution = 0.0;
/** /**
* <pre>
* use enough buckets to allow this value * use enough buckets to allow this value
* </pre>
* *
* <code>double max_possible = 2;</code> * Generated from protobuf field <code>double max_possible = 2;</code>
*/ */
private $max_possible = 0.0; private $max_possible = 0.0;
@ -40,11 +34,10 @@ class HistogramParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* first bucket is [0, 1 + resolution) * first bucket is [0, 1 + resolution)
* </pre>
* *
* <code>double resolution = 1;</code> * Generated from protobuf field <code>double resolution = 1;</code>
* @return float
*/ */
public function getResolution() public function getResolution()
{ {
@ -52,24 +45,25 @@ class HistogramParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* first bucket is [0, 1 + resolution) * first bucket is [0, 1 + resolution)
* </pre>
* *
* <code>double resolution = 1;</code> * Generated from protobuf field <code>double resolution = 1;</code>
* @param float $var
* @return $this
*/ */
public function setResolution($var) public function setResolution($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->resolution = $var; $this->resolution = $var;
return $this;
} }
/** /**
* <pre>
* use enough buckets to allow this value * use enough buckets to allow this value
* </pre>
* *
* <code>double max_possible = 2;</code> * Generated from protobuf field <code>double max_possible = 2;</code>
* @return float
*/ */
public function getMaxPossible() public function getMaxPossible()
{ {
@ -77,16 +71,18 @@ class HistogramParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* use enough buckets to allow this value * use enough buckets to allow this value
* </pre>
* *
* <code>double max_possible = 2;</code> * Generated from protobuf field <code>double max_possible = 2;</code>
* @param float $var
* @return $this
*/ */
public function setMaxPossible($var) public function setMaxPossible($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->max_possible = $var; $this->max_possible = $var;
return $this;
} }
} }

@ -9,7 +9,7 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.LoadParams</code> * Generated from protobuf message <code>grpc.testing.LoadParams</code>
*/ */
class LoadParams extends \Google\Protobuf\Internal\Message class LoadParams extends \Google\Protobuf\Internal\Message
{ {
@ -21,7 +21,8 @@ class LoadParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ClosedLoopParams closed_loop = 1;</code> * Generated from protobuf field <code>.grpc.testing.ClosedLoopParams closed_loop = 1;</code>
* @return \Grpc\Testing\ClosedLoopParams
*/ */
public function getClosedLoop() public function getClosedLoop()
{ {
@ -29,16 +30,21 @@ class LoadParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ClosedLoopParams closed_loop = 1;</code> * Generated from protobuf field <code>.grpc.testing.ClosedLoopParams closed_loop = 1;</code>
* @param \Grpc\Testing\ClosedLoopParams $var
* @return $this
*/ */
public function setClosedLoop(&$var) public function setClosedLoop($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\ClosedLoopParams::class); GPBUtil::checkMessage($var, \Grpc\Testing\ClosedLoopParams::class);
$this->writeOneof(1, $var); $this->writeOneof(1, $var);
return $this;
} }
/** /**
* <code>.grpc.testing.PoissonParams poisson = 2;</code> * Generated from protobuf field <code>.grpc.testing.PoissonParams poisson = 2;</code>
* @return \Grpc\Testing\PoissonParams
*/ */
public function getPoisson() public function getPoisson()
{ {
@ -46,14 +52,21 @@ class LoadParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.PoissonParams poisson = 2;</code> * Generated from protobuf field <code>.grpc.testing.PoissonParams poisson = 2;</code>
* @param \Grpc\Testing\PoissonParams $var
* @return $this
*/ */
public function setPoisson(&$var) public function setPoisson($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\PoissonParams::class); GPBUtil::checkMessage($var, \Grpc\Testing\PoissonParams::class);
$this->writeOneof(2, $var); $this->writeOneof(2, $var);
return $this;
} }
/**
* @return string
*/
public function getLoad() public function getLoad()
{ {
return $this->whichOneof("load"); return $this->whichOneof("load");

@ -9,20 +9,16 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Request current stats * Request current stats
* </pre>
* *
* Protobuf type <code>grpc.testing.Mark</code> * Generated from protobuf message <code>grpc.testing.Mark</code>
*/ */
class Mark extends \Google\Protobuf\Internal\Message class Mark extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* if true, the stats will be reset after taking their snapshot. * if true, the stats will be reset after taking their snapshot.
* </pre>
* *
* <code>bool reset = 1;</code> * Generated from protobuf field <code>bool reset = 1;</code>
*/ */
private $reset = false; private $reset = false;
@ -32,11 +28,10 @@ class Mark extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* if true, the stats will be reset after taking their snapshot. * if true, the stats will be reset after taking their snapshot.
* </pre>
* *
* <code>bool reset = 1;</code> * Generated from protobuf field <code>bool reset = 1;</code>
* @return bool
*/ */
public function getReset() public function getReset()
{ {
@ -44,16 +39,18 @@ class Mark extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* if true, the stats will be reset after taking their snapshot. * if true, the stats will be reset after taking their snapshot.
* </pre>
* *
* <code>bool reset = 1;</code> * Generated from protobuf field <code>bool reset = 1;</code>
* @param bool $var
* @return $this
*/ */
public function setReset($var) public function setReset($var)
{ {
GPBUtil::checkBool($var); GPBUtil::checkBool($var);
$this->reset = $var; $this->reset = $var;
return $this;
} }
} }

@ -9,29 +9,23 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* A block of data, to simply increase gRPC message size. * A block of data, to simply increase gRPC message size.
* </pre>
* *
* Protobuf type <code>grpc.testing.Payload</code> * Generated from protobuf message <code>grpc.testing.Payload</code>
*/ */
class Payload extends \Google\Protobuf\Internal\Message class Payload extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* DEPRECATED, don't use. To be removed shortly. * DEPRECATED, don't use. To be removed shortly.
* The type of data in body. * The type of data in body.
* </pre>
* *
* <code>.grpc.testing.PayloadType type = 1;</code> * Generated from protobuf field <code>.grpc.testing.PayloadType type = 1;</code>
*/ */
private $type = 0; private $type = 0;
/** /**
* <pre>
* Primary contents of payload. * Primary contents of payload.
* </pre>
* *
* <code>bytes body = 2;</code> * Generated from protobuf field <code>bytes body = 2;</code>
*/ */
private $body = ''; private $body = '';
@ -41,12 +35,11 @@ class Payload extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* DEPRECATED, don't use. To be removed shortly. * DEPRECATED, don't use. To be removed shortly.
* The type of data in body. * The type of data in body.
* </pre>
* *
* <code>.grpc.testing.PayloadType type = 1;</code> * Generated from protobuf field <code>.grpc.testing.PayloadType type = 1;</code>
* @return int
*/ */
public function getType() public function getType()
{ {
@ -54,25 +47,26 @@ class Payload extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* DEPRECATED, don't use. To be removed shortly. * DEPRECATED, don't use. To be removed shortly.
* The type of data in body. * The type of data in body.
* </pre>
* *
* <code>.grpc.testing.PayloadType type = 1;</code> * Generated from protobuf field <code>.grpc.testing.PayloadType type = 1;</code>
* @param int $var
* @return $this
*/ */
public function setType($var) public function setType($var)
{ {
GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
$this->type = $var; $this->type = $var;
return $this;
} }
/** /**
* <pre>
* Primary contents of payload. * Primary contents of payload.
* </pre>
* *
* <code>bytes body = 2;</code> * Generated from protobuf field <code>bytes body = 2;</code>
* @return string
*/ */
public function getBody() public function getBody()
{ {
@ -80,16 +74,18 @@ class Payload extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Primary contents of payload. * Primary contents of payload.
* </pre>
* *
* <code>bytes body = 2;</code> * Generated from protobuf field <code>bytes body = 2;</code>
* @param string $var
* @return $this
*/ */
public function setBody($var) public function setBody($var)
{ {
GPBUtil::checkString($var, False); GPBUtil::checkString($var, False);
$this->body = $var; $this->body = $var;
return $this;
} }
} }

@ -9,7 +9,7 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.PayloadConfig</code> * Generated from protobuf message <code>grpc.testing.PayloadConfig</code>
*/ */
class PayloadConfig extends \Google\Protobuf\Internal\Message class PayloadConfig extends \Google\Protobuf\Internal\Message
{ {
@ -21,7 +21,8 @@ class PayloadConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ByteBufferParams bytebuf_params = 1;</code> * Generated from protobuf field <code>.grpc.testing.ByteBufferParams bytebuf_params = 1;</code>
* @return \Grpc\Testing\ByteBufferParams
*/ */
public function getBytebufParams() public function getBytebufParams()
{ {
@ -29,16 +30,21 @@ class PayloadConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ByteBufferParams bytebuf_params = 1;</code> * Generated from protobuf field <code>.grpc.testing.ByteBufferParams bytebuf_params = 1;</code>
* @param \Grpc\Testing\ByteBufferParams $var
* @return $this
*/ */
public function setBytebufParams(&$var) public function setBytebufParams($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\ByteBufferParams::class); GPBUtil::checkMessage($var, \Grpc\Testing\ByteBufferParams::class);
$this->writeOneof(1, $var); $this->writeOneof(1, $var);
return $this;
} }
/** /**
* <code>.grpc.testing.SimpleProtoParams simple_params = 2;</code> * Generated from protobuf field <code>.grpc.testing.SimpleProtoParams simple_params = 2;</code>
* @return \Grpc\Testing\SimpleProtoParams
*/ */
public function getSimpleParams() public function getSimpleParams()
{ {
@ -46,16 +52,21 @@ class PayloadConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.SimpleProtoParams simple_params = 2;</code> * Generated from protobuf field <code>.grpc.testing.SimpleProtoParams simple_params = 2;</code>
* @param \Grpc\Testing\SimpleProtoParams $var
* @return $this
*/ */
public function setSimpleParams(&$var) public function setSimpleParams($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\SimpleProtoParams::class); GPBUtil::checkMessage($var, \Grpc\Testing\SimpleProtoParams::class);
$this->writeOneof(2, $var); $this->writeOneof(2, $var);
return $this;
} }
/** /**
* <code>.grpc.testing.ComplexProtoParams complex_params = 3;</code> * Generated from protobuf field <code>.grpc.testing.ComplexProtoParams complex_params = 3;</code>
* @return \Grpc\Testing\ComplexProtoParams
*/ */
public function getComplexParams() public function getComplexParams()
{ {
@ -63,14 +74,21 @@ class PayloadConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ComplexProtoParams complex_params = 3;</code> * Generated from protobuf field <code>.grpc.testing.ComplexProtoParams complex_params = 3;</code>
* @param \Grpc\Testing\ComplexProtoParams $var
* @return $this
*/ */
public function setComplexParams(&$var) public function setComplexParams($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\ComplexProtoParams::class); GPBUtil::checkMessage($var, \Grpc\Testing\ComplexProtoParams::class);
$this->writeOneof(3, $var); $this->writeOneof(3, $var);
return $this;
} }
/**
* @return string
*/
public function getPayload() public function getPayload()
{ {
return $this->whichOneof("payload"); return $this->whichOneof("payload");

@ -5,21 +5,17 @@
namespace Grpc\Testing; namespace Grpc\Testing;
/** /**
* <pre>
* DEPRECATED, don't use. To be removed shortly. * DEPRECATED, don't use. To be removed shortly.
* The type of payload that should be returned. * The type of payload that should be returned.
* </pre>
* *
* Protobuf enum <code>grpc.testing.PayloadType</code> * Protobuf enum <code>Grpc\Testing\PayloadType</code>
*/ */
class PayloadType class PayloadType
{ {
/** /**
* <pre>
* Compressable text format. * Compressable text format.
* </pre>
* *
* <code>COMPRESSABLE = 0;</code> * Generated from protobuf enum <code>COMPRESSABLE = 0;</code>
*/ */
const COMPRESSABLE = 0; const COMPRESSABLE = 0;
} }

@ -9,21 +9,17 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Parameters of poisson process distribution, which is a good representation * Parameters of poisson process distribution, which is a good representation
* of activity coming in from independent identical stationary sources. * of activity coming in from independent identical stationary sources.
* </pre>
* *
* Protobuf type <code>grpc.testing.PoissonParams</code> * Generated from protobuf message <code>grpc.testing.PoissonParams</code>
*/ */
class PoissonParams extends \Google\Protobuf\Internal\Message class PoissonParams extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* The rate of arrivals (a.k.a. lambda parameter of the exp distribution). * The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
* </pre>
* *
* <code>double offered_load = 1;</code> * Generated from protobuf field <code>double offered_load = 1;</code>
*/ */
private $offered_load = 0.0; private $offered_load = 0.0;
@ -33,11 +29,10 @@ class PoissonParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* The rate of arrivals (a.k.a. lambda parameter of the exp distribution). * The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
* </pre>
* *
* <code>double offered_load = 1;</code> * Generated from protobuf field <code>double offered_load = 1;</code>
* @return float
*/ */
public function getOfferedLoad() public function getOfferedLoad()
{ {
@ -45,16 +40,18 @@ class PoissonParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* The rate of arrivals (a.k.a. lambda parameter of the exp distribution). * The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
* </pre>
* *
* <code>double offered_load = 1;</code> * Generated from protobuf field <code>double offered_load = 1;</code>
* @param float $var
* @return $this
*/ */
public function setOfferedLoad($var) public function setOfferedLoad($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->offered_load = $var; $this->offered_load = $var;
return $this;
} }
} }

@ -16,14 +16,16 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// //
namespace Grpc\Testing { namespace Grpc\Testing;
class ProxyClientServiceClient extends \Grpc\BaseStub { /**
*/
class ProxyClientServiceClient extends \Grpc\BaseStub {
/** /**
* @param string $hostname hostname * @param string $hostname hostname
* @param array $opts channel options * @param array $opts channel options
* @param Grpc\Channel $channel (optional) re-use channel object * @param \Grpc\Channel $channel (optional) re-use channel object
*/ */
public function __construct($hostname, $opts, $channel = null) { public function __construct($hostname, $opts, $channel = null) {
parent::__construct($hostname, $opts, $channel); parent::__construct($hostname, $opts, $channel);
@ -52,6 +54,14 @@ namespace Grpc\Testing {
$metadata, $options); $metadata, $options);
} }
/**
* @param array $metadata metadata
* @param array $options call options
*/
public function ReportHist($metadata = [], $options = []) {
return $this->_clientStreamRequest('/grpc.testing.ProxyClientService/ReportHist',
['\Grpc\Testing\Void','decode'],
$metadata, $options);
} }
} }

@ -9,12 +9,12 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.ProxyStat</code> * Generated from protobuf message <code>grpc.testing.ProxyStat</code>
*/ */
class ProxyStat extends \Google\Protobuf\Internal\Message class ProxyStat extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>double latency = 1;</code> * Generated from protobuf field <code>double latency = 1;</code>
*/ */
private $latency = 0.0; private $latency = 0.0;
@ -24,7 +24,8 @@ class ProxyStat extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double latency = 1;</code> * Generated from protobuf field <code>double latency = 1;</code>
* @return float
*/ */
public function getLatency() public function getLatency()
{ {
@ -32,12 +33,16 @@ class ProxyStat extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double latency = 1;</code> * Generated from protobuf field <code>double latency = 1;</code>
* @param float $var
* @return $this
*/ */
public function setLatency($var) public function setLatency($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->latency = $var; $this->latency = $var;
return $this;
} }
} }

@ -9,22 +9,20 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* For reconnect interop test only. * For reconnect interop test only.
* Server tells client whether its reconnects are following the spec and the * Server tells client whether its reconnects are following the spec and the
* reconnect backoffs it saw. * reconnect backoffs it saw.
* </pre>
* *
* Protobuf type <code>grpc.testing.ReconnectInfo</code> * Generated from protobuf message <code>grpc.testing.ReconnectInfo</code>
*/ */
class ReconnectInfo extends \Google\Protobuf\Internal\Message class ReconnectInfo extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>bool passed = 1;</code> * Generated from protobuf field <code>bool passed = 1;</code>
*/ */
private $passed = false; private $passed = false;
/** /**
* <code>repeated int32 backoff_ms = 2;</code> * Generated from protobuf field <code>repeated int32 backoff_ms = 2;</code>
*/ */
private $backoff_ms; private $backoff_ms;
@ -34,7 +32,8 @@ class ReconnectInfo extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>bool passed = 1;</code> * Generated from protobuf field <code>bool passed = 1;</code>
* @return bool
*/ */
public function getPassed() public function getPassed()
{ {
@ -42,16 +41,21 @@ class ReconnectInfo extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>bool passed = 1;</code> * Generated from protobuf field <code>bool passed = 1;</code>
* @param bool $var
* @return $this
*/ */
public function setPassed($var) public function setPassed($var)
{ {
GPBUtil::checkBool($var); GPBUtil::checkBool($var);
$this->passed = $var; $this->passed = $var;
return $this;
} }
/** /**
* <code>repeated int32 backoff_ms = 2;</code> * Generated from protobuf field <code>repeated int32 backoff_ms = 2;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getBackoffMs() public function getBackoffMs()
{ {
@ -59,12 +63,16 @@ class ReconnectInfo extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>repeated int32 backoff_ms = 2;</code> * Generated from protobuf field <code>repeated int32 backoff_ms = 2;</code>
* @param int[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setBackoffMs(&$var) public function setBackoffMs($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
$this->backoff_ms = $var; $this->backoff_ms = $arr;
return $this;
} }
} }

@ -9,17 +9,15 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* For reconnect interop test only. * For reconnect interop test only.
* Client tells server what reconnection parameters it used. * Client tells server what reconnection parameters it used.
* </pre>
* *
* Protobuf type <code>grpc.testing.ReconnectParams</code> * Generated from protobuf message <code>grpc.testing.ReconnectParams</code>
*/ */
class ReconnectParams extends \Google\Protobuf\Internal\Message class ReconnectParams extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>int32 max_reconnect_backoff_ms = 1;</code> * Generated from protobuf field <code>int32 max_reconnect_backoff_ms = 1;</code>
*/ */
private $max_reconnect_backoff_ms = 0; private $max_reconnect_backoff_ms = 0;
@ -29,7 +27,8 @@ class ReconnectParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 max_reconnect_backoff_ms = 1;</code> * Generated from protobuf field <code>int32 max_reconnect_backoff_ms = 1;</code>
* @return int
*/ */
public function getMaxReconnectBackoffMs() public function getMaxReconnectBackoffMs()
{ {
@ -37,12 +36,16 @@ class ReconnectParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 max_reconnect_backoff_ms = 1;</code> * Generated from protobuf field <code>int32 max_reconnect_backoff_ms = 1;</code>
* @param int $var
* @return $this
*/ */
public function setMaxReconnectBackoffMs($var) public function setMaxReconnectBackoffMs($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->max_reconnect_backoff_ms = $var; $this->max_reconnect_backoff_ms = $var;
return $this;
} }
} }

@ -0,0 +1,50 @@
<?php
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
// Copyright 2015 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// An integration test service that covers all the method signature permutations
// of unary/streaming requests/responses.
namespace Grpc\Testing;
/**
*/
class ReportQpsScenarioServiceClient extends \Grpc\BaseStub {
/**
* @param string $hostname hostname
* @param array $opts channel options
* @param \Grpc\Channel $channel (optional) re-use channel object
*/
public function __construct($hostname, $opts, $channel = null) {
parent::__construct($hostname, $opts, $channel);
}
/**
* Report results of a QPS test benchmark scenario.
* @param \Grpc\Testing\ScenarioResult $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function ReportScenario(\Grpc\Testing\ScenarioResult $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/grpc.testing.ReportQpsScenarioService/ReportScenario',
$argument,
['\Grpc\Testing\Void', 'decode'],
$metadata, $options);
}
}

@ -9,16 +9,16 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.RequestResultCount</code> * Generated from protobuf message <code>grpc.testing.RequestResultCount</code>
*/ */
class RequestResultCount extends \Google\Protobuf\Internal\Message class RequestResultCount extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>int32 status_code = 1;</code> * Generated from protobuf field <code>int32 status_code = 1;</code>
*/ */
private $status_code = 0; private $status_code = 0;
/** /**
* <code>int64 count = 2;</code> * Generated from protobuf field <code>int64 count = 2;</code>
*/ */
private $count = 0; private $count = 0;
@ -28,7 +28,8 @@ class RequestResultCount extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 status_code = 1;</code> * Generated from protobuf field <code>int32 status_code = 1;</code>
* @return int
*/ */
public function getStatusCode() public function getStatusCode()
{ {
@ -36,16 +37,21 @@ class RequestResultCount extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 status_code = 1;</code> * Generated from protobuf field <code>int32 status_code = 1;</code>
* @param int $var
* @return $this
*/ */
public function setStatusCode($var) public function setStatusCode($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->status_code = $var; $this->status_code = $var;
return $this;
} }
/** /**
* <code>int64 count = 2;</code> * Generated from protobuf field <code>int64 count = 2;</code>
* @return int|string
*/ */
public function getCount() public function getCount()
{ {
@ -53,12 +59,16 @@ class RequestResultCount extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int64 count = 2;</code> * Generated from protobuf field <code>int64 count = 2;</code>
* @param int|string $var
* @return $this
*/ */
public function setCount($var) public function setCount($var)
{ {
GPBUtil::checkInt64($var); GPBUtil::checkInt64($var);
$this->count = $var; $this->count = $var;
return $this;
} }
} }

@ -9,40 +9,32 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Configuration for a particular response. * Configuration for a particular response.
* </pre>
* *
* Protobuf type <code>grpc.testing.ResponseParameters</code> * Generated from protobuf message <code>grpc.testing.ResponseParameters</code>
*/ */
class ResponseParameters extends \Google\Protobuf\Internal\Message class ResponseParameters extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* Desired payload sizes in responses from the server. * Desired payload sizes in responses from the server.
* </pre>
* *
* <code>int32 size = 1;</code> * Generated from protobuf field <code>int32 size = 1;</code>
*/ */
private $size = 0; private $size = 0;
/** /**
* <pre>
* Desired interval between consecutive responses in the response stream in * Desired interval between consecutive responses in the response stream in
* microseconds. * microseconds.
* </pre>
* *
* <code>int32 interval_us = 2;</code> * Generated from protobuf field <code>int32 interval_us = 2;</code>
*/ */
private $interval_us = 0; private $interval_us = 0;
/** /**
* <pre>
* Whether to request the server to compress the response. This field is * Whether to request the server to compress the response. This field is
* "nullable" in order to interoperate seamlessly with clients not able to * "nullable" in order to interoperate seamlessly with clients not able to
* implement the full compression tests by introspecting the call to verify * implement the full compression tests by introspecting the call to verify
* the response's compression status. * the response's compression status.
* </pre>
* *
* <code>.grpc.testing.BoolValue compressed = 3;</code> * Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code>
*/ */
private $compressed = null; private $compressed = null;
@ -52,11 +44,10 @@ class ResponseParameters extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Desired payload sizes in responses from the server. * Desired payload sizes in responses from the server.
* </pre>
* *
* <code>int32 size = 1;</code> * Generated from protobuf field <code>int32 size = 1;</code>
* @return int
*/ */
public function getSize() public function getSize()
{ {
@ -64,25 +55,26 @@ class ResponseParameters extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Desired payload sizes in responses from the server. * Desired payload sizes in responses from the server.
* </pre>
* *
* <code>int32 size = 1;</code> * Generated from protobuf field <code>int32 size = 1;</code>
* @param int $var
* @return $this
*/ */
public function setSize($var) public function setSize($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->size = $var; $this->size = $var;
return $this;
} }
/** /**
* <pre>
* Desired interval between consecutive responses in the response stream in * Desired interval between consecutive responses in the response stream in
* microseconds. * microseconds.
* </pre>
* *
* <code>int32 interval_us = 2;</code> * Generated from protobuf field <code>int32 interval_us = 2;</code>
* @return int
*/ */
public function getIntervalUs() public function getIntervalUs()
{ {
@ -90,28 +82,29 @@ class ResponseParameters extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Desired interval between consecutive responses in the response stream in * Desired interval between consecutive responses in the response stream in
* microseconds. * microseconds.
* </pre>
* *
* <code>int32 interval_us = 2;</code> * Generated from protobuf field <code>int32 interval_us = 2;</code>
* @param int $var
* @return $this
*/ */
public function setIntervalUs($var) public function setIntervalUs($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->interval_us = $var; $this->interval_us = $var;
return $this;
} }
/** /**
* <pre>
* Whether to request the server to compress the response. This field is * Whether to request the server to compress the response. This field is
* "nullable" in order to interoperate seamlessly with clients not able to * "nullable" in order to interoperate seamlessly with clients not able to
* implement the full compression tests by introspecting the call to verify * implement the full compression tests by introspecting the call to verify
* the response's compression status. * the response's compression status.
* </pre>
* *
* <code>.grpc.testing.BoolValue compressed = 3;</code> * Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code>
* @return \Grpc\Testing\BoolValue
*/ */
public function getCompressed() public function getCompressed()
{ {
@ -119,19 +112,21 @@ class ResponseParameters extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Whether to request the server to compress the response. This field is * Whether to request the server to compress the response. This field is
* "nullable" in order to interoperate seamlessly with clients not able to * "nullable" in order to interoperate seamlessly with clients not able to
* implement the full compression tests by introspecting the call to verify * implement the full compression tests by introspecting the call to verify
* the response's compression status. * the response's compression status.
* </pre>
* *
* <code>.grpc.testing.BoolValue compressed = 3;</code> * Generated from protobuf field <code>.grpc.testing.BoolValue compressed = 3;</code>
* @param \Grpc\Testing\BoolValue $var
* @return $this
*/ */
public function setCompressed(&$var) public function setCompressed($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
$this->compressed = $var; $this->compressed = $var;
return $this;
} }
} }

@ -5,17 +5,29 @@
namespace Grpc\Testing; namespace Grpc\Testing;
/** /**
* Protobuf enum <code>grpc.testing.RpcType</code> * Protobuf enum <code>Grpc\Testing\RpcType</code>
*/ */
class RpcType class RpcType
{ {
/** /**
* <code>UNARY = 0;</code> * Generated from protobuf enum <code>UNARY = 0;</code>
*/ */
const UNARY = 0; const UNARY = 0;
/** /**
* <code>STREAMING = 1;</code> * Generated from protobuf enum <code>STREAMING = 1;</code>
*/ */
const STREAMING = 1; const STREAMING = 1;
/**
* Generated from protobuf enum <code>STREAMING_FROM_CLIENT = 2;</code>
*/
const STREAMING_FROM_CLIENT = 2;
/**
* Generated from protobuf enum <code>STREAMING_FROM_SERVER = 3;</code>
*/
const STREAMING_FROM_SERVER = 3;
/**
* Generated from protobuf enum <code>STREAMING_BOTH_WAYS = 4;</code>
*/
const STREAMING_BOTH_WAYS = 4;
} }

@ -9,76 +9,58 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* A single performance scenario: input to qps_json_driver * A single performance scenario: input to qps_json_driver
* </pre>
* *
* Protobuf type <code>grpc.testing.Scenario</code> * Generated from protobuf message <code>grpc.testing.Scenario</code>
*/ */
class Scenario extends \Google\Protobuf\Internal\Message class Scenario extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* Human readable name for this scenario * Human readable name for this scenario
* </pre>
* *
* <code>string name = 1;</code> * Generated from protobuf field <code>string name = 1;</code>
*/ */
private $name = ''; private $name = '';
/** /**
* <pre>
* Client configuration * Client configuration
* </pre>
* *
* <code>.grpc.testing.ClientConfig client_config = 2;</code> * Generated from protobuf field <code>.grpc.testing.ClientConfig client_config = 2;</code>
*/ */
private $client_config = null; private $client_config = null;
/** /**
* <pre>
* Number of clients to start for the test * Number of clients to start for the test
* </pre>
* *
* <code>int32 num_clients = 3;</code> * Generated from protobuf field <code>int32 num_clients = 3;</code>
*/ */
private $num_clients = 0; private $num_clients = 0;
/** /**
* <pre>
* Server configuration * Server configuration
* </pre>
* *
* <code>.grpc.testing.ServerConfig server_config = 4;</code> * Generated from protobuf field <code>.grpc.testing.ServerConfig server_config = 4;</code>
*/ */
private $server_config = null; private $server_config = null;
/** /**
* <pre>
* Number of servers to start for the test * Number of servers to start for the test
* </pre>
* *
* <code>int32 num_servers = 5;</code> * Generated from protobuf field <code>int32 num_servers = 5;</code>
*/ */
private $num_servers = 0; private $num_servers = 0;
/** /**
* <pre>
* Warmup period, in seconds * Warmup period, in seconds
* </pre>
* *
* <code>int32 warmup_seconds = 6;</code> * Generated from protobuf field <code>int32 warmup_seconds = 6;</code>
*/ */
private $warmup_seconds = 0; private $warmup_seconds = 0;
/** /**
* <pre>
* Benchmark time, in seconds * Benchmark time, in seconds
* </pre>
* *
* <code>int32 benchmark_seconds = 7;</code> * Generated from protobuf field <code>int32 benchmark_seconds = 7;</code>
*/ */
private $benchmark_seconds = 0; private $benchmark_seconds = 0;
/** /**
* <pre>
* Number of workers to spawn locally (usually zero) * Number of workers to spawn locally (usually zero)
* </pre>
* *
* <code>int32 spawn_local_worker_count = 8;</code> * Generated from protobuf field <code>int32 spawn_local_worker_count = 8;</code>
*/ */
private $spawn_local_worker_count = 0; private $spawn_local_worker_count = 0;
@ -88,11 +70,10 @@ class Scenario extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Human readable name for this scenario * Human readable name for this scenario
* </pre>
* *
* <code>string name = 1;</code> * Generated from protobuf field <code>string name = 1;</code>
* @return string
*/ */
public function getName() public function getName()
{ {
@ -100,24 +81,25 @@ class Scenario extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Human readable name for this scenario * Human readable name for this scenario
* </pre>
* *
* <code>string name = 1;</code> * Generated from protobuf field <code>string name = 1;</code>
* @param string $var
* @return $this
*/ */
public function setName($var) public function setName($var)
{ {
GPBUtil::checkString($var, True); GPBUtil::checkString($var, True);
$this->name = $var; $this->name = $var;
return $this;
} }
/** /**
* <pre>
* Client configuration * Client configuration
* </pre>
* *
* <code>.grpc.testing.ClientConfig client_config = 2;</code> * Generated from protobuf field <code>.grpc.testing.ClientConfig client_config = 2;</code>
* @return \Grpc\Testing\ClientConfig
*/ */
public function getClientConfig() public function getClientConfig()
{ {
@ -125,24 +107,25 @@ class Scenario extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Client configuration * Client configuration
* </pre>
* *
* <code>.grpc.testing.ClientConfig client_config = 2;</code> * Generated from protobuf field <code>.grpc.testing.ClientConfig client_config = 2;</code>
* @param \Grpc\Testing\ClientConfig $var
* @return $this
*/ */
public function setClientConfig(&$var) public function setClientConfig($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\ClientConfig::class); GPBUtil::checkMessage($var, \Grpc\Testing\ClientConfig::class);
$this->client_config = $var; $this->client_config = $var;
return $this;
} }
/** /**
* <pre>
* Number of clients to start for the test * Number of clients to start for the test
* </pre>
* *
* <code>int32 num_clients = 3;</code> * Generated from protobuf field <code>int32 num_clients = 3;</code>
* @return int
*/ */
public function getNumClients() public function getNumClients()
{ {
@ -150,24 +133,25 @@ class Scenario extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Number of clients to start for the test * Number of clients to start for the test
* </pre>
* *
* <code>int32 num_clients = 3;</code> * Generated from protobuf field <code>int32 num_clients = 3;</code>
* @param int $var
* @return $this
*/ */
public function setNumClients($var) public function setNumClients($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->num_clients = $var; $this->num_clients = $var;
return $this;
} }
/** /**
* <pre>
* Server configuration * Server configuration
* </pre>
* *
* <code>.grpc.testing.ServerConfig server_config = 4;</code> * Generated from protobuf field <code>.grpc.testing.ServerConfig server_config = 4;</code>
* @return \Grpc\Testing\ServerConfig
*/ */
public function getServerConfig() public function getServerConfig()
{ {
@ -175,24 +159,25 @@ class Scenario extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Server configuration * Server configuration
* </pre>
* *
* <code>.grpc.testing.ServerConfig server_config = 4;</code> * Generated from protobuf field <code>.grpc.testing.ServerConfig server_config = 4;</code>
* @param \Grpc\Testing\ServerConfig $var
* @return $this
*/ */
public function setServerConfig(&$var) public function setServerConfig($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\ServerConfig::class); GPBUtil::checkMessage($var, \Grpc\Testing\ServerConfig::class);
$this->server_config = $var; $this->server_config = $var;
return $this;
} }
/** /**
* <pre>
* Number of servers to start for the test * Number of servers to start for the test
* </pre>
* *
* <code>int32 num_servers = 5;</code> * Generated from protobuf field <code>int32 num_servers = 5;</code>
* @return int
*/ */
public function getNumServers() public function getNumServers()
{ {
@ -200,24 +185,25 @@ class Scenario extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Number of servers to start for the test * Number of servers to start for the test
* </pre>
* *
* <code>int32 num_servers = 5;</code> * Generated from protobuf field <code>int32 num_servers = 5;</code>
* @param int $var
* @return $this
*/ */
public function setNumServers($var) public function setNumServers($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->num_servers = $var; $this->num_servers = $var;
return $this;
} }
/** /**
* <pre>
* Warmup period, in seconds * Warmup period, in seconds
* </pre>
* *
* <code>int32 warmup_seconds = 6;</code> * Generated from protobuf field <code>int32 warmup_seconds = 6;</code>
* @return int
*/ */
public function getWarmupSeconds() public function getWarmupSeconds()
{ {
@ -225,24 +211,25 @@ class Scenario extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Warmup period, in seconds * Warmup period, in seconds
* </pre>
* *
* <code>int32 warmup_seconds = 6;</code> * Generated from protobuf field <code>int32 warmup_seconds = 6;</code>
* @param int $var
* @return $this
*/ */
public function setWarmupSeconds($var) public function setWarmupSeconds($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->warmup_seconds = $var; $this->warmup_seconds = $var;
return $this;
} }
/** /**
* <pre>
* Benchmark time, in seconds * Benchmark time, in seconds
* </pre>
* *
* <code>int32 benchmark_seconds = 7;</code> * Generated from protobuf field <code>int32 benchmark_seconds = 7;</code>
* @return int
*/ */
public function getBenchmarkSeconds() public function getBenchmarkSeconds()
{ {
@ -250,24 +237,25 @@ class Scenario extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Benchmark time, in seconds * Benchmark time, in seconds
* </pre>
* *
* <code>int32 benchmark_seconds = 7;</code> * Generated from protobuf field <code>int32 benchmark_seconds = 7;</code>
* @param int $var
* @return $this
*/ */
public function setBenchmarkSeconds($var) public function setBenchmarkSeconds($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->benchmark_seconds = $var; $this->benchmark_seconds = $var;
return $this;
} }
/** /**
* <pre>
* Number of workers to spawn locally (usually zero) * Number of workers to spawn locally (usually zero)
* </pre>
* *
* <code>int32 spawn_local_worker_count = 8;</code> * Generated from protobuf field <code>int32 spawn_local_worker_count = 8;</code>
* @return int
*/ */
public function getSpawnLocalWorkerCount() public function getSpawnLocalWorkerCount()
{ {
@ -275,16 +263,18 @@ class Scenario extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Number of workers to spawn locally (usually zero) * Number of workers to spawn locally (usually zero)
* </pre>
* *
* <code>int32 spawn_local_worker_count = 8;</code> * Generated from protobuf field <code>int32 spawn_local_worker_count = 8;</code>
* @param int $var
* @return $this
*/ */
public function setSpawnLocalWorkerCount($var) public function setSpawnLocalWorkerCount($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->spawn_local_worker_count = $var; $this->spawn_local_worker_count = $var;
return $this;
} }
} }

@ -9,80 +9,62 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Results of a single benchmark scenario. * Results of a single benchmark scenario.
* </pre>
* *
* Protobuf type <code>grpc.testing.ScenarioResult</code> * Generated from protobuf message <code>grpc.testing.ScenarioResult</code>
*/ */
class ScenarioResult extends \Google\Protobuf\Internal\Message class ScenarioResult extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* Inputs used to run the scenario. * Inputs used to run the scenario.
* </pre>
* *
* <code>.grpc.testing.Scenario scenario = 1;</code> * Generated from protobuf field <code>.grpc.testing.Scenario scenario = 1;</code>
*/ */
private $scenario = null; private $scenario = null;
/** /**
* <pre>
* Histograms from all clients merged into one histogram. * Histograms from all clients merged into one histogram.
* </pre>
* *
* <code>.grpc.testing.HistogramData latencies = 2;</code> * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 2;</code>
*/ */
private $latencies = null; private $latencies = null;
/** /**
* <pre>
* Client stats for each client * Client stats for each client
* </pre>
* *
* <code>repeated .grpc.testing.ClientStats client_stats = 3;</code> * Generated from protobuf field <code>repeated .grpc.testing.ClientStats client_stats = 3;</code>
*/ */
private $client_stats; private $client_stats;
/** /**
* <pre>
* Server stats for each server * Server stats for each server
* </pre>
* *
* <code>repeated .grpc.testing.ServerStats server_stats = 4;</code> * Generated from protobuf field <code>repeated .grpc.testing.ServerStats server_stats = 4;</code>
*/ */
private $server_stats; private $server_stats;
/** /**
* <pre>
* Number of cores available to each server * Number of cores available to each server
* </pre>
* *
* <code>repeated int32 server_cores = 5;</code> * Generated from protobuf field <code>repeated int32 server_cores = 5;</code>
*/ */
private $server_cores; private $server_cores;
/** /**
* <pre>
* An after-the-fact computed summary * An after-the-fact computed summary
* </pre>
* *
* <code>.grpc.testing.ScenarioResultSummary summary = 6;</code> * Generated from protobuf field <code>.grpc.testing.ScenarioResultSummary summary = 6;</code>
*/ */
private $summary = null; private $summary = null;
/** /**
* <pre>
* Information on success or failure of each worker * Information on success or failure of each worker
* </pre>
* *
* <code>repeated bool client_success = 7;</code> * Generated from protobuf field <code>repeated bool client_success = 7;</code>
*/ */
private $client_success; private $client_success;
/** /**
* <code>repeated bool server_success = 8;</code> * Generated from protobuf field <code>repeated bool server_success = 8;</code>
*/ */
private $server_success; private $server_success;
/** /**
* <pre>
* Number of failed requests (one row per status code seen) * Number of failed requests (one row per status code seen)
* </pre>
* *
* <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code> * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code>
*/ */
private $request_results; private $request_results;
@ -92,11 +74,10 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Inputs used to run the scenario. * Inputs used to run the scenario.
* </pre>
* *
* <code>.grpc.testing.Scenario scenario = 1;</code> * Generated from protobuf field <code>.grpc.testing.Scenario scenario = 1;</code>
* @return \Grpc\Testing\Scenario
*/ */
public function getScenario() public function getScenario()
{ {
@ -104,24 +85,25 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Inputs used to run the scenario. * Inputs used to run the scenario.
* </pre>
* *
* <code>.grpc.testing.Scenario scenario = 1;</code> * Generated from protobuf field <code>.grpc.testing.Scenario scenario = 1;</code>
* @param \Grpc\Testing\Scenario $var
* @return $this
*/ */
public function setScenario(&$var) public function setScenario($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\Scenario::class); GPBUtil::checkMessage($var, \Grpc\Testing\Scenario::class);
$this->scenario = $var; $this->scenario = $var;
return $this;
} }
/** /**
* <pre>
* Histograms from all clients merged into one histogram. * Histograms from all clients merged into one histogram.
* </pre>
* *
* <code>.grpc.testing.HistogramData latencies = 2;</code> * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 2;</code>
* @return \Grpc\Testing\HistogramData
*/ */
public function getLatencies() public function getLatencies()
{ {
@ -129,24 +111,25 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Histograms from all clients merged into one histogram. * Histograms from all clients merged into one histogram.
* </pre>
* *
* <code>.grpc.testing.HistogramData latencies = 2;</code> * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 2;</code>
* @param \Grpc\Testing\HistogramData $var
* @return $this
*/ */
public function setLatencies(&$var) public function setLatencies($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class); GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class);
$this->latencies = $var; $this->latencies = $var;
return $this;
} }
/** /**
* <pre>
* Client stats for each client * Client stats for each client
* </pre>
* *
* <code>repeated .grpc.testing.ClientStats client_stats = 3;</code> * Generated from protobuf field <code>repeated .grpc.testing.ClientStats client_stats = 3;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getClientStats() public function getClientStats()
{ {
@ -154,24 +137,25 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Client stats for each client * Client stats for each client
* </pre>
* *
* <code>repeated .grpc.testing.ClientStats client_stats = 3;</code> * Generated from protobuf field <code>repeated .grpc.testing.ClientStats client_stats = 3;</code>
* @param \Grpc\Testing\ClientStats[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setClientStats(&$var) public function setClientStats($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ClientStats::class); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ClientStats::class);
$this->client_stats = $var; $this->client_stats = $arr;
return $this;
} }
/** /**
* <pre>
* Server stats for each server * Server stats for each server
* </pre>
* *
* <code>repeated .grpc.testing.ServerStats server_stats = 4;</code> * Generated from protobuf field <code>repeated .grpc.testing.ServerStats server_stats = 4;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getServerStats() public function getServerStats()
{ {
@ -179,24 +163,25 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Server stats for each server * Server stats for each server
* </pre>
* *
* <code>repeated .grpc.testing.ServerStats server_stats = 4;</code> * Generated from protobuf field <code>repeated .grpc.testing.ServerStats server_stats = 4;</code>
* @param \Grpc\Testing\ServerStats[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setServerStats(&$var) public function setServerStats($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ServerStats::class); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ServerStats::class);
$this->server_stats = $var; $this->server_stats = $arr;
return $this;
} }
/** /**
* <pre>
* Number of cores available to each server * Number of cores available to each server
* </pre>
* *
* <code>repeated int32 server_cores = 5;</code> * Generated from protobuf field <code>repeated int32 server_cores = 5;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getServerCores() public function getServerCores()
{ {
@ -204,24 +189,25 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Number of cores available to each server * Number of cores available to each server
* </pre>
* *
* <code>repeated int32 server_cores = 5;</code> * Generated from protobuf field <code>repeated int32 server_cores = 5;</code>
* @param int[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setServerCores(&$var) public function setServerCores($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
$this->server_cores = $var; $this->server_cores = $arr;
return $this;
} }
/** /**
* <pre>
* An after-the-fact computed summary * An after-the-fact computed summary
* </pre>
* *
* <code>.grpc.testing.ScenarioResultSummary summary = 6;</code> * Generated from protobuf field <code>.grpc.testing.ScenarioResultSummary summary = 6;</code>
* @return \Grpc\Testing\ScenarioResultSummary
*/ */
public function getSummary() public function getSummary()
{ {
@ -229,24 +215,25 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* An after-the-fact computed summary * An after-the-fact computed summary
* </pre>
* *
* <code>.grpc.testing.ScenarioResultSummary summary = 6;</code> * Generated from protobuf field <code>.grpc.testing.ScenarioResultSummary summary = 6;</code>
* @param \Grpc\Testing\ScenarioResultSummary $var
* @return $this
*/ */
public function setSummary(&$var) public function setSummary($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\ScenarioResultSummary::class); GPBUtil::checkMessage($var, \Grpc\Testing\ScenarioResultSummary::class);
$this->summary = $var; $this->summary = $var;
return $this;
} }
/** /**
* <pre>
* Information on success or failure of each worker * Information on success or failure of each worker
* </pre>
* *
* <code>repeated bool client_success = 7;</code> * Generated from protobuf field <code>repeated bool client_success = 7;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getClientSuccess() public function getClientSuccess()
{ {
@ -254,20 +241,23 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Information on success or failure of each worker * Information on success or failure of each worker
* </pre>
* *
* <code>repeated bool client_success = 7;</code> * Generated from protobuf field <code>repeated bool client_success = 7;</code>
* @param bool[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setClientSuccess(&$var) public function setClientSuccess($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL);
$this->client_success = $var; $this->client_success = $arr;
return $this;
} }
/** /**
* <code>repeated bool server_success = 8;</code> * Generated from protobuf field <code>repeated bool server_success = 8;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getServerSuccess() public function getServerSuccess()
{ {
@ -275,20 +265,23 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>repeated bool server_success = 8;</code> * Generated from protobuf field <code>repeated bool server_success = 8;</code>
* @param bool[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setServerSuccess(&$var) public function setServerSuccess($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL);
$this->server_success = $var; $this->server_success = $arr;
return $this;
} }
/** /**
* <pre>
* Number of failed requests (one row per status code seen) * Number of failed requests (one row per status code seen)
* </pre>
* *
* <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code> * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getRequestResults() public function getRequestResults()
{ {
@ -296,16 +289,18 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Number of failed requests (one row per status code seen) * Number of failed requests (one row per status code seen)
* </pre>
* *
* <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code> * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code>
* @param \Grpc\Testing\RequestResultCount[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setRequestResults(&$var) public function setRequestResults($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class);
$this->request_results = $var; $this->request_results = $arr;
return $this;
} }
} }

@ -9,107 +9,107 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Basic summary that can be computed from ClientStats and ServerStats * Basic summary that can be computed from ClientStats and ServerStats
* once the scenario has finished. * once the scenario has finished.
* </pre>
* *
* Protobuf type <code>grpc.testing.ScenarioResultSummary</code> * Generated from protobuf message <code>grpc.testing.ScenarioResultSummary</code>
*/ */
class ScenarioResultSummary extends \Google\Protobuf\Internal\Message class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* Total number of operations per second over all clients. * Total number of operations per second over all clients.
* </pre>
* *
* <code>double qps = 1;</code> * Generated from protobuf field <code>double qps = 1;</code>
*/ */
private $qps = 0.0; private $qps = 0.0;
/** /**
* <pre>
* QPS per one server core. * QPS per one server core.
* </pre>
* *
* <code>double qps_per_server_core = 2;</code> * Generated from protobuf field <code>double qps_per_server_core = 2;</code>
*/ */
private $qps_per_server_core = 0.0; private $qps_per_server_core = 0.0;
/** /**
* <pre> * server load based on system_time (0.85 => 85%)
* server load based on system_time (0.85 =&gt; 85%)
* </pre>
* *
* <code>double server_system_time = 3;</code> * Generated from protobuf field <code>double server_system_time = 3;</code>
*/ */
private $server_system_time = 0.0; private $server_system_time = 0.0;
/** /**
* <pre> * server load based on user_time (0.85 => 85%)
* server load based on user_time (0.85 =&gt; 85%)
* </pre>
* *
* <code>double server_user_time = 4;</code> * Generated from protobuf field <code>double server_user_time = 4;</code>
*/ */
private $server_user_time = 0.0; private $server_user_time = 0.0;
/** /**
* <pre> * client load based on system_time (0.85 => 85%)
* client load based on system_time (0.85 =&gt; 85%)
* </pre>
* *
* <code>double client_system_time = 5;</code> * Generated from protobuf field <code>double client_system_time = 5;</code>
*/ */
private $client_system_time = 0.0; private $client_system_time = 0.0;
/** /**
* <pre> * client load based on user_time (0.85 => 85%)
* client load based on user_time (0.85 =&gt; 85%)
* </pre>
* *
* <code>double client_user_time = 6;</code> * Generated from protobuf field <code>double client_user_time = 6;</code>
*/ */
private $client_user_time = 0.0; private $client_user_time = 0.0;
/** /**
* <pre>
* X% latency percentiles (in nanoseconds) * X% latency percentiles (in nanoseconds)
* </pre>
* *
* <code>double latency_50 = 7;</code> * Generated from protobuf field <code>double latency_50 = 7;</code>
*/ */
private $latency_50 = 0.0; private $latency_50 = 0.0;
/** /**
* <code>double latency_90 = 8;</code> * Generated from protobuf field <code>double latency_90 = 8;</code>
*/ */
private $latency_90 = 0.0; private $latency_90 = 0.0;
/** /**
* <code>double latency_95 = 9;</code> * Generated from protobuf field <code>double latency_95 = 9;</code>
*/ */
private $latency_95 = 0.0; private $latency_95 = 0.0;
/** /**
* <code>double latency_99 = 10;</code> * Generated from protobuf field <code>double latency_99 = 10;</code>
*/ */
private $latency_99 = 0.0; private $latency_99 = 0.0;
/** /**
* <code>double latency_999 = 11;</code> * Generated from protobuf field <code>double latency_999 = 11;</code>
*/ */
private $latency_999 = 0.0; private $latency_999 = 0.0;
/** /**
* <pre>
* server cpu usage percentage * server cpu usage percentage
* </pre>
* *
* <code>double server_cpu_usage = 12;</code> * Generated from protobuf field <code>double server_cpu_usage = 12;</code>
*/ */
private $server_cpu_usage = 0.0; private $server_cpu_usage = 0.0;
/** /**
* <pre>
* Number of requests that succeeded/failed * Number of requests that succeeded/failed
* </pre>
* *
* <code>double successful_requests_per_second = 13;</code> * Generated from protobuf field <code>double successful_requests_per_second = 13;</code>
*/ */
private $successful_requests_per_second = 0.0; private $successful_requests_per_second = 0.0;
/** /**
* <code>double failed_requests_per_second = 14;</code> * Generated from protobuf field <code>double failed_requests_per_second = 14;</code>
*/ */
private $failed_requests_per_second = 0.0; private $failed_requests_per_second = 0.0;
/**
* Number of polls called inside completion queue per request
*
* Generated from protobuf field <code>double client_polls_per_request = 15;</code>
*/
private $client_polls_per_request = 0.0;
/**
* Generated from protobuf field <code>double server_polls_per_request = 16;</code>
*/
private $server_polls_per_request = 0.0;
/**
* Queries per CPU-sec over all servers or clients
*
* Generated from protobuf field <code>double server_queries_per_cpu_sec = 17;</code>
*/
private $server_queries_per_cpu_sec = 0.0;
/**
* Generated from protobuf field <code>double client_queries_per_cpu_sec = 18;</code>
*/
private $client_queries_per_cpu_sec = 0.0;
public function __construct() { public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
@ -117,11 +117,10 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Total number of operations per second over all clients. * Total number of operations per second over all clients.
* </pre>
* *
* <code>double qps = 1;</code> * Generated from protobuf field <code>double qps = 1;</code>
* @return float
*/ */
public function getQps() public function getQps()
{ {
@ -129,24 +128,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Total number of operations per second over all clients. * Total number of operations per second over all clients.
* </pre>
* *
* <code>double qps = 1;</code> * Generated from protobuf field <code>double qps = 1;</code>
* @param float $var
* @return $this
*/ */
public function setQps($var) public function setQps($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->qps = $var; $this->qps = $var;
return $this;
} }
/** /**
* <pre>
* QPS per one server core. * QPS per one server core.
* </pre>
* *
* <code>double qps_per_server_core = 2;</code> * Generated from protobuf field <code>double qps_per_server_core = 2;</code>
* @return float
*/ */
public function getQpsPerServerCore() public function getQpsPerServerCore()
{ {
@ -154,24 +154,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* QPS per one server core. * QPS per one server core.
* </pre>
* *
* <code>double qps_per_server_core = 2;</code> * Generated from protobuf field <code>double qps_per_server_core = 2;</code>
* @param float $var
* @return $this
*/ */
public function setQpsPerServerCore($var) public function setQpsPerServerCore($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->qps_per_server_core = $var; $this->qps_per_server_core = $var;
return $this;
} }
/** /**
* <pre> * server load based on system_time (0.85 => 85%)
* server load based on system_time (0.85 =&gt; 85%)
* </pre>
* *
* <code>double server_system_time = 3;</code> * Generated from protobuf field <code>double server_system_time = 3;</code>
* @return float
*/ */
public function getServerSystemTime() public function getServerSystemTime()
{ {
@ -179,24 +180,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre> * server load based on system_time (0.85 => 85%)
* server load based on system_time (0.85 =&gt; 85%)
* </pre>
* *
* <code>double server_system_time = 3;</code> * Generated from protobuf field <code>double server_system_time = 3;</code>
* @param float $var
* @return $this
*/ */
public function setServerSystemTime($var) public function setServerSystemTime($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->server_system_time = $var; $this->server_system_time = $var;
return $this;
} }
/** /**
* <pre> * server load based on user_time (0.85 => 85%)
* server load based on user_time (0.85 =&gt; 85%)
* </pre>
* *
* <code>double server_user_time = 4;</code> * Generated from protobuf field <code>double server_user_time = 4;</code>
* @return float
*/ */
public function getServerUserTime() public function getServerUserTime()
{ {
@ -204,24 +206,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre> * server load based on user_time (0.85 => 85%)
* server load based on user_time (0.85 =&gt; 85%)
* </pre>
* *
* <code>double server_user_time = 4;</code> * Generated from protobuf field <code>double server_user_time = 4;</code>
* @param float $var
* @return $this
*/ */
public function setServerUserTime($var) public function setServerUserTime($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->server_user_time = $var; $this->server_user_time = $var;
return $this;
} }
/** /**
* <pre> * client load based on system_time (0.85 => 85%)
* client load based on system_time (0.85 =&gt; 85%)
* </pre>
* *
* <code>double client_system_time = 5;</code> * Generated from protobuf field <code>double client_system_time = 5;</code>
* @return float
*/ */
public function getClientSystemTime() public function getClientSystemTime()
{ {
@ -229,24 +232,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre> * client load based on system_time (0.85 => 85%)
* client load based on system_time (0.85 =&gt; 85%)
* </pre>
* *
* <code>double client_system_time = 5;</code> * Generated from protobuf field <code>double client_system_time = 5;</code>
* @param float $var
* @return $this
*/ */
public function setClientSystemTime($var) public function setClientSystemTime($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->client_system_time = $var; $this->client_system_time = $var;
return $this;
} }
/** /**
* <pre> * client load based on user_time (0.85 => 85%)
* client load based on user_time (0.85 =&gt; 85%)
* </pre>
* *
* <code>double client_user_time = 6;</code> * Generated from protobuf field <code>double client_user_time = 6;</code>
* @return float
*/ */
public function getClientUserTime() public function getClientUserTime()
{ {
@ -254,24 +258,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre> * client load based on user_time (0.85 => 85%)
* client load based on user_time (0.85 =&gt; 85%)
* </pre>
* *
* <code>double client_user_time = 6;</code> * Generated from protobuf field <code>double client_user_time = 6;</code>
* @param float $var
* @return $this
*/ */
public function setClientUserTime($var) public function setClientUserTime($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->client_user_time = $var; $this->client_user_time = $var;
return $this;
} }
/** /**
* <pre>
* X% latency percentiles (in nanoseconds) * X% latency percentiles (in nanoseconds)
* </pre>
* *
* <code>double latency_50 = 7;</code> * Generated from protobuf field <code>double latency_50 = 7;</code>
* @return float
*/ */
public function getLatency50() public function getLatency50()
{ {
@ -279,20 +284,23 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* X% latency percentiles (in nanoseconds) * X% latency percentiles (in nanoseconds)
* </pre>
* *
* <code>double latency_50 = 7;</code> * Generated from protobuf field <code>double latency_50 = 7;</code>
* @param float $var
* @return $this
*/ */
public function setLatency50($var) public function setLatency50($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->latency_50 = $var; $this->latency_50 = $var;
return $this;
} }
/** /**
* <code>double latency_90 = 8;</code> * Generated from protobuf field <code>double latency_90 = 8;</code>
* @return float
*/ */
public function getLatency90() public function getLatency90()
{ {
@ -300,16 +308,21 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double latency_90 = 8;</code> * Generated from protobuf field <code>double latency_90 = 8;</code>
* @param float $var
* @return $this
*/ */
public function setLatency90($var) public function setLatency90($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->latency_90 = $var; $this->latency_90 = $var;
return $this;
} }
/** /**
* <code>double latency_95 = 9;</code> * Generated from protobuf field <code>double latency_95 = 9;</code>
* @return float
*/ */
public function getLatency95() public function getLatency95()
{ {
@ -317,16 +330,21 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double latency_95 = 9;</code> * Generated from protobuf field <code>double latency_95 = 9;</code>
* @param float $var
* @return $this
*/ */
public function setLatency95($var) public function setLatency95($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->latency_95 = $var; $this->latency_95 = $var;
return $this;
} }
/** /**
* <code>double latency_99 = 10;</code> * Generated from protobuf field <code>double latency_99 = 10;</code>
* @return float
*/ */
public function getLatency99() public function getLatency99()
{ {
@ -334,16 +352,21 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double latency_99 = 10;</code> * Generated from protobuf field <code>double latency_99 = 10;</code>
* @param float $var
* @return $this
*/ */
public function setLatency99($var) public function setLatency99($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->latency_99 = $var; $this->latency_99 = $var;
return $this;
} }
/** /**
* <code>double latency_999 = 11;</code> * Generated from protobuf field <code>double latency_999 = 11;</code>
* @return float
*/ */
public function getLatency999() public function getLatency999()
{ {
@ -351,20 +374,23 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double latency_999 = 11;</code> * Generated from protobuf field <code>double latency_999 = 11;</code>
* @param float $var
* @return $this
*/ */
public function setLatency999($var) public function setLatency999($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->latency_999 = $var; $this->latency_999 = $var;
return $this;
} }
/** /**
* <pre>
* server cpu usage percentage * server cpu usage percentage
* </pre>
* *
* <code>double server_cpu_usage = 12;</code> * Generated from protobuf field <code>double server_cpu_usage = 12;</code>
* @return float
*/ */
public function getServerCpuUsage() public function getServerCpuUsage()
{ {
@ -372,24 +398,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* server cpu usage percentage * server cpu usage percentage
* </pre>
* *
* <code>double server_cpu_usage = 12;</code> * Generated from protobuf field <code>double server_cpu_usage = 12;</code>
* @param float $var
* @return $this
*/ */
public function setServerCpuUsage($var) public function setServerCpuUsage($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->server_cpu_usage = $var; $this->server_cpu_usage = $var;
return $this;
} }
/** /**
* <pre>
* Number of requests that succeeded/failed * Number of requests that succeeded/failed
* </pre>
* *
* <code>double successful_requests_per_second = 13;</code> * Generated from protobuf field <code>double successful_requests_per_second = 13;</code>
* @return float
*/ */
public function getSuccessfulRequestsPerSecond() public function getSuccessfulRequestsPerSecond()
{ {
@ -397,20 +424,23 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Number of requests that succeeded/failed * Number of requests that succeeded/failed
* </pre>
* *
* <code>double successful_requests_per_second = 13;</code> * Generated from protobuf field <code>double successful_requests_per_second = 13;</code>
* @param float $var
* @return $this
*/ */
public function setSuccessfulRequestsPerSecond($var) public function setSuccessfulRequestsPerSecond($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->successful_requests_per_second = $var; $this->successful_requests_per_second = $var;
return $this;
} }
/** /**
* <code>double failed_requests_per_second = 14;</code> * Generated from protobuf field <code>double failed_requests_per_second = 14;</code>
* @return float
*/ */
public function getFailedRequestsPerSecond() public function getFailedRequestsPerSecond()
{ {
@ -418,12 +448,112 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>double failed_requests_per_second = 14;</code> * Generated from protobuf field <code>double failed_requests_per_second = 14;</code>
* @param float $var
* @return $this
*/ */
public function setFailedRequestsPerSecond($var) public function setFailedRequestsPerSecond($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->failed_requests_per_second = $var; $this->failed_requests_per_second = $var;
return $this;
}
/**
* Number of polls called inside completion queue per request
*
* Generated from protobuf field <code>double client_polls_per_request = 15;</code>
* @return float
*/
public function getClientPollsPerRequest()
{
return $this->client_polls_per_request;
}
/**
* Number of polls called inside completion queue per request
*
* Generated from protobuf field <code>double client_polls_per_request = 15;</code>
* @param float $var
* @return $this
*/
public function setClientPollsPerRequest($var)
{
GPBUtil::checkDouble($var);
$this->client_polls_per_request = $var;
return $this;
}
/**
* Generated from protobuf field <code>double server_polls_per_request = 16;</code>
* @return float
*/
public function getServerPollsPerRequest()
{
return $this->server_polls_per_request;
}
/**
* Generated from protobuf field <code>double server_polls_per_request = 16;</code>
* @param float $var
* @return $this
*/
public function setServerPollsPerRequest($var)
{
GPBUtil::checkDouble($var);
$this->server_polls_per_request = $var;
return $this;
}
/**
* Queries per CPU-sec over all servers or clients
*
* Generated from protobuf field <code>double server_queries_per_cpu_sec = 17;</code>
* @return float
*/
public function getServerQueriesPerCpuSec()
{
return $this->server_queries_per_cpu_sec;
}
/**
* Queries per CPU-sec over all servers or clients
*
* Generated from protobuf field <code>double server_queries_per_cpu_sec = 17;</code>
* @param float $var
* @return $this
*/
public function setServerQueriesPerCpuSec($var)
{
GPBUtil::checkDouble($var);
$this->server_queries_per_cpu_sec = $var;
return $this;
}
/**
* Generated from protobuf field <code>double client_queries_per_cpu_sec = 18;</code>
* @return float
*/
public function getClientQueriesPerCpuSec()
{
return $this->client_queries_per_cpu_sec;
}
/**
* Generated from protobuf field <code>double client_queries_per_cpu_sec = 18;</code>
* @param float $var
* @return $this
*/
public function setClientQueriesPerCpuSec($var)
{
GPBUtil::checkDouble($var);
$this->client_queries_per_cpu_sec = $var;
return $this;
} }
} }

@ -9,16 +9,14 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* A set of scenarios to be run with qps_json_driver * A set of scenarios to be run with qps_json_driver
* </pre>
* *
* Protobuf type <code>grpc.testing.Scenarios</code> * Generated from protobuf message <code>grpc.testing.Scenarios</code>
*/ */
class Scenarios extends \Google\Protobuf\Internal\Message class Scenarios extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>repeated .grpc.testing.Scenario scenarios = 1;</code> * Generated from protobuf field <code>repeated .grpc.testing.Scenario scenarios = 1;</code>
*/ */
private $scenarios; private $scenarios;
@ -28,7 +26,8 @@ class Scenarios extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>repeated .grpc.testing.Scenario scenarios = 1;</code> * Generated from protobuf field <code>repeated .grpc.testing.Scenario scenarios = 1;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getScenarios() public function getScenarios()
{ {
@ -36,12 +35,16 @@ class Scenarios extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>repeated .grpc.testing.Scenario scenarios = 1;</code> * Generated from protobuf field <code>repeated .grpc.testing.Scenario scenarios = 1;</code>
* @param \Grpc\Testing\Scenario[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setScenarios(&$var) public function setScenarios($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\Scenario::class); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\Scenario::class);
$this->scenarios = $var; $this->scenarios = $arr;
return $this;
} }
} }

@ -9,22 +9,24 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* presence of SecurityParams implies use of TLS * presence of SecurityParams implies use of TLS
* </pre>
* *
* Protobuf type <code>grpc.testing.SecurityParams</code> * Generated from protobuf message <code>grpc.testing.SecurityParams</code>
*/ */
class SecurityParams extends \Google\Protobuf\Internal\Message class SecurityParams extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>bool use_test_ca = 1;</code> * Generated from protobuf field <code>bool use_test_ca = 1;</code>
*/ */
private $use_test_ca = false; private $use_test_ca = false;
/** /**
* <code>string server_host_override = 2;</code> * Generated from protobuf field <code>string server_host_override = 2;</code>
*/ */
private $server_host_override = ''; private $server_host_override = '';
/**
* Generated from protobuf field <code>string cred_type = 3;</code>
*/
private $cred_type = '';
public function __construct() { public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
@ -32,7 +34,8 @@ class SecurityParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>bool use_test_ca = 1;</code> * Generated from protobuf field <code>bool use_test_ca = 1;</code>
* @return bool
*/ */
public function getUseTestCa() public function getUseTestCa()
{ {
@ -40,16 +43,21 @@ class SecurityParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>bool use_test_ca = 1;</code> * Generated from protobuf field <code>bool use_test_ca = 1;</code>
* @param bool $var
* @return $this
*/ */
public function setUseTestCa($var) public function setUseTestCa($var)
{ {
GPBUtil::checkBool($var); GPBUtil::checkBool($var);
$this->use_test_ca = $var; $this->use_test_ca = $var;
return $this;
} }
/** /**
* <code>string server_host_override = 2;</code> * Generated from protobuf field <code>string server_host_override = 2;</code>
* @return string
*/ */
public function getServerHostOverride() public function getServerHostOverride()
{ {
@ -57,12 +65,38 @@ class SecurityParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>string server_host_override = 2;</code> * Generated from protobuf field <code>string server_host_override = 2;</code>
* @param string $var
* @return $this
*/ */
public function setServerHostOverride($var) public function setServerHostOverride($var)
{ {
GPBUtil::checkString($var, True); GPBUtil::checkString($var, True);
$this->server_host_override = $var; $this->server_host_override = $var;
return $this;
}
/**
* Generated from protobuf field <code>string cred_type = 3;</code>
* @return string
*/
public function getCredType()
{
return $this->cred_type;
}
/**
* Generated from protobuf field <code>string cred_type = 3;</code>
* @param string $var
* @return $this
*/
public function setCredType($var)
{
GPBUtil::checkString($var, True);
$this->cred_type = $var;
return $this;
} }
} }

@ -9,7 +9,7 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.ServerArgs</code> * Generated from protobuf message <code>grpc.testing.ServerArgs</code>
*/ */
class ServerArgs extends \Google\Protobuf\Internal\Message class ServerArgs extends \Google\Protobuf\Internal\Message
{ {
@ -21,7 +21,8 @@ class ServerArgs extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ServerConfig setup = 1;</code> * Generated from protobuf field <code>.grpc.testing.ServerConfig setup = 1;</code>
* @return \Grpc\Testing\ServerConfig
*/ */
public function getSetup() public function getSetup()
{ {
@ -29,16 +30,21 @@ class ServerArgs extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ServerConfig setup = 1;</code> * Generated from protobuf field <code>.grpc.testing.ServerConfig setup = 1;</code>
* @param \Grpc\Testing\ServerConfig $var
* @return $this
*/ */
public function setSetup(&$var) public function setSetup($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\ServerConfig::class); GPBUtil::checkMessage($var, \Grpc\Testing\ServerConfig::class);
$this->writeOneof(1, $var); $this->writeOneof(1, $var);
return $this;
} }
/** /**
* <code>.grpc.testing.Mark mark = 2;</code> * Generated from protobuf field <code>.grpc.testing.Mark mark = 2;</code>
* @return \Grpc\Testing\Mark
*/ */
public function getMark() public function getMark()
{ {
@ -46,14 +52,21 @@ class ServerArgs extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.Mark mark = 2;</code> * Generated from protobuf field <code>.grpc.testing.Mark mark = 2;</code>
* @param \Grpc\Testing\Mark $var
* @return $this
*/ */
public function setMark(&$var) public function setMark($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\Mark::class); GPBUtil::checkMessage($var, \Grpc\Testing\Mark::class);
$this->writeOneof(2, $var); $this->writeOneof(2, $var);
return $this;
} }
/**
* @return string
*/
public function getArgtype() public function getArgtype()
{ {
return $this->whichOneof("argtype"); return $this->whichOneof("argtype");

@ -9,77 +9,73 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.ServerConfig</code> * Generated from protobuf message <code>grpc.testing.ServerConfig</code>
*/ */
class ServerConfig extends \Google\Protobuf\Internal\Message class ServerConfig extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>.grpc.testing.ServerType server_type = 1;</code> * Generated from protobuf field <code>.grpc.testing.ServerType server_type = 1;</code>
*/ */
private $server_type = 0; private $server_type = 0;
/** /**
* <code>.grpc.testing.SecurityParams security_params = 2;</code> * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 2;</code>
*/ */
private $security_params = null; private $security_params = null;
/** /**
* <pre>
* Port on which to listen. Zero means pick unused port. * Port on which to listen. Zero means pick unused port.
* </pre>
* *
* <code>int32 port = 4;</code> * Generated from protobuf field <code>int32 port = 4;</code>
*/ */
private $port = 0; private $port = 0;
/** /**
* <pre>
* Only for async server. Number of threads used to serve the requests. * Only for async server. Number of threads used to serve the requests.
* </pre>
* *
* <code>int32 async_server_threads = 7;</code> * Generated from protobuf field <code>int32 async_server_threads = 7;</code>
*/ */
private $async_server_threads = 0; private $async_server_threads = 0;
/** /**
* <pre>
* Specify the number of cores to limit server to, if desired * Specify the number of cores to limit server to, if desired
* </pre>
* *
* <code>int32 core_limit = 8;</code> * Generated from protobuf field <code>int32 core_limit = 8;</code>
*/ */
private $core_limit = 0; private $core_limit = 0;
/** /**
* <pre>
* payload config, used in generic server. * payload config, used in generic server.
* Note this must NOT be used in proto (non-generic) servers. For proto servers, * Note this must NOT be used in proto (non-generic) servers. For proto servers,
* 'response sizes' must be configured from the 'response_size' field of the * 'response sizes' must be configured from the 'response_size' field of the
* 'SimpleRequest' objects in RPC requests. * 'SimpleRequest' objects in RPC requests.
* </pre>
* *
* <code>.grpc.testing.PayloadConfig payload_config = 9;</code> * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 9;</code>
*/ */
private $payload_config = null; private $payload_config = null;
/** /**
* <pre>
* Specify the cores we should run the server on, if desired * Specify the cores we should run the server on, if desired
* </pre>
* *
* <code>repeated int32 core_list = 10;</code> * Generated from protobuf field <code>repeated int32 core_list = 10;</code>
*/ */
private $core_list; private $core_list;
/** /**
* <pre>
* If we use an OTHER_SERVER client_type, this string gives more detail * If we use an OTHER_SERVER client_type, this string gives more detail
* </pre>
* *
* <code>string other_server_api = 11;</code> * Generated from protobuf field <code>string other_server_api = 11;</code>
*/ */
private $other_server_api = ''; private $other_server_api = '';
/** /**
* <pre> * Number of threads that share each completion queue
*
* Generated from protobuf field <code>int32 threads_per_cq = 12;</code>
*/
private $threads_per_cq = 0;
/**
* Buffer pool size (no buffer pool specified if unset) * Buffer pool size (no buffer pool specified if unset)
* </pre>
* *
* <code>int32 resource_quota_size = 1001;</code> * Generated from protobuf field <code>int32 resource_quota_size = 1001;</code>
*/ */
private $resource_quota_size = 0; private $resource_quota_size = 0;
/**
* Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 1002;</code>
*/
private $channel_args;
public function __construct() { public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
@ -87,7 +83,8 @@ class ServerConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ServerType server_type = 1;</code> * Generated from protobuf field <code>.grpc.testing.ServerType server_type = 1;</code>
* @return int
*/ */
public function getServerType() public function getServerType()
{ {
@ -95,16 +92,21 @@ class ServerConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ServerType server_type = 1;</code> * Generated from protobuf field <code>.grpc.testing.ServerType server_type = 1;</code>
* @param int $var
* @return $this
*/ */
public function setServerType($var) public function setServerType($var)
{ {
GPBUtil::checkEnum($var, \Grpc\Testing\ServerType::class); GPBUtil::checkEnum($var, \Grpc\Testing\ServerType::class);
$this->server_type = $var; $this->server_type = $var;
return $this;
} }
/** /**
* <code>.grpc.testing.SecurityParams security_params = 2;</code> * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 2;</code>
* @return \Grpc\Testing\SecurityParams
*/ */
public function getSecurityParams() public function getSecurityParams()
{ {
@ -112,20 +114,23 @@ class ServerConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.SecurityParams security_params = 2;</code> * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 2;</code>
* @param \Grpc\Testing\SecurityParams $var
* @return $this
*/ */
public function setSecurityParams(&$var) public function setSecurityParams($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class); GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class);
$this->security_params = $var; $this->security_params = $var;
return $this;
} }
/** /**
* <pre>
* Port on which to listen. Zero means pick unused port. * Port on which to listen. Zero means pick unused port.
* </pre>
* *
* <code>int32 port = 4;</code> * Generated from protobuf field <code>int32 port = 4;</code>
* @return int
*/ */
public function getPort() public function getPort()
{ {
@ -133,24 +138,25 @@ class ServerConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Port on which to listen. Zero means pick unused port. * Port on which to listen. Zero means pick unused port.
* </pre>
* *
* <code>int32 port = 4;</code> * Generated from protobuf field <code>int32 port = 4;</code>
* @param int $var
* @return $this
*/ */
public function setPort($var) public function setPort($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->port = $var; $this->port = $var;
return $this;
} }
/** /**
* <pre>
* Only for async server. Number of threads used to serve the requests. * Only for async server. Number of threads used to serve the requests.
* </pre>
* *
* <code>int32 async_server_threads = 7;</code> * Generated from protobuf field <code>int32 async_server_threads = 7;</code>
* @return int
*/ */
public function getAsyncServerThreads() public function getAsyncServerThreads()
{ {
@ -158,24 +164,25 @@ class ServerConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Only for async server. Number of threads used to serve the requests. * Only for async server. Number of threads used to serve the requests.
* </pre>
* *
* <code>int32 async_server_threads = 7;</code> * Generated from protobuf field <code>int32 async_server_threads = 7;</code>
* @param int $var
* @return $this
*/ */
public function setAsyncServerThreads($var) public function setAsyncServerThreads($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->async_server_threads = $var; $this->async_server_threads = $var;
return $this;
} }
/** /**
* <pre>
* Specify the number of cores to limit server to, if desired * Specify the number of cores to limit server to, if desired
* </pre>
* *
* <code>int32 core_limit = 8;</code> * Generated from protobuf field <code>int32 core_limit = 8;</code>
* @return int
*/ */
public function getCoreLimit() public function getCoreLimit()
{ {
@ -183,27 +190,28 @@ class ServerConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Specify the number of cores to limit server to, if desired * Specify the number of cores to limit server to, if desired
* </pre>
* *
* <code>int32 core_limit = 8;</code> * Generated from protobuf field <code>int32 core_limit = 8;</code>
* @param int $var
* @return $this
*/ */
public function setCoreLimit($var) public function setCoreLimit($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->core_limit = $var; $this->core_limit = $var;
return $this;
} }
/** /**
* <pre>
* payload config, used in generic server. * payload config, used in generic server.
* Note this must NOT be used in proto (non-generic) servers. For proto servers, * Note this must NOT be used in proto (non-generic) servers. For proto servers,
* 'response sizes' must be configured from the 'response_size' field of the * 'response sizes' must be configured from the 'response_size' field of the
* 'SimpleRequest' objects in RPC requests. * 'SimpleRequest' objects in RPC requests.
* </pre>
* *
* <code>.grpc.testing.PayloadConfig payload_config = 9;</code> * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 9;</code>
* @return \Grpc\Testing\PayloadConfig
*/ */
public function getPayloadConfig() public function getPayloadConfig()
{ {
@ -211,27 +219,28 @@ class ServerConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* payload config, used in generic server. * payload config, used in generic server.
* Note this must NOT be used in proto (non-generic) servers. For proto servers, * Note this must NOT be used in proto (non-generic) servers. For proto servers,
* 'response sizes' must be configured from the 'response_size' field of the * 'response sizes' must be configured from the 'response_size' field of the
* 'SimpleRequest' objects in RPC requests. * 'SimpleRequest' objects in RPC requests.
* </pre>
* *
* <code>.grpc.testing.PayloadConfig payload_config = 9;</code> * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 9;</code>
* @param \Grpc\Testing\PayloadConfig $var
* @return $this
*/ */
public function setPayloadConfig(&$var) public function setPayloadConfig($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class); GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class);
$this->payload_config = $var; $this->payload_config = $var;
return $this;
} }
/** /**
* <pre>
* Specify the cores we should run the server on, if desired * Specify the cores we should run the server on, if desired
* </pre>
* *
* <code>repeated int32 core_list = 10;</code> * Generated from protobuf field <code>repeated int32 core_list = 10;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getCoreList() public function getCoreList()
{ {
@ -239,24 +248,25 @@ class ServerConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Specify the cores we should run the server on, if desired * Specify the cores we should run the server on, if desired
* </pre>
* *
* <code>repeated int32 core_list = 10;</code> * Generated from protobuf field <code>repeated int32 core_list = 10;</code>
* @param int[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setCoreList(&$var) public function setCoreList($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
$this->core_list = $var; $this->core_list = $arr;
return $this;
} }
/** /**
* <pre>
* If we use an OTHER_SERVER client_type, this string gives more detail * If we use an OTHER_SERVER client_type, this string gives more detail
* </pre>
* *
* <code>string other_server_api = 11;</code> * Generated from protobuf field <code>string other_server_api = 11;</code>
* @return string
*/ */
public function getOtherServerApi() public function getOtherServerApi()
{ {
@ -264,24 +274,51 @@ class ServerConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* If we use an OTHER_SERVER client_type, this string gives more detail * If we use an OTHER_SERVER client_type, this string gives more detail
* </pre>
* *
* <code>string other_server_api = 11;</code> * Generated from protobuf field <code>string other_server_api = 11;</code>
* @param string $var
* @return $this
*/ */
public function setOtherServerApi($var) public function setOtherServerApi($var)
{ {
GPBUtil::checkString($var, True); GPBUtil::checkString($var, True);
$this->other_server_api = $var; $this->other_server_api = $var;
return $this;
}
/**
* Number of threads that share each completion queue
*
* Generated from protobuf field <code>int32 threads_per_cq = 12;</code>
* @return int
*/
public function getThreadsPerCq()
{
return $this->threads_per_cq;
}
/**
* Number of threads that share each completion queue
*
* Generated from protobuf field <code>int32 threads_per_cq = 12;</code>
* @param int $var
* @return $this
*/
public function setThreadsPerCq($var)
{
GPBUtil::checkInt32($var);
$this->threads_per_cq = $var;
return $this;
} }
/** /**
* <pre>
* Buffer pool size (no buffer pool specified if unset) * Buffer pool size (no buffer pool specified if unset)
* </pre>
* *
* <code>int32 resource_quota_size = 1001;</code> * Generated from protobuf field <code>int32 resource_quota_size = 1001;</code>
* @return int
*/ */
public function getResourceQuotaSize() public function getResourceQuotaSize()
{ {
@ -289,16 +326,40 @@ class ServerConfig extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Buffer pool size (no buffer pool specified if unset) * Buffer pool size (no buffer pool specified if unset)
* </pre>
* *
* <code>int32 resource_quota_size = 1001;</code> * Generated from protobuf field <code>int32 resource_quota_size = 1001;</code>
* @param int $var
* @return $this
*/ */
public function setResourceQuotaSize($var) public function setResourceQuotaSize($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->resource_quota_size = $var; $this->resource_quota_size = $var;
return $this;
}
/**
* Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 1002;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getChannelArgs()
{
return $this->channel_args;
}
/**
* Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 1002;</code>
* @param \Grpc\Testing\ChannelArg[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setChannelArgs($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ChannelArg::class);
$this->channel_args = $arr;
return $this;
} }
} }

@ -9,51 +9,53 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.ServerStats</code> * Generated from protobuf message <code>grpc.testing.ServerStats</code>
*/ */
class ServerStats extends \Google\Protobuf\Internal\Message class ServerStats extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* wall clock time change in seconds since last reset * wall clock time change in seconds since last reset
* </pre>
* *
* <code>double time_elapsed = 1;</code> * Generated from protobuf field <code>double time_elapsed = 1;</code>
*/ */
private $time_elapsed = 0.0; private $time_elapsed = 0.0;
/** /**
* <pre>
* change in user time (in seconds) used by the server since last reset * change in user time (in seconds) used by the server since last reset
* </pre>
* *
* <code>double time_user = 2;</code> * Generated from protobuf field <code>double time_user = 2;</code>
*/ */
private $time_user = 0.0; private $time_user = 0.0;
/** /**
* <pre>
* change in server time (in seconds) used by the server process and all * change in server time (in seconds) used by the server process and all
* threads since last reset * threads since last reset
* </pre>
* *
* <code>double time_system = 3;</code> * Generated from protobuf field <code>double time_system = 3;</code>
*/ */
private $time_system = 0.0; private $time_system = 0.0;
/** /**
* <pre>
* change in total cpu time of the server (data from proc/stat) * change in total cpu time of the server (data from proc/stat)
* </pre>
* *
* <code>uint64 total_cpu_time = 4;</code> * Generated from protobuf field <code>uint64 total_cpu_time = 4;</code>
*/ */
private $total_cpu_time = 0; private $total_cpu_time = 0;
/** /**
* <pre>
* change in idle time of the server (data from proc/stat) * change in idle time of the server (data from proc/stat)
* </pre>
* *
* <code>uint64 idle_cpu_time = 5;</code> * Generated from protobuf field <code>uint64 idle_cpu_time = 5;</code>
*/ */
private $idle_cpu_time = 0; private $idle_cpu_time = 0;
/**
* Number of polls called inside completion queue
*
* Generated from protobuf field <code>uint64 cq_poll_count = 6;</code>
*/
private $cq_poll_count = 0;
/**
* Core library stats
*
* Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code>
*/
private $core_stats = null;
public function __construct() { public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
@ -61,11 +63,10 @@ class ServerStats extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* wall clock time change in seconds since last reset * wall clock time change in seconds since last reset
* </pre>
* *
* <code>double time_elapsed = 1;</code> * Generated from protobuf field <code>double time_elapsed = 1;</code>
* @return float
*/ */
public function getTimeElapsed() public function getTimeElapsed()
{ {
@ -73,24 +74,25 @@ class ServerStats extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* wall clock time change in seconds since last reset * wall clock time change in seconds since last reset
* </pre>
* *
* <code>double time_elapsed = 1;</code> * Generated from protobuf field <code>double time_elapsed = 1;</code>
* @param float $var
* @return $this
*/ */
public function setTimeElapsed($var) public function setTimeElapsed($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->time_elapsed = $var; $this->time_elapsed = $var;
return $this;
} }
/** /**
* <pre>
* change in user time (in seconds) used by the server since last reset * change in user time (in seconds) used by the server since last reset
* </pre>
* *
* <code>double time_user = 2;</code> * Generated from protobuf field <code>double time_user = 2;</code>
* @return float
*/ */
public function getTimeUser() public function getTimeUser()
{ {
@ -98,25 +100,26 @@ class ServerStats extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* change in user time (in seconds) used by the server since last reset * change in user time (in seconds) used by the server since last reset
* </pre>
* *
* <code>double time_user = 2;</code> * Generated from protobuf field <code>double time_user = 2;</code>
* @param float $var
* @return $this
*/ */
public function setTimeUser($var) public function setTimeUser($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->time_user = $var; $this->time_user = $var;
return $this;
} }
/** /**
* <pre>
* change in server time (in seconds) used by the server process and all * change in server time (in seconds) used by the server process and all
* threads since last reset * threads since last reset
* </pre>
* *
* <code>double time_system = 3;</code> * Generated from protobuf field <code>double time_system = 3;</code>
* @return float
*/ */
public function getTimeSystem() public function getTimeSystem()
{ {
@ -124,25 +127,26 @@ class ServerStats extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* change in server time (in seconds) used by the server process and all * change in server time (in seconds) used by the server process and all
* threads since last reset * threads since last reset
* </pre>
* *
* <code>double time_system = 3;</code> * Generated from protobuf field <code>double time_system = 3;</code>
* @param float $var
* @return $this
*/ */
public function setTimeSystem($var) public function setTimeSystem($var)
{ {
GPBUtil::checkDouble($var); GPBUtil::checkDouble($var);
$this->time_system = $var; $this->time_system = $var;
return $this;
} }
/** /**
* <pre>
* change in total cpu time of the server (data from proc/stat) * change in total cpu time of the server (data from proc/stat)
* </pre>
* *
* <code>uint64 total_cpu_time = 4;</code> * Generated from protobuf field <code>uint64 total_cpu_time = 4;</code>
* @return int|string
*/ */
public function getTotalCpuTime() public function getTotalCpuTime()
{ {
@ -150,24 +154,25 @@ class ServerStats extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* change in total cpu time of the server (data from proc/stat) * change in total cpu time of the server (data from proc/stat)
* </pre>
* *
* <code>uint64 total_cpu_time = 4;</code> * Generated from protobuf field <code>uint64 total_cpu_time = 4;</code>
* @param int|string $var
* @return $this
*/ */
public function setTotalCpuTime($var) public function setTotalCpuTime($var)
{ {
GPBUtil::checkUint64($var); GPBUtil::checkUint64($var);
$this->total_cpu_time = $var; $this->total_cpu_time = $var;
return $this;
} }
/** /**
* <pre>
* change in idle time of the server (data from proc/stat) * change in idle time of the server (data from proc/stat)
* </pre>
* *
* <code>uint64 idle_cpu_time = 5;</code> * Generated from protobuf field <code>uint64 idle_cpu_time = 5;</code>
* @return int|string
*/ */
public function getIdleCpuTime() public function getIdleCpuTime()
{ {
@ -175,16 +180,70 @@ class ServerStats extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* change in idle time of the server (data from proc/stat) * change in idle time of the server (data from proc/stat)
* </pre>
* *
* <code>uint64 idle_cpu_time = 5;</code> * Generated from protobuf field <code>uint64 idle_cpu_time = 5;</code>
* @param int|string $var
* @return $this
*/ */
public function setIdleCpuTime($var) public function setIdleCpuTime($var)
{ {
GPBUtil::checkUint64($var); GPBUtil::checkUint64($var);
$this->idle_cpu_time = $var; $this->idle_cpu_time = $var;
return $this;
}
/**
* Number of polls called inside completion queue
*
* Generated from protobuf field <code>uint64 cq_poll_count = 6;</code>
* @return int|string
*/
public function getCqPollCount()
{
return $this->cq_poll_count;
}
/**
* Number of polls called inside completion queue
*
* Generated from protobuf field <code>uint64 cq_poll_count = 6;</code>
* @param int|string $var
* @return $this
*/
public function setCqPollCount($var)
{
GPBUtil::checkUint64($var);
$this->cq_poll_count = $var;
return $this;
}
/**
* Core library stats
*
* Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code>
* @return \Grpc\Core\Stats
*/
public function getCoreStats()
{
return $this->core_stats;
}
/**
* Core library stats
*
* Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code>
* @param \Grpc\Core\Stats $var
* @return $this
*/
public function setCoreStats($var)
{
GPBUtil::checkMessage($var, \Grpc\Core\Stats::class);
$this->core_stats = $var;
return $this;
} }
} }

@ -9,28 +9,24 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.ServerStatus</code> * Generated from protobuf message <code>grpc.testing.ServerStatus</code>
*/ */
class ServerStatus extends \Google\Protobuf\Internal\Message class ServerStatus extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>.grpc.testing.ServerStats stats = 1;</code> * Generated from protobuf field <code>.grpc.testing.ServerStats stats = 1;</code>
*/ */
private $stats = null; private $stats = null;
/** /**
* <pre>
* the port bound by the server * the port bound by the server
* </pre>
* *
* <code>int32 port = 2;</code> * Generated from protobuf field <code>int32 port = 2;</code>
*/ */
private $port = 0; private $port = 0;
/** /**
* <pre>
* Number of cores available to the server * Number of cores available to the server
* </pre>
* *
* <code>int32 cores = 3;</code> * Generated from protobuf field <code>int32 cores = 3;</code>
*/ */
private $cores = 0; private $cores = 0;
@ -40,7 +36,8 @@ class ServerStatus extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ServerStats stats = 1;</code> * Generated from protobuf field <code>.grpc.testing.ServerStats stats = 1;</code>
* @return \Grpc\Testing\ServerStats
*/ */
public function getStats() public function getStats()
{ {
@ -48,20 +45,23 @@ class ServerStatus extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>.grpc.testing.ServerStats stats = 1;</code> * Generated from protobuf field <code>.grpc.testing.ServerStats stats = 1;</code>
* @param \Grpc\Testing\ServerStats $var
* @return $this
*/ */
public function setStats(&$var) public function setStats($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\ServerStats::class); GPBUtil::checkMessage($var, \Grpc\Testing\ServerStats::class);
$this->stats = $var; $this->stats = $var;
return $this;
} }
/** /**
* <pre>
* the port bound by the server * the port bound by the server
* </pre>
* *
* <code>int32 port = 2;</code> * Generated from protobuf field <code>int32 port = 2;</code>
* @return int
*/ */
public function getPort() public function getPort()
{ {
@ -69,24 +69,25 @@ class ServerStatus extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* the port bound by the server * the port bound by the server
* </pre>
* *
* <code>int32 port = 2;</code> * Generated from protobuf field <code>int32 port = 2;</code>
* @param int $var
* @return $this
*/ */
public function setPort($var) public function setPort($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->port = $var; $this->port = $var;
return $this;
} }
/** /**
* <pre>
* Number of cores available to the server * Number of cores available to the server
* </pre>
* *
* <code>int32 cores = 3;</code> * Generated from protobuf field <code>int32 cores = 3;</code>
* @return int
*/ */
public function getCores() public function getCores()
{ {
@ -94,16 +95,18 @@ class ServerStatus extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Number of cores available to the server * Number of cores available to the server
* </pre>
* *
* <code>int32 cores = 3;</code> * Generated from protobuf field <code>int32 cores = 3;</code>
* @param int $var
* @return $this
*/ */
public function setCores($var) public function setCores($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->cores = $var; $this->cores = $var;
return $this;
} }
} }

@ -5,28 +5,26 @@
namespace Grpc\Testing; namespace Grpc\Testing;
/** /**
* Protobuf enum <code>grpc.testing.ServerType</code> * Protobuf enum <code>Grpc\Testing\ServerType</code>
*/ */
class ServerType class ServerType
{ {
/** /**
* <code>SYNC_SERVER = 0;</code> * Generated from protobuf enum <code>SYNC_SERVER = 0;</code>
*/ */
const SYNC_SERVER = 0; const SYNC_SERVER = 0;
/** /**
* <code>ASYNC_SERVER = 1;</code> * Generated from protobuf enum <code>ASYNC_SERVER = 1;</code>
*/ */
const ASYNC_SERVER = 1; const ASYNC_SERVER = 1;
/** /**
* <code>ASYNC_GENERIC_SERVER = 2;</code> * Generated from protobuf enum <code>ASYNC_GENERIC_SERVER = 2;</code>
*/ */
const ASYNC_GENERIC_SERVER = 2; const ASYNC_GENERIC_SERVER = 2;
/** /**
* <pre>
* used for some language-specific variants * used for some language-specific variants
* </pre>
* *
* <code>OTHER_SERVER = 3;</code> * Generated from protobuf enum <code>OTHER_SERVER = 3;</code>
*/ */
const OTHER_SERVER = 3; const OTHER_SERVER = 3;
} }

@ -9,16 +9,16 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.SimpleProtoParams</code> * Generated from protobuf message <code>grpc.testing.SimpleProtoParams</code>
*/ */
class SimpleProtoParams extends \Google\Protobuf\Internal\Message class SimpleProtoParams extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <code>int32 req_size = 1;</code> * Generated from protobuf field <code>int32 req_size = 1;</code>
*/ */
private $req_size = 0; private $req_size = 0;
/** /**
* <code>int32 resp_size = 2;</code> * Generated from protobuf field <code>int32 resp_size = 2;</code>
*/ */
private $resp_size = 0; private $resp_size = 0;
@ -28,7 +28,8 @@ class SimpleProtoParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 req_size = 1;</code> * Generated from protobuf field <code>int32 req_size = 1;</code>
* @return int
*/ */
public function getReqSize() public function getReqSize()
{ {
@ -36,16 +37,21 @@ class SimpleProtoParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 req_size = 1;</code> * Generated from protobuf field <code>int32 req_size = 1;</code>
* @param int $var
* @return $this
*/ */
public function setReqSize($var) public function setReqSize($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->req_size = $var; $this->req_size = $var;
return $this;
} }
/** /**
* <code>int32 resp_size = 2;</code> * Generated from protobuf field <code>int32 resp_size = 2;</code>
* @return int
*/ */
public function getRespSize() public function getRespSize()
{ {
@ -53,12 +59,16 @@ class SimpleProtoParams extends \Google\Protobuf\Internal\Message
} }
/** /**
* <code>int32 resp_size = 2;</code> * Generated from protobuf field <code>int32 resp_size = 2;</code>
* @param int $var
* @return $this
*/ */
public function setRespSize($var) public function setRespSize($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->resp_size = $var; $this->resp_size = $var;
return $this;
} }
} }

@ -9,81 +9,63 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Unary request. * Unary request.
* </pre>
* *
* Protobuf type <code>grpc.testing.SimpleRequest</code> * Generated from protobuf message <code>grpc.testing.SimpleRequest</code>
*/ */
class SimpleRequest extends \Google\Protobuf\Internal\Message class SimpleRequest extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* DEPRECATED, don't use. To be removed shortly. * DEPRECATED, don't use. To be removed shortly.
* Desired payload type in the response from the server. * Desired payload type in the response from the server.
* If response_type is RANDOM, server randomly chooses one from other formats. * If response_type is RANDOM, server randomly chooses one from other formats.
* </pre>
* *
* <code>.grpc.testing.PayloadType response_type = 1;</code> * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
*/ */
private $response_type = 0; private $response_type = 0;
/** /**
* <pre>
* Desired payload size in the response from the server. * Desired payload size in the response from the server.
* </pre>
* *
* <code>int32 response_size = 2;</code> * Generated from protobuf field <code>int32 response_size = 2;</code>
*/ */
private $response_size = 0; private $response_size = 0;
/** /**
* <pre>
* Optional input payload sent along with the request. * Optional input payload sent along with the request.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 3;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
*/ */
private $payload = null; private $payload = null;
/** /**
* <pre>
* Whether SimpleResponse should include username. * Whether SimpleResponse should include username.
* </pre>
* *
* <code>bool fill_username = 4;</code> * Generated from protobuf field <code>bool fill_username = 4;</code>
*/ */
private $fill_username = false; private $fill_username = false;
/** /**
* <pre>
* Whether SimpleResponse should include OAuth scope. * Whether SimpleResponse should include OAuth scope.
* </pre>
* *
* <code>bool fill_oauth_scope = 5;</code> * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code>
*/ */
private $fill_oauth_scope = false; private $fill_oauth_scope = false;
/** /**
* <pre>
* Whether to request the server to compress the response. This field is * Whether to request the server to compress the response. This field is
* "nullable" in order to interoperate seamlessly with clients not able to * "nullable" in order to interoperate seamlessly with clients not able to
* implement the full compression tests by introspecting the call to verify * implement the full compression tests by introspecting the call to verify
* the response's compression status. * the response's compression status.
* </pre>
* *
* <code>.grpc.testing.BoolValue response_compressed = 6;</code> * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code>
*/ */
private $response_compressed = null; private $response_compressed = null;
/** /**
* <pre>
* Whether server should return a given status * Whether server should return a given status
* </pre>
* *
* <code>.grpc.testing.EchoStatus response_status = 7;</code> * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
*/ */
private $response_status = null; private $response_status = null;
/** /**
* <pre>
* Whether the server should expect this request to be compressed. * Whether the server should expect this request to be compressed.
* </pre>
* *
* <code>.grpc.testing.BoolValue expect_compressed = 8;</code> * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code>
*/ */
private $expect_compressed = null; private $expect_compressed = null;
@ -93,13 +75,12 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* DEPRECATED, don't use. To be removed shortly. * DEPRECATED, don't use. To be removed shortly.
* Desired payload type in the response from the server. * Desired payload type in the response from the server.
* If response_type is RANDOM, server randomly chooses one from other formats. * If response_type is RANDOM, server randomly chooses one from other formats.
* </pre>
* *
* <code>.grpc.testing.PayloadType response_type = 1;</code> * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
* @return int
*/ */
public function getResponseType() public function getResponseType()
{ {
@ -107,26 +88,27 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* DEPRECATED, don't use. To be removed shortly. * DEPRECATED, don't use. To be removed shortly.
* Desired payload type in the response from the server. * Desired payload type in the response from the server.
* If response_type is RANDOM, server randomly chooses one from other formats. * If response_type is RANDOM, server randomly chooses one from other formats.
* </pre>
* *
* <code>.grpc.testing.PayloadType response_type = 1;</code> * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
* @param int $var
* @return $this
*/ */
public function setResponseType($var) public function setResponseType($var)
{ {
GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
$this->response_type = $var; $this->response_type = $var;
return $this;
} }
/** /**
* <pre>
* Desired payload size in the response from the server. * Desired payload size in the response from the server.
* </pre>
* *
* <code>int32 response_size = 2;</code> * Generated from protobuf field <code>int32 response_size = 2;</code>
* @return int
*/ */
public function getResponseSize() public function getResponseSize()
{ {
@ -134,24 +116,25 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Desired payload size in the response from the server. * Desired payload size in the response from the server.
* </pre>
* *
* <code>int32 response_size = 2;</code> * Generated from protobuf field <code>int32 response_size = 2;</code>
* @param int $var
* @return $this
*/ */
public function setResponseSize($var) public function setResponseSize($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->response_size = $var; $this->response_size = $var;
return $this;
} }
/** /**
* <pre>
* Optional input payload sent along with the request. * Optional input payload sent along with the request.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 3;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
* @return \Grpc\Testing\Payload
*/ */
public function getPayload() public function getPayload()
{ {
@ -159,24 +142,25 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Optional input payload sent along with the request. * Optional input payload sent along with the request.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 3;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
* @param \Grpc\Testing\Payload $var
* @return $this
*/ */
public function setPayload(&$var) public function setPayload($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
$this->payload = $var; $this->payload = $var;
return $this;
} }
/** /**
* <pre>
* Whether SimpleResponse should include username. * Whether SimpleResponse should include username.
* </pre>
* *
* <code>bool fill_username = 4;</code> * Generated from protobuf field <code>bool fill_username = 4;</code>
* @return bool
*/ */
public function getFillUsername() public function getFillUsername()
{ {
@ -184,24 +168,25 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Whether SimpleResponse should include username. * Whether SimpleResponse should include username.
* </pre>
* *
* <code>bool fill_username = 4;</code> * Generated from protobuf field <code>bool fill_username = 4;</code>
* @param bool $var
* @return $this
*/ */
public function setFillUsername($var) public function setFillUsername($var)
{ {
GPBUtil::checkBool($var); GPBUtil::checkBool($var);
$this->fill_username = $var; $this->fill_username = $var;
return $this;
} }
/** /**
* <pre>
* Whether SimpleResponse should include OAuth scope. * Whether SimpleResponse should include OAuth scope.
* </pre>
* *
* <code>bool fill_oauth_scope = 5;</code> * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code>
* @return bool
*/ */
public function getFillOauthScope() public function getFillOauthScope()
{ {
@ -209,27 +194,28 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Whether SimpleResponse should include OAuth scope. * Whether SimpleResponse should include OAuth scope.
* </pre>
* *
* <code>bool fill_oauth_scope = 5;</code> * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code>
* @param bool $var
* @return $this
*/ */
public function setFillOauthScope($var) public function setFillOauthScope($var)
{ {
GPBUtil::checkBool($var); GPBUtil::checkBool($var);
$this->fill_oauth_scope = $var; $this->fill_oauth_scope = $var;
return $this;
} }
/** /**
* <pre>
* Whether to request the server to compress the response. This field is * Whether to request the server to compress the response. This field is
* "nullable" in order to interoperate seamlessly with clients not able to * "nullable" in order to interoperate seamlessly with clients not able to
* implement the full compression tests by introspecting the call to verify * implement the full compression tests by introspecting the call to verify
* the response's compression status. * the response's compression status.
* </pre>
* *
* <code>.grpc.testing.BoolValue response_compressed = 6;</code> * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code>
* @return \Grpc\Testing\BoolValue
*/ */
public function getResponseCompressed() public function getResponseCompressed()
{ {
@ -237,27 +223,28 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Whether to request the server to compress the response. This field is * Whether to request the server to compress the response. This field is
* "nullable" in order to interoperate seamlessly with clients not able to * "nullable" in order to interoperate seamlessly with clients not able to
* implement the full compression tests by introspecting the call to verify * implement the full compression tests by introspecting the call to verify
* the response's compression status. * the response's compression status.
* </pre>
* *
* <code>.grpc.testing.BoolValue response_compressed = 6;</code> * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code>
* @param \Grpc\Testing\BoolValue $var
* @return $this
*/ */
public function setResponseCompressed(&$var) public function setResponseCompressed($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
$this->response_compressed = $var; $this->response_compressed = $var;
return $this;
} }
/** /**
* <pre>
* Whether server should return a given status * Whether server should return a given status
* </pre>
* *
* <code>.grpc.testing.EchoStatus response_status = 7;</code> * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
* @return \Grpc\Testing\EchoStatus
*/ */
public function getResponseStatus() public function getResponseStatus()
{ {
@ -265,24 +252,25 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Whether server should return a given status * Whether server should return a given status
* </pre>
* *
* <code>.grpc.testing.EchoStatus response_status = 7;</code> * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
* @param \Grpc\Testing\EchoStatus $var
* @return $this
*/ */
public function setResponseStatus(&$var) public function setResponseStatus($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class); GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class);
$this->response_status = $var; $this->response_status = $var;
return $this;
} }
/** /**
* <pre>
* Whether the server should expect this request to be compressed. * Whether the server should expect this request to be compressed.
* </pre>
* *
* <code>.grpc.testing.BoolValue expect_compressed = 8;</code> * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code>
* @return \Grpc\Testing\BoolValue
*/ */
public function getExpectCompressed() public function getExpectCompressed()
{ {
@ -290,16 +278,18 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Whether the server should expect this request to be compressed. * Whether the server should expect this request to be compressed.
* </pre>
* *
* <code>.grpc.testing.BoolValue expect_compressed = 8;</code> * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code>
* @param \Grpc\Testing\BoolValue $var
* @return $this
*/ */
public function setExpectCompressed(&$var) public function setExpectCompressed($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
$this->expect_compressed = $var; $this->expect_compressed = $var;
return $this;
} }
} }

@ -9,37 +9,29 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Unary response, as configured by the request. * Unary response, as configured by the request.
* </pre>
* *
* Protobuf type <code>grpc.testing.SimpleResponse</code> * Generated from protobuf message <code>grpc.testing.SimpleResponse</code>
*/ */
class SimpleResponse extends \Google\Protobuf\Internal\Message class SimpleResponse extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* Payload to increase message size. * Payload to increase message size.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 1;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
*/ */
private $payload = null; private $payload = null;
/** /**
* <pre>
* The user the request came from, for verifying authentication was * The user the request came from, for verifying authentication was
* successful when the client expected it. * successful when the client expected it.
* </pre>
* *
* <code>string username = 2;</code> * Generated from protobuf field <code>string username = 2;</code>
*/ */
private $username = ''; private $username = '';
/** /**
* <pre>
* OAuth scope. * OAuth scope.
* </pre>
* *
* <code>string oauth_scope = 3;</code> * Generated from protobuf field <code>string oauth_scope = 3;</code>
*/ */
private $oauth_scope = ''; private $oauth_scope = '';
@ -49,11 +41,10 @@ class SimpleResponse extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Payload to increase message size. * Payload to increase message size.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 1;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
* @return \Grpc\Testing\Payload
*/ */
public function getPayload() public function getPayload()
{ {
@ -61,25 +52,26 @@ class SimpleResponse extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Payload to increase message size. * Payload to increase message size.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 1;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
* @param \Grpc\Testing\Payload $var
* @return $this
*/ */
public function setPayload(&$var) public function setPayload($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
$this->payload = $var; $this->payload = $var;
return $this;
} }
/** /**
* <pre>
* The user the request came from, for verifying authentication was * The user the request came from, for verifying authentication was
* successful when the client expected it. * successful when the client expected it.
* </pre>
* *
* <code>string username = 2;</code> * Generated from protobuf field <code>string username = 2;</code>
* @return string
*/ */
public function getUsername() public function getUsername()
{ {
@ -87,25 +79,26 @@ class SimpleResponse extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* The user the request came from, for verifying authentication was * The user the request came from, for verifying authentication was
* successful when the client expected it. * successful when the client expected it.
* </pre>
* *
* <code>string username = 2;</code> * Generated from protobuf field <code>string username = 2;</code>
* @param string $var
* @return $this
*/ */
public function setUsername($var) public function setUsername($var)
{ {
GPBUtil::checkString($var, True); GPBUtil::checkString($var, True);
$this->username = $var; $this->username = $var;
return $this;
} }
/** /**
* <pre>
* OAuth scope. * OAuth scope.
* </pre>
* *
* <code>string oauth_scope = 3;</code> * Generated from protobuf field <code>string oauth_scope = 3;</code>
* @return string
*/ */
public function getOauthScope() public function getOauthScope()
{ {
@ -113,16 +106,18 @@ class SimpleResponse extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* OAuth scope. * OAuth scope.
* </pre>
* *
* <code>string oauth_scope = 3;</code> * Generated from protobuf field <code>string oauth_scope = 3;</code>
* @param string $var
* @return $this
*/ */
public function setOauthScope($var) public function setOauthScope($var)
{ {
GPBUtil::checkString($var, True); GPBUtil::checkString($var, True);
$this->oauth_scope = $var; $this->oauth_scope = $var;
return $this;
} }
} }

@ -9,31 +9,25 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Client-streaming request. * Client-streaming request.
* </pre>
* *
* Protobuf type <code>grpc.testing.StreamingInputCallRequest</code> * Generated from protobuf message <code>grpc.testing.StreamingInputCallRequest</code>
*/ */
class StreamingInputCallRequest extends \Google\Protobuf\Internal\Message class StreamingInputCallRequest extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* Optional input payload sent along with the request. * Optional input payload sent along with the request.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 1;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
*/ */
private $payload = null; private $payload = null;
/** /**
* <pre>
* Whether the server should expect this request to be compressed. This field * Whether the server should expect this request to be compressed. This field
* is "nullable" in order to interoperate seamlessly with servers not able to * is "nullable" in order to interoperate seamlessly with servers not able to
* implement the full compression tests by introspecting the call to verify * implement the full compression tests by introspecting the call to verify
* the request's compression status. * the request's compression status.
* </pre>
* *
* <code>.grpc.testing.BoolValue expect_compressed = 2;</code> * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 2;</code>
*/ */
private $expect_compressed = null; private $expect_compressed = null;
@ -43,11 +37,10 @@ class StreamingInputCallRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Optional input payload sent along with the request. * Optional input payload sent along with the request.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 1;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
* @return \Grpc\Testing\Payload
*/ */
public function getPayload() public function getPayload()
{ {
@ -55,27 +48,28 @@ class StreamingInputCallRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Optional input payload sent along with the request. * Optional input payload sent along with the request.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 1;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
* @param \Grpc\Testing\Payload $var
* @return $this
*/ */
public function setPayload(&$var) public function setPayload($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
$this->payload = $var; $this->payload = $var;
return $this;
} }
/** /**
* <pre>
* Whether the server should expect this request to be compressed. This field * Whether the server should expect this request to be compressed. This field
* is "nullable" in order to interoperate seamlessly with servers not able to * is "nullable" in order to interoperate seamlessly with servers not able to
* implement the full compression tests by introspecting the call to verify * implement the full compression tests by introspecting the call to verify
* the request's compression status. * the request's compression status.
* </pre>
* *
* <code>.grpc.testing.BoolValue expect_compressed = 2;</code> * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 2;</code>
* @return \Grpc\Testing\BoolValue
*/ */
public function getExpectCompressed() public function getExpectCompressed()
{ {
@ -83,19 +77,21 @@ class StreamingInputCallRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Whether the server should expect this request to be compressed. This field * Whether the server should expect this request to be compressed. This field
* is "nullable" in order to interoperate seamlessly with servers not able to * is "nullable" in order to interoperate seamlessly with servers not able to
* implement the full compression tests by introspecting the call to verify * implement the full compression tests by introspecting the call to verify
* the request's compression status. * the request's compression status.
* </pre>
* *
* <code>.grpc.testing.BoolValue expect_compressed = 2;</code> * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 2;</code>
* @param \Grpc\Testing\BoolValue $var
* @return $this
*/ */
public function setExpectCompressed(&$var) public function setExpectCompressed($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
$this->expect_compressed = $var; $this->expect_compressed = $var;
return $this;
} }
} }

@ -9,20 +9,16 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Client-streaming response. * Client-streaming response.
* </pre>
* *
* Protobuf type <code>grpc.testing.StreamingInputCallResponse</code> * Generated from protobuf message <code>grpc.testing.StreamingInputCallResponse</code>
*/ */
class StreamingInputCallResponse extends \Google\Protobuf\Internal\Message class StreamingInputCallResponse extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* Aggregated size of payloads received from the client. * Aggregated size of payloads received from the client.
* </pre>
* *
* <code>int32 aggregated_payload_size = 1;</code> * Generated from protobuf field <code>int32 aggregated_payload_size = 1;</code>
*/ */
private $aggregated_payload_size = 0; private $aggregated_payload_size = 0;
@ -32,11 +28,10 @@ class StreamingInputCallResponse extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Aggregated size of payloads received from the client. * Aggregated size of payloads received from the client.
* </pre>
* *
* <code>int32 aggregated_payload_size = 1;</code> * Generated from protobuf field <code>int32 aggregated_payload_size = 1;</code>
* @return int
*/ */
public function getAggregatedPayloadSize() public function getAggregatedPayloadSize()
{ {
@ -44,16 +39,18 @@ class StreamingInputCallResponse extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Aggregated size of payloads received from the client. * Aggregated size of payloads received from the client.
* </pre>
* *
* <code>int32 aggregated_payload_size = 1;</code> * Generated from protobuf field <code>int32 aggregated_payload_size = 1;</code>
* @param int $var
* @return $this
*/ */
public function setAggregatedPayloadSize($var) public function setAggregatedPayloadSize($var)
{ {
GPBUtil::checkInt32($var); GPBUtil::checkInt32($var);
$this->aggregated_payload_size = $var; $this->aggregated_payload_size = $var;
return $this;
} }
} }

@ -9,48 +9,38 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Server-streaming request. * Server-streaming request.
* </pre>
* *
* Protobuf type <code>grpc.testing.StreamingOutputCallRequest</code> * Generated from protobuf message <code>grpc.testing.StreamingOutputCallRequest</code>
*/ */
class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* DEPRECATED, don't use. To be removed shortly. * DEPRECATED, don't use. To be removed shortly.
* Desired payload type in the response from the server. * Desired payload type in the response from the server.
* If response_type is RANDOM, the payload from each response in the stream * 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 * might be of different types. This is to simulate a mixed type of payload
* stream. * stream.
* </pre>
* *
* <code>.grpc.testing.PayloadType response_type = 1;</code> * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
*/ */
private $response_type = 0; private $response_type = 0;
/** /**
* <pre>
* Configuration for each expected response message. * Configuration for each expected response message.
* </pre>
* *
* <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code> * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
*/ */
private $response_parameters; private $response_parameters;
/** /**
* <pre>
* Optional input payload sent along with the request. * Optional input payload sent along with the request.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 3;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
*/ */
private $payload = null; private $payload = null;
/** /**
* <pre>
* Whether server should return a given status * Whether server should return a given status
* </pre>
* *
* <code>.grpc.testing.EchoStatus response_status = 7;</code> * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
*/ */
private $response_status = null; private $response_status = null;
@ -60,15 +50,14 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* DEPRECATED, don't use. To be removed shortly. * DEPRECATED, don't use. To be removed shortly.
* Desired payload type in the response from the server. * Desired payload type in the response from the server.
* If response_type is RANDOM, the payload from each response in the stream * 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 * might be of different types. This is to simulate a mixed type of payload
* stream. * stream.
* </pre>
* *
* <code>.grpc.testing.PayloadType response_type = 1;</code> * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
* @return int
*/ */
public function getResponseType() public function getResponseType()
{ {
@ -76,28 +65,29 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* DEPRECATED, don't use. To be removed shortly. * DEPRECATED, don't use. To be removed shortly.
* Desired payload type in the response from the server. * Desired payload type in the response from the server.
* If response_type is RANDOM, the payload from each response in the stream * 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 * might be of different types. This is to simulate a mixed type of payload
* stream. * stream.
* </pre>
* *
* <code>.grpc.testing.PayloadType response_type = 1;</code> * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
* @param int $var
* @return $this
*/ */
public function setResponseType($var) public function setResponseType($var)
{ {
GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
$this->response_type = $var; $this->response_type = $var;
return $this;
} }
/** /**
* <pre>
* Configuration for each expected response message. * Configuration for each expected response message.
* </pre>
* *
* <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code> * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/ */
public function getResponseParameters() public function getResponseParameters()
{ {
@ -105,24 +95,25 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Configuration for each expected response message. * Configuration for each expected response message.
* </pre>
* *
* <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code> * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
* @param \Grpc\Testing\ResponseParameters[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/ */
public function setResponseParameters(&$var) public function setResponseParameters($var)
{ {
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ResponseParameters::class); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ResponseParameters::class);
$this->response_parameters = $var; $this->response_parameters = $arr;
return $this;
} }
/** /**
* <pre>
* Optional input payload sent along with the request. * Optional input payload sent along with the request.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 3;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
* @return \Grpc\Testing\Payload
*/ */
public function getPayload() public function getPayload()
{ {
@ -130,24 +121,25 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Optional input payload sent along with the request. * Optional input payload sent along with the request.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 3;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
* @param \Grpc\Testing\Payload $var
* @return $this
*/ */
public function setPayload(&$var) public function setPayload($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
$this->payload = $var; $this->payload = $var;
return $this;
} }
/** /**
* <pre>
* Whether server should return a given status * Whether server should return a given status
* </pre>
* *
* <code>.grpc.testing.EchoStatus response_status = 7;</code> * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
* @return \Grpc\Testing\EchoStatus
*/ */
public function getResponseStatus() public function getResponseStatus()
{ {
@ -155,16 +147,18 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Whether server should return a given status * Whether server should return a given status
* </pre>
* *
* <code>.grpc.testing.EchoStatus response_status = 7;</code> * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
* @param \Grpc\Testing\EchoStatus $var
* @return $this
*/ */
public function setResponseStatus(&$var) public function setResponseStatus($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class); GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class);
$this->response_status = $var; $this->response_status = $var;
return $this;
} }
} }

@ -9,20 +9,16 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* <pre>
* Server-streaming response, as configured by the request and parameters. * Server-streaming response, as configured by the request and parameters.
* </pre>
* *
* Protobuf type <code>grpc.testing.StreamingOutputCallResponse</code> * Generated from protobuf message <code>grpc.testing.StreamingOutputCallResponse</code>
*/ */
class StreamingOutputCallResponse extends \Google\Protobuf\Internal\Message class StreamingOutputCallResponse extends \Google\Protobuf\Internal\Message
{ {
/** /**
* <pre>
* Payload to increase response size. * Payload to increase response size.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 1;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
*/ */
private $payload = null; private $payload = null;
@ -32,11 +28,10 @@ class StreamingOutputCallResponse extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Payload to increase response size. * Payload to increase response size.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 1;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
* @return \Grpc\Testing\Payload
*/ */
public function getPayload() public function getPayload()
{ {
@ -44,16 +39,18 @@ class StreamingOutputCallResponse extends \Google\Protobuf\Internal\Message
} }
/** /**
* <pre>
* Payload to increase response size. * Payload to increase response size.
* </pre>
* *
* <code>.grpc.testing.Payload payload = 1;</code> * Generated from protobuf field <code>.grpc.testing.Payload payload = 1;</code>
* @param \Grpc\Testing\Payload $var
* @return $this
*/ */
public function setPayload(&$var) public function setPayload($var)
{ {
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
$this->payload = $var; $this->payload = $var;
return $this;
} }
} }

@ -9,7 +9,7 @@ use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil; use Google\Protobuf\Internal\GPBUtil;
/** /**
* Protobuf type <code>grpc.testing.Void</code> * Generated from protobuf message <code>grpc.testing.Void</code>
*/ */
class Void extends \Google\Protobuf\Internal\Message class Void extends \Google\Protobuf\Internal\Message
{ {

@ -18,14 +18,16 @@
// //
// An integration test service that covers all the method signature permutations // An integration test service that covers all the method signature permutations
// of unary/streaming requests/responses. // of unary/streaming requests/responses.
namespace Grpc\Testing { namespace Grpc\Testing;
class WorkerServiceClient extends \Grpc\BaseStub { /**
*/
class WorkerServiceClient extends \Grpc\BaseStub {
/** /**
* @param string $hostname hostname * @param string $hostname hostname
* @param array $opts channel options * @param array $opts channel options
* @param Grpc\Channel $channel (optional) re-use channel object * @param \Grpc\Channel $channel (optional) re-use channel object
*/ */
public function __construct($hostname, $opts, $channel = null) { public function __construct($hostname, $opts, $channel = null) {
parent::__construct($hostname, $opts, $channel); parent::__construct($hostname, $opts, $channel);
@ -91,6 +93,4 @@ namespace Grpc\Testing {
$metadata, $options); $metadata, $options);
} }
}
} }

@ -0,0 +1,93 @@
<?php
/*
*
* Copyright 2017 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
// Histogram class for use in performance testing and measurement
class Histogram {
private $resolution;
private $max_possible;
private $sum;
private $sum_of_squares;
private $multiplier;
private $count;
private $min_seen;
private $max_seen;
private $buckets;
private function bucket_for($value) {
return (int)(log($value) / log($this->multiplier));
}
public function __construct($resolution, $max_possible) {
$this->resolution = $resolution;
$this->max_possible = $max_possible;
$this->sum = 0;
$this->sum_of_squares = 0;
$this->multiplier = 1+$resolution;
$this->count = 0;
$this->min_seen = $max_possible;
$this->max_seen = 0;
$this->buckets = array_fill(0, $this->bucket_for($max_possible)+1, 0);
}
public function add($value) {
$this->sum += $value;
$this->sum_of_squares += $value * $value;
$this->count += 1;
if ($value < $this->min_seen) {
$this->min_seen = $value;
}
if ($value > $this->max_seen) {
$this->max_seen = $value;
}
$this->buckets[$this->bucket_for($value)] += 1;
}
public function minimum() {
return $this->min_seen;
}
public function maximum() {
return $this->max_seen;
}
public function sum() {
return $this->sum;
}
public function sum_of_squares() {
return $this->sum_of_squares;
}
public function count() {
return $this->count;
}
public function contents() {
return $this->buckets;
}
public function clean() {
$this->sum = 0;
$this->sum_of_squares = 0;
$this->count = 0;
$this->min_seen = $this->max_possible;
$this->max_seen = 0;
$this->buckets = array_fill(0, $this->bucket_for($this->max_possible)+1, 0);
}
}

@ -15,6 +15,7 @@
syntax = "proto3"; syntax = "proto3";
import "src/proto/grpc/testing/control.proto"; import "src/proto/grpc/testing/control.proto";
import "src/proto/grpc/testing/stats.proto";
package grpc.testing; package grpc.testing;
@ -25,5 +26,6 @@ message ProxyStat {
service ProxyClientService { service ProxyClientService {
rpc GetConfig(Void) returns (ClientConfig); rpc GetConfig(Void) returns (ClientConfig);
rpc ReportTime(stream ProxyStat) returns (Void); rpc ReportTime(stream ProxyStat) returns (Void);
rpc ReportHist(stream HistogramData) returns (Void);
} }

@ -16,6 +16,8 @@
# Histogram class for use in performance testing and measurement # Histogram class for use in performance testing and measurement
require 'thread'
class Histogram class Histogram
# Determine the bucket index for a given value # Determine the bucket index for a given value
# @param {number} value The value to check # @param {number} value The value to check
@ -27,6 +29,7 @@ class Histogram
# @param {number} resolution The resolution of the histogram # @param {number} resolution The resolution of the histogram
# @param {number} max_possible The maximum value for the histogram # @param {number} max_possible The maximum value for the histogram
def initialize(resolution, max_possible) def initialize(resolution, max_possible)
@lock = Mutex.new
@resolution=resolution @resolution=resolution
@max_possible=max_possible @max_possible=max_possible
@sum=0 @sum=0
@ -70,4 +73,16 @@ class Histogram
def contents def contents
@buckets @buckets
end end
def merge(hist)
@lock.synchronize do
@min_seen = hist.min_seen
@max_seen = hist.max_seen
@sum += hist.sum
@sum_of_squares += hist.sum_of_squares
@count += hist.count
received_bucket = hist.bucket.to_a
@buckets = @buckets.map.with_index{ |m,i| m + received_bucket[i].to_i }
end
end
end end

@ -41,32 +41,49 @@ class ProxyBenchmarkClientServiceImpl < Grpc::Testing::ProxyClientService::Servi
@histmax = config.histogram_params.max_possible @histmax = config.histogram_params.max_possible
@histogram = Histogram.new(@histres, @histmax) @histogram = Histogram.new(@histres, @histmax)
@start_time = Time.now @start_time = Time.now
# TODO(vjpai): Support multiple client channels by spawning off a PHP client per channel @php_pid = Array.new(@config.client_channels)
(0..@config.client_channels-1).each do |chan|
Thread.new {
if @use_c_ext if @use_c_ext
puts "Use protobuf c extension" puts "Use protobuf c extension"
command = "php -d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/vendor/google/protobuf/php/ext/google/protobuf/modules/protobuf.so " + "-d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/ext/grpc/modules/grpc.so " + File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/client.php " + @mytarget command = "php -d extension=" + File.expand_path(File.dirname(__FILE__)) +
"/../../php/tests/qps/vendor/google/protobuf/php/ext/google/protobuf/modules/protobuf.so " +
"-d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/ext/grpc/modules/grpc.so " +
File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/client.php " + @mytarget + " #{chan%@config.server_targets.length}"
else else
puts "Use protobuf php extension" puts "Use protobuf php extension"
command = "php -d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/ext/grpc/modules/grpc.so " + File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/client.php " + @mytarget command = "php -d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/ext/grpc/modules/grpc.so " +
File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/client.php " + @mytarget + " #{chan%@config.server_targets.length}"
end
puts "[ruby proxy] Starting #{chan}th php-client command use c protobuf #{@use_c_ext}: " + command
@php_pid[chan] = spawn(command)
while true
sleep
end
}
end end
puts "Starting command: " + command
@php_pid = spawn(command)
end end
def stop def stop
Process.kill("TERM", @php_pid) (0..@config.client_channels-1).each do |chan|
Process.wait(@php_pid) Process.kill("TERM", @php_pid[chan])
Process.wait(@php_pid[chan])
end
end end
def get_config(_args, _call) def get_config(_args, _call)
puts "Answering get_config"
@config @config
end end
def report_time(call) def report_time(call)
puts "Starting a time reporting stream"
call.each_remote_read do |lat| call.each_remote_read do |lat|
@histogram.add((lat.latency)*1e9) @histogram.add((lat.latency)*1e9)
end end
Grpc::Testing::Void.new Grpc::Testing::Void.new
end end
def report_hist(call)
call.each_remote_read do |lat|
@histogram.merge(lat)
end
Grpc::Testing::Void.new
end
def mark(reset) def mark(reset)
lat = Grpc::Testing::HistogramData.new( lat = Grpc::Testing::HistogramData.new(
bucket: @histogram.contents, bucket: @histogram.contents,
@ -135,7 +152,7 @@ def proxymain
opts.on('--driver_port PORT', '<port>') do |v| opts.on('--driver_port PORT', '<port>') do |v|
options['driver_port'] = v options['driver_port'] = v
end end
opts.on("-c", "--[no-]c_proto_ext", "Use protobuf C-extention") do |c| opts.on("-c", "--[no-]use_protobuf_c_extension", "Use protobuf C-extention") do |c|
options[:c_ext] = c options[:c_ext] = c
end end
end.parse! end.parse!
@ -143,7 +160,8 @@ def proxymain
# Configure any errors with client or server child threads to surface # Configure any errors with client or server child threads to surface
Thread.abort_on_exception = true Thread.abort_on_exception = true
s = GRPC::RpcServer.new # Make sure proxy_server can handle the large number of calls in benchmarks
s = GRPC::RpcServer.new(pool_size: 1024)
port = s.add_http2_port("0.0.0.0:" + options['driver_port'].to_s, port = s.add_http2_port("0.0.0.0:" + options['driver_port'].to_s,
:this_port_is_insecure) :this_port_is_insecure)
bmc = ProxyBenchmarkClientServiceImpl.new(port, options[:c_ext]) bmc = ProxyBenchmarkClientServiceImpl.new(port, options[:c_ext])

@ -4,6 +4,7 @@
require 'google/protobuf' require 'google/protobuf'
require 'src/proto/grpc/testing/control_pb' require 'src/proto/grpc/testing/control_pb'
require 'src/proto/grpc/testing/stats_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "grpc.testing.ProxyStat" do add_message "grpc.testing.ProxyStat" do
optional :latency, :double, 1 optional :latency, :double, 1

@ -32,6 +32,7 @@ module Grpc
rpc :GetConfig, Void, ClientConfig rpc :GetConfig, Void, ClientConfig
rpc :ReportTime, stream(ProxyStat), Void rpc :ReportTime, stream(ProxyStat), Void
rpc :ReportHist, stream(HistogramData), Void
end end
Stub = Service.rpc_stub_class Stub = Service.rpc_stub_class

@ -31,19 +31,11 @@
return [f for f in out if not f.startswith("third_party/nanopb/")] return [f for f in out if not f.startswith("third_party/nanopb/")]
def grpc_public_headers(libs): def grpc_public_headers(libs):
excluded_files = ["include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_windows.h",
"include/grpc/support/sync_windows.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/sync_windows.h"]
out = [] out = []
for lib in libs: for lib in libs:
if lib.name in ("grpc", "gpr"): if lib.name in ("grpc", "gpr"):
out += lib.get('public_headers', []) out += lib.get('public_headers', [])
return [f for f in out if not f in excluded_files] return out
def grpc_private_headers(libs): def grpc_private_headers(libs):
out = [] out = []

@ -65,10 +65,13 @@
end end
s.subspec 'GID' do |ss| s.subspec 'GID' do |ss|
ss.ios.deployment_target = '7.0'
ss.header_mappings_dir = "#{src_dir}" ss.header_mappings_dir = "#{src_dir}"
ss.source_files = "#{src_dir}/GRPCCall+GID.{h,m}" ss.source_files = "#{src_dir}/GRPCCall+GID.{h,m}"
ss.dependency "#{s.name}/Main", version
ss.dependency 'Google/SignIn' ss.dependency 'Google/SignIn'
end end
end end

@ -1,31 +1,57 @@
%YAML 1.2 %YAML 1.2
--- | --- |
<%! <%!
def grpc_public_headers_no_dir(libs): # TODO (mxyan): Make this list from build.yaml
excluded_files = ["include/grpc/support/atm_gcc_sync.h", textual_headers = ["include/grpc/support/atm_gcc_atomic.h",
"include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_windows.h", "include/grpc/support/atm_windows.h",
"include/grpc/support/sync_custom.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_windows.h", "include/grpc/support/sync_windows.h",
"include/grpc/support/tls_gcc.h", "include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h", "include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/sync_custom.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h"] "include/grpc/impl/codegen/sync_windows.h"]
def grpc_public_headers_no_dir(libs):
out = []
for lib in libs:
if lib.name in ("grpc", "gpr"):
out += lib.get('public_headers', [])
out = [f for f in out if f not in textual_headers]
out = [hdr.split('/', 2)[2] for hdr in out]
return out
# Generate the list of platform-specific headers as textual headers so that
# they are not built when the module is built but only when they are named by
# an #include directive.
def grpc_public_textual_headers_no_dir(libs):
out = [] out = []
for lib in libs: for lib in libs:
if lib.name in ("grpc", "gpr"): if lib.name in ("grpc", "gpr"):
out += lib.get('public_headers', []) out += lib.get('public_headers', [])
out = [f for f in out if f not in excluded_files] out = [f for f in out if f in textual_headers]
out = [hdr.split('/', 2)[2] for hdr in out] out = [hdr.split('/', 2)[2] for hdr in out]
return out return out
def header_lines(files): def header_lines(files):
return ('\n ').join('header "%s"' % f for f in files) return ('\n ').join('header "%s"' % f for f in files)
def textual_header_lines(files):
return ('\n ').join('textual header "%s"' % f for f in files)
%> %>
framework module grpc { framework module grpc {
umbrella header "grpc.h" umbrella header "grpc.h"
${header_lines(grpc_public_headers_no_dir(libs))} ${header_lines(grpc_public_headers_no_dir(libs))}
${textual_header_lines(grpc_public_textual_headers_no_dir(libs))}
export * export *
module * { export * } module * { export * }
} }

@ -32,5 +32,8 @@
<%include file="../../python_deps.include"/> <%include file="../../python_deps.include"/>
<%include file="../../node_deps.include"/> <%include file="../../node_deps.include"/>
<%include file="../../run_tests_addons.include"/> <%include file="../../run_tests_addons.include"/>
# Install Mako to generate files in grpc/grpc-node
RUN pip install Mako
# Define the default command. # Define the default command.
CMD ["bash"] CMD ["bash"]

@ -105,8 +105,9 @@ static void test_jitter_backoff(void) {
const int64_t initial_timeout = 500; const int64_t initial_timeout = 500;
const double jitter = 0.1; const double jitter = 0.1;
grpc_backoff backoff; grpc_backoff backoff;
grpc_backoff_init(&backoff, initial_timeout, 1.0 /* multiplier */, jitter, grpc_backoff_init(&backoff, (grpc_millis)initial_timeout,
100 /* min timeout */, 1000 /* max timeout */); 1.0 /* multiplier */, jitter, 100 /* min timeout */,
1000 /* max timeout */);
backoff.rng_state = 0; // force consistent PRNG backoff.rng_state = 0; // force consistent PRNG

@ -42,8 +42,8 @@ static grpc_pollset *g_pollset;
static int g_connections_complete = 0; static int g_connections_complete = 0;
static grpc_endpoint *g_connecting = NULL; static grpc_endpoint *g_connecting = NULL;
static gpr_timespec test_deadline(void) { static grpc_millis test_deadline(void) {
return grpc_timeout_seconds_to_deadline(10); return grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(10));
} }
static void finish_connection(grpc_exec_ctx *exec_ctx) { static void finish_connection(grpc_exec_ctx *exec_ctx) {
@ -110,7 +110,7 @@ void test_succeeds(void) {
(int *)&resolved_addr.len) == 0); (int *)&resolved_addr.len) == 0);
GRPC_CLOSURE_INIT(&done, must_succeed, NULL, grpc_schedule_on_exec_ctx); GRPC_CLOSURE_INIT(&done, must_succeed, NULL, grpc_schedule_on_exec_ctx);
grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, NULL, NULL, grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, NULL, NULL,
&resolved_addr, gpr_inf_future(GPR_CLOCK_REALTIME)); &resolved_addr, GRPC_MILLIS_INF_FUTURE);
gpr_mu_lock(g_mu); gpr_mu_lock(g_mu);
@ -119,8 +119,8 @@ void test_succeeds(void) {
GPR_ASSERT(GRPC_LOG_IF_ERROR( GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work", "pollset_work",
grpc_pollset_work(&exec_ctx, g_pollset, &worker, grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), grpc_timespec_to_millis_round_up(
grpc_timeout_seconds_to_deadline(5)))); grpc_timeout_seconds_to_deadline(5)))));
gpr_mu_unlock(g_mu); gpr_mu_unlock(g_mu);
grpc_exec_ctx_flush(&exec_ctx); grpc_exec_ctx_flush(&exec_ctx);
gpr_mu_lock(g_mu); gpr_mu_lock(g_mu);
@ -154,7 +154,7 @@ void test_fails(void) {
/* connect to a broken address */ /* connect to a broken address */
GRPC_CLOSURE_INIT(&done, must_fail, NULL, grpc_schedule_on_exec_ctx); GRPC_CLOSURE_INIT(&done, must_fail, NULL, grpc_schedule_on_exec_ctx);
grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, NULL, NULL, grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, NULL, NULL,
&resolved_addr, gpr_inf_future(GPR_CLOCK_REALTIME)); &resolved_addr, GRPC_MILLIS_INF_FUTURE);
gpr_mu_lock(g_mu); gpr_mu_lock(g_mu);
@ -162,17 +162,17 @@ void test_fails(void) {
while (g_connections_complete == connections_complete_before) { while (g_connections_complete == connections_complete_before) {
grpc_pollset_worker *worker = NULL; grpc_pollset_worker *worker = NULL;
gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
gpr_timespec polling_deadline = test_deadline(); grpc_millis polling_deadline = test_deadline();
switch (grpc_timer_check(&exec_ctx, now, &polling_deadline)) { switch (grpc_timer_check(&exec_ctx, &polling_deadline)) {
case GRPC_TIMERS_FIRED: case GRPC_TIMERS_FIRED:
break; break;
case GRPC_TIMERS_NOT_CHECKED: case GRPC_TIMERS_NOT_CHECKED:
polling_deadline = now; polling_deadline = grpc_timespec_to_millis_round_up(now);
/* fall through */ /* fall through */
case GRPC_TIMERS_CHECKED_AND_EMPTY: case GRPC_TIMERS_CHECKED_AND_EMPTY:
GPR_ASSERT(GRPC_LOG_IF_ERROR( GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker, "pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker,
now, polling_deadline))); polling_deadline)));
break; break;
} }
gpr_mu_unlock(g_mu); gpr_mu_unlock(g_mu);

@ -207,7 +207,7 @@ static void tcp_connect(grpc_exec_ctx *exec_ctx, const struct sockaddr *remote,
GPR_ASSERT(GRPC_LOG_IF_ERROR( GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work", "pollset_work",
grpc_pollset_work(exec_ctx, g_pollset, &worker, grpc_pollset_work(exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), deadline))); grpc_timespec_to_millis_round_up(deadline))));
gpr_mu_unlock(g_mu); gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(exec_ctx); grpc_exec_ctx_finish(exec_ctx);
gpr_mu_lock(g_mu); gpr_mu_lock(g_mu);
@ -246,7 +246,7 @@ static void test_connect(unsigned n) {
GPR_ASSERT(GRPC_ERROR_NONE == GPR_ASSERT(GRPC_ERROR_NONE ==
grpc_tcp_server_add_port(s, &resolved_addr, &svr_port)); grpc_tcp_server_add_port(s, &resolved_addr, &svr_port));
GPR_ASSERT(svr_port > 0); GPR_ASSERT(svr_port > 0);
GPR_ASSERT(uv_ip6_addr("::", svr_port, (struct sockaddr_in6 *)addr) == 0); GPR_ASSERT((uv_ip6_addr("::", svr_port, (struct sockaddr_in6 *)addr)) == 0);
/* Cannot use wildcard (port==0), because add_port() will try to reuse the /* Cannot use wildcard (port==0), because add_port() will try to reuse the
same port as a previous add_port(). */ same port as a previous add_port(). */
svr1_port = grpc_pick_unused_port_or_die(); svr1_port = grpc_pick_unused_port_or_die();

@ -102,18 +102,20 @@ void decode_suite(char ext, grpc_millis (*answer)(int64_t x)) {
} }
static grpc_millis millis_from_nanos(int64_t x) { static grpc_millis millis_from_nanos(int64_t x) {
return x / GPR_NS_PER_MS + (x % GPR_NS_PER_MS != 0); return (grpc_millis)(x / GPR_NS_PER_MS + (x % GPR_NS_PER_MS != 0));
} }
static grpc_millis millis_from_micros(int64_t x) { static grpc_millis millis_from_micros(int64_t x) {
return x / GPR_US_PER_MS + (x % GPR_US_PER_MS != 0); return (grpc_millis)(x / GPR_US_PER_MS + (x % GPR_US_PER_MS != 0));
}
static grpc_millis millis_from_millis(int64_t x) { return (grpc_millis)x; }
static grpc_millis millis_from_seconds(int64_t x) {
return (grpc_millis)(x * GPR_MS_PER_SEC);
} }
static grpc_millis millis_from_millis(int64_t x) { return x; }
static grpc_millis millis_from_seconds(int64_t x) { return x * GPR_MS_PER_SEC; }
static grpc_millis millis_from_minutes(int64_t x) { static grpc_millis millis_from_minutes(int64_t x) {
return x * 60 * GPR_MS_PER_SEC; return (grpc_millis)(x * 60 * GPR_MS_PER_SEC);
} }
static grpc_millis millis_from_hours(int64_t x) { static grpc_millis millis_from_hours(int64_t x) {
return x * 3600 * GPR_MS_PER_SEC; return (grpc_millis)(x * 3600 * GPR_MS_PER_SEC);
} }
void test_decoding(void) { void test_decoding(void) {

@ -102,5 +102,8 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
RUN mkdir /var/local/jenkins RUN mkdir /var/local/jenkins
# Install Mako to generate files in grpc/grpc-node
RUN pip install Mako
# Define the default command. # Define the default command.
CMD ["bash"] CMD ["bash"]

@ -40,11 +40,12 @@ pip install google-api-python-client --user python
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json
# If this is a PR using RUN_TESTS_FLAGS var, then add flags to filter tests # If this is a PR using RUN_TESTS_FLAGS var, then add flags to filter tests
if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; then # TODO(matt-kwong): enable after fixing brew issue
brew install jq # if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; then
ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref) # brew install jq
export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch" # ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref)
fi # export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch"
# fi
set +ex # rvm script is very verbose and exits with errorcode set +ex # rvm script is very verbose and exits with errorcode
source $HOME/.rvm/scripts/rvm source $HOME/.rvm/scripts/rvm
@ -60,7 +61,7 @@ pod repo update # needed by python
# python # python
pip install virtualenv --user python pip install virtualenv --user python
pip install -U six tox setuptools twisted pyyaml --user python pip install -U Mako six tox setuptools twisted pyyaml --user python
export PYTHONPATH=/Library/Python/3.4/site-packages export PYTHONPATH=/Library/Python/3.4/site-packages
# set xcode version for Obj-C tests # set xcode version for Obj-C tests

@ -28,5 +28,5 @@ tools/run_tests/run_interop_tests.py \
--cloud_to_prod \ --cloud_to_prod \
--cloud_to_prod_auth \ --cloud_to_prod_auth \
--prod_servers default gateway_v4 \ --prod_servers default gateway_v4 \
--use_docker --internal_ci -t -j 12 $@ --use_docker --internal_ci --allow_flakes -t -j 12 $@

@ -21,7 +21,7 @@ cd $(dirname $0)/../..
# run 8core client vs 8core server # run 8core client vs 8core server
tools/run_tests/run_performance_tests.py \ tools/run_tests/run_performance_tests.py \
-l c++ csharp node ruby java python go node_express php_protobuf_php php_protobuf_c \ -l c++ csharp node ruby java python go node_express php7 php7_protobuf_c \
--netperf \ --netperf \
--category scalable \ --category scalable \
--bq_result_table performance_test.performance_experiment \ --bq_result_table performance_test.performance_experiment \

@ -31,6 +31,7 @@ then
make CONFIG=${CONFIG} EMBED_OPENSSL=true EMBED_ZLIB=true qps_worker qps_json_driver -j8 make CONFIG=${CONFIG} EMBED_OPENSSL=true EMBED_ZLIB=true qps_worker qps_json_driver -j8
fi fi
PHP_ALREADY_BUILT=""
for language in $@ for language in $@
do do
case "$language" in case "$language" in
@ -43,6 +44,14 @@ do
"go") "go")
tools/run_tests/performance/build_performance_go.sh tools/run_tests/performance/build_performance_go.sh
;; ;;
"php7"|"php7_protobuf_c")
if [ -n "$PHP_ALREADY_BUILT" ]; then
echo "Skipping PHP build as already built by $PHP_ALREADY_BUILT"
else
PHP_ALREADY_BUILT=$language
tools/run_tests/performance/build_performance_php7.sh
fi
;;
"csharp") "csharp")
python tools/run_tests/run_tests.py -l $language -c $CONFIG --build_only -j 8 --compiler coreclr python tools/run_tests/run_tests.py -l $language -c $CONFIG --build_only -j 8 --compiler coreclr
;; ;;

@ -0,0 +1,30 @@
#!/bin/bash
# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex
cd $(dirname $0)/../../..
CONFIG=${CONFIG:-opt}
python tools/run_tests/run_tests.py -l php7 -c $CONFIG --build_only -j 8
# Set up all dependences needed for PHP QPS test
cd src/php/tests/qps
composer install
# Install protobuf C-extension for php
cd vendor/google/protobuf/php/ext/google/protobuf
phpize
./configure
make

@ -17,17 +17,7 @@ source ~/.rvm/scripts/rvm
set -ex set -ex
cd $(dirname $0)/../../.. cd $(dirname $0)/../../..
repo=$(pwd)
# First set up all dependences needed for PHP QPS test
cd $repo
cd src/php/tests/qps
composer install
# Install protobuf C-extension for php
cd vendor/google/protobuf/php/ext/google/protobuf
phpize
./configure
make
# The proxy worker for PHP is implemented in Ruby # The proxy worker for PHP is implemented in Ruby
cd $repo
ruby src/ruby/qps/proxy-worker.rb $@ ruby src/ruby/qps/proxy-worker.rb $@

@ -800,39 +800,54 @@ class RubyLanguage:
return 'ruby' return 'ruby'
class PhpLanguage: class Php7Language:
def __init__(self, use_protobuf_c_extension=False): def __init__(self, php7_protobuf_c=False):
pass pass
self.use_protobuf_c_extension=use_protobuf_c_extension self.php7_protobuf_c=php7_protobuf_c
self.safename = str(self) self.safename = str(self)
def worker_cmdline(self): def worker_cmdline(self):
if self.use_protobuf_c_extension: if self.php7_protobuf_c:
return ['tools/run_tests/performance/run_worker_php.sh -c'] return ['tools/run_tests/performance/run_worker_php.sh --use_protobuf_c_extension']
return ['tools/run_tests/performance/run_worker_php.sh'] return ['tools/run_tests/performance/run_worker_php.sh']
def worker_port_offset(self): def worker_port_offset(self):
if self.php7_protobuf_c:
return 900
return 800 return 800
def scenarios(self): def scenarios(self):
php_extension_mode='php_protobuf_php_extension' php7_extension_mode='php7_protobuf_php_extension'
if self.use_protobuf_c_extension: if self.php7_protobuf_c:
php_extension_mode='php_protobuf_c_extension' php7_extension_mode='php7_protobuf_c_extension'
yield _ping_pong_scenario( yield _ping_pong_scenario(
'%s_to_cpp_protobuf_sync_unary_ping_pong' % php_extension_mode, '%s_to_cpp_protobuf_sync_unary_ping_pong' % php7_extension_mode,
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER', rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
server_language='c++', async_server_threads=1) server_language='c++', async_server_threads=1)
yield _ping_pong_scenario( yield _ping_pong_scenario(
'%s_to_cpp_protobuf_sync_streaming_ping_pong' % php_extension_mode, '%s_to_cpp_protobuf_sync_streaming_ping_pong' % php7_extension_mode,
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='SYNC_SERVER', rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
server_language='c++', async_server_threads=1) server_language='c++', async_server_threads=1)
def __str__(self): # TODO(ddyihai): Investigate why when async_server_threads=1/CPU usage 340%, the QPS performs
return 'php' # better than async_server_threads=0/CPU usage 490%.
yield _ping_pong_scenario(
'%s_to_cpp_protobuf_sync_unary_qps_unconstrained' % php7_extension_mode,
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='ASYNC_SERVER',
server_language='c++', outstanding=1, async_server_threads=1, unconstrained_client='sync')
yield _ping_pong_scenario(
'%s_to_cpp_protobuf_sync_streaming_qps_unconstrained' % php7_extension_mode,
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='ASYNC_SERVER',
server_language='c++', outstanding=1, async_server_threads=1, unconstrained_client='sync')
def __str__(self):
if self.php7_protobuf_c:
return 'php7_protobuf_c'
return 'php7'
class JavaLanguage: class JavaLanguage:
@ -1031,8 +1046,8 @@ LANGUAGES = {
'node' : NodeLanguage(), 'node' : NodeLanguage(),
'node_express': NodeExpressLanguage(), 'node_express': NodeExpressLanguage(),
'ruby' : RubyLanguage(), 'ruby' : RubyLanguage(),
'php_protobuf_php' : PhpLanguage(), 'php7' : Php7Language(),
'php_protobuf_c' : PhpLanguage(use_protobuf_c_extension=True), 'php7_protobuf_c' : Php7Language(php7_protobuf_c=True),
'java' : JavaLanguage(), 'java' : JavaLanguage(),
'python' : PythonLanguage(), 'python' : PythonLanguage(),
'go' : GoLanguage(), 'go' : GoLanguage(),

Loading…
Cancel
Save