From d0153898231c615d626176c2b3ffc42095eb42c3 Mon Sep 17 00:00:00 2001 From: ZhouyihaiDing Date: Thu, 28 Sep 2017 15:00:15 -0700 Subject: exclude uploading stats, add unconstained php benchmark php7 build once --- src/php/tests/qps/client.php | 56 +++- .../GPBMetadata/Src/Proto/Grpc/Core/Stats.php | 33 ++ .../GPBMetadata/Src/Proto/Grpc/Testing/Control.php | 215 +++++++------ .../Src/Proto/Grpc/Testing/ProxyService.php | 21 +- .../Src/Proto/Grpc/Testing/Services.php | 53 ++-- .../GPBMetadata/Src/Proto/Grpc/Testing/Stats.php | 47 +-- .../tests/qps/generated_code/Grpc/Core/Bucket.php | 75 +++++ .../qps/generated_code/Grpc/Core/Histogram.php | 49 +++ .../tests/qps/generated_code/Grpc/Core/Metric.php | 102 ++++++ .../tests/qps/generated_code/Grpc/Core/Stats.php | 49 +++ .../Grpc/Testing/BenchmarkServiceClient.php | 68 +++- .../qps/generated_code/Grpc/Testing/BoolValue.php | 21 +- .../Grpc/Testing/ByteBufferParams.php | 24 +- .../qps/generated_code/Grpc/Testing/ChannelArg.php | 34 +- .../qps/generated_code/Grpc/Testing/ClientArgs.php | 27 +- .../generated_code/Grpc/Testing/ClientConfig.php | 288 +++++++++++------ .../generated_code/Grpc/Testing/ClientStats.php | 147 ++++++--- .../generated_code/Grpc/Testing/ClientStatus.php | 15 +- .../qps/generated_code/Grpc/Testing/ClientType.php | 12 +- .../Grpc/Testing/ClosedLoopParams.php | 4 +- .../Grpc/Testing/ComplexProtoParams.php | 4 +- .../generated_code/Grpc/Testing/CoreRequest.php | 2 +- .../generated_code/Grpc/Testing/CoreResponse.php | 19 +- .../qps/generated_code/Grpc/Testing/EchoStatus.php | 26 +- .../generated_code/Grpc/Testing/HistogramData.php | 76 +++-- .../Grpc/Testing/HistogramParams.php | 38 +-- .../qps/generated_code/Grpc/Testing/LoadParams.php | 27 +- .../tests/qps/generated_code/Grpc/Testing/Mark.php | 21 +- .../qps/generated_code/Grpc/Testing/Payload.php | 38 +-- .../generated_code/Grpc/Testing/PayloadConfig.php | 38 ++- .../generated_code/Grpc/Testing/PayloadType.php | 8 +- .../generated_code/Grpc/Testing/PoissonParams.php | 21 +- .../Grpc/Testing/ProxyClientServiceClient.php | 34 +- .../qps/generated_code/Grpc/Testing/ProxyStat.php | 13 +- .../generated_code/Grpc/Testing/ReconnectInfo.php | 32 +- .../Grpc/Testing/ReconnectParams.php | 15 +- .../Testing/ReportQpsScenarioServiceClient.php | 50 +++ .../Grpc/Testing/RequestResultCount.php | 24 +- .../Grpc/Testing/ResponseParameters.php | 57 ++-- .../qps/generated_code/Grpc/Testing/RpcType.php | 18 +- .../qps/generated_code/Grpc/Testing/Scenario.php | 144 ++++----- .../generated_code/Grpc/Testing/ScenarioResult.php | 193 ++++++----- .../Grpc/Testing/ScenarioResultSummary.php | 352 ++++++++++++++------- .../qps/generated_code/Grpc/Testing/Scenarios.php | 21 +- .../generated_code/Grpc/Testing/SecurityParams.php | 52 ++- .../qps/generated_code/Grpc/Testing/ServerArgs.php | 27 +- .../generated_code/Grpc/Testing/ServerConfig.php | 211 +++++++----- .../generated_code/Grpc/Testing/ServerStats.php | 151 ++++++--- .../generated_code/Grpc/Testing/ServerStatus.php | 49 +-- .../qps/generated_code/Grpc/Testing/ServerType.php | 12 +- .../Grpc/Testing/SimpleProtoParams.php | 24 +- .../generated_code/Grpc/Testing/SimpleRequest.php | 148 ++++----- .../generated_code/Grpc/Testing/SimpleResponse.php | 57 ++-- .../Grpc/Testing/StreamingInputCallRequest.php | 42 ++- .../Grpc/Testing/StreamingInputCallResponse.php | 21 +- .../Grpc/Testing/StreamingOutputCallRequest.php | 82 +++-- .../Grpc/Testing/StreamingOutputCallResponse.php | 23 +- .../tests/qps/generated_code/Grpc/Testing/Void.php | 2 +- .../Grpc/Testing/WorkerServiceClient.php | 40 +-- src/php/tests/qps/histogram.php | 93 ++++++ 60 files changed, 2375 insertions(+), 1270 deletions(-) create mode 100644 src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Core/Stats.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Core/Bucket.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Core/Histogram.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Core/Metric.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Core/Stats.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/ReportQpsScenarioServiceClient.php create mode 100644 src/php/tests/qps/histogram.php (limited to 'src/php/tests/qps') diff --git a/src/php/tests/qps/client.php b/src/php/tests/qps/client.php index a785d831b4..08904054eb 100644 --- a/src/php/tests/qps/client.php +++ b/src/php/tests/qps/client.php @@ -37,6 +37,7 @@ */ require dirname(__FILE__).'/vendor/autoload.php'; +require dirname(__FILE__).'/histogram.php'; /** * Assertion function that always exits with an error code if the assertion is @@ -63,19 +64,19 @@ function hardAssertIfStatusOk($status) } /* Start the actual client */ - -function qps_client_main($proxy_address) { - echo "Initiating php client\n"; +function qps_client_main($proxy_address, $server_ind) { + echo "[php-client] Initiating php client\n"; $proxystubopts = []; $proxystubopts['credentials'] = Grpc\ChannelCredentials::createInsecure(); $proxystub = new Grpc\Testing\ProxyClientServiceClient($proxy_address, $proxystubopts); list($config, $status) = $proxystub->GetConfig(new Grpc\Testing\Void())->wait(); hardAssertIfStatusOk($status); - hardAssert($config->getClientChannels() == 1, "Only 1 channel 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 = []; if ($config->getSecurityParams()) { @@ -93,10 +94,10 @@ function qps_client_main($proxy_address) { } else { $stubopts['credentials'] = Grpc\ChannelCredentials::createInsecure(); } - echo "Initiating php benchmarking client\n"; + echo "[php-client] Initiating php benchmarking client\n"; $stub = new Grpc\Testing\BenchmarkServiceClient( - $config->getServerTargets()[0], $stubopts); + $config->getServerTargets()[$server_ind], $stubopts); $req = new Grpc\Testing\SimpleRequest(); $req->setResponseType(Grpc\Testing\PayloadType::COMPRESSABLE); @@ -115,8 +116,11 @@ function qps_client_main($proxy_address) { } else { $poisson = false; } - $metric = new Grpc\Testing\ProxyStat; - $telemetry = $proxystub->ReportTime(); + $histogram = new Histogram($histres, $histmax); + $histogram->clean(); + $count = 0; + $histogram_result = new Grpc\Testing\HistogramData; + $telehist = $proxystub->ReportHist(); if ($config->getRpcType() == Grpc\Testing\RpcType::UNARY) { while (1) { if ($poisson) { @@ -126,8 +130,20 @@ function qps_client_main($proxy_address) { $startreq = microtime(true); list($resp,$status) = $stub->UnaryCall($req)->wait(); hardAssertIfStatusOk($status); - $metric->setLatency(microtime(true)-$startreq); - $telemetry->write($metric); + $histogram->add((microtime(true)-$startreq)*1e9); + $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 { $stream = $stub->StreamingCall(); @@ -139,8 +155,20 @@ function qps_client_main($proxy_address) { $startreq = microtime(true); $stream->write($req); $resp = $stream->read(); - $metric->setLatency(microtime(true)-$startreq); - $telemetry->write($metric); + $histogram->add((microtime(true)-$startreq)*1e9); + $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_errors', 1); error_reporting(-1); -qps_client_main($argv[1]); +qps_client_main($argv[1], $argv[2]); diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Core/Stats.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Core/Stats.php new file mode 100644 index 0000000000..f9c710cd4e --- /dev/null +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Core/Stats.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile(hex2bin( + "0a97020a1f7372632f70726f746f2f677270632f636f72652f7374617473" . + "2e70726f746f1209677270632e636f726522260a064275636b6574120d0a" . + "057374617274180120012801120d0a05636f756e74180220012804222f0a" . + "09486973746f6772616d12220a076275636b65747318012003280b32112e" . + "677270632e636f72652e4275636b6574225b0a064d6574726963120c0a04" . + "6e616d65180120012809120f0a05636f756e74180a20012804480012290a" . + "09686973746f6772616d180b2001280b32142e677270632e636f72652e48" . + "6973746f6772616d480042070a0576616c7565222b0a0553746174731222" . + "0a076d65747269637318012003280b32112e677270632e636f72652e4d65" . + "74726963620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Control.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Control.php index efca18a0cb..9b3a7529ec 100644 --- a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Control.php +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Control.php @@ -17,108 +17,119 @@ class Control \GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce(); $pool->internalAddGeneratedFile(hex2bin( - "0add170a247372632f70726f746f2f677270632f74657374696e672f636f" . - "6e74726f6c2e70726f746f120c677270632e74657374696e671a25737263" . - "2f70726f746f2f677270632f74657374696e672f7061796c6f6164732e70" . - "726f746f1a227372632f70726f746f2f677270632f74657374696e672f73" . - "746174732e70726f746f22250a0d506f6973736f6e506172616d7312140a" . - "0c6f6666657265645f6c6f616418012001280122120a10436c6f7365644c" . - "6f6f70506172616d73227b0a0a4c6f6164506172616d7312350a0b636c6f" . - "7365645f6c6f6f7018012001280b321e2e677270632e74657374696e672e" . - "436c6f7365644c6f6f70506172616d734800122e0a07706f6973736f6e18" . - "022001280b321b2e677270632e74657374696e672e506f6973736f6e5061" . - "72616d73480042060a046c6f616422430a0e536563757269747950617261" . - "6d7312130a0b7573655f746573745f6361180120012808121c0a14736572" . - "7665725f686f73745f6f76657272696465180220012809224d0a0a436861" . - "6e6e656c417267120c0a046e616d6518012001280912130a097374725f76" . - "616c7565180220012809480012130a09696e745f76616c75651803200128" . - "05480042070a0576616c756522a0040a0c436c69656e74436f6e66696712" . - "160a0e7365727665725f74617267657473180120032809122d0a0b636c69" . - "656e745f7479706518022001280e32182e677270632e74657374696e672e" . - "436c69656e745479706512350a0f73656375726974795f706172616d7318" . - "032001280b321c2e677270632e74657374696e672e536563757269747950" . - "6172616d7312240a1c6f75747374616e64696e675f727063735f7065725f" . - "6368616e6e656c18042001280512170a0f636c69656e745f6368616e6e65" . - "6c73180520012805121c0a146173796e635f636c69656e745f7468726561" . - "647318072001280512270a087270635f7479706518082001280e32152e67" . - "7270632e74657374696e672e52706354797065122d0a0b6c6f61645f7061" . - "72616d73180a2001280b32182e677270632e74657374696e672e4c6f6164" . - "506172616d7312330a0e7061796c6f61645f636f6e666967180b2001280b" . - "321b2e677270632e74657374696e672e5061796c6f6164436f6e66696712" . - "370a10686973746f6772616d5f706172616d73180c2001280b321d2e6772" . - "70632e74657374696e672e486973746f6772616d506172616d7312110a09" . - "636f72655f6c697374180d2003280512120a0a636f72655f6c696d697418" . - "0e2001280512180a106f746865725f636c69656e745f617069180f200128" . - "09122e0a0c6368616e6e656c5f6172677318102003280b32182e67727063" . - "2e74657374696e672e4368616e6e656c41726722380a0c436c69656e7453" . - "746174757312280a05737461747318012001280b32192e677270632e7465" . - "7374696e672e436c69656e74537461747322150a044d61726b120d0a0572" . - "6573657418012001280822680a0a436c69656e7441726773122b0a057365" . - "74757018012001280b321a2e677270632e74657374696e672e436c69656e" . - "74436f6e666967480012220a046d61726b18022001280b32122e67727063" . - "2e74657374696e672e4d61726b480042090a076172677479706522b4020a" . - "0c536572766572436f6e666967122d0a0b7365727665725f747970651801" . - "2001280e32182e677270632e74657374696e672e53657276657254797065" . - "12350a0f73656375726974795f706172616d7318022001280b321c2e6772" . - "70632e74657374696e672e5365637572697479506172616d73120c0a0470" . - "6f7274180420012805121c0a146173796e635f7365727665725f74687265" . - "61647318072001280512120a0a636f72655f6c696d697418082001280512" . - "330a0e7061796c6f61645f636f6e66696718092001280b321b2e67727063" . - "2e74657374696e672e5061796c6f6164436f6e66696712110a09636f7265" . - "5f6c697374180a2003280512180a106f746865725f7365727665725f6170" . - "69180b20012809121c0a137265736f757263655f71756f74615f73697a65" . - "18e9072001280522680a0a53657276657241726773122b0a057365747570" . - "18012001280b321a2e677270632e74657374696e672e536572766572436f" . - "6e666967480012220a046d61726b18022001280b32122e677270632e7465" . - "7374696e672e4d61726b480042090a076172677479706522550a0c536572" . - "76657253746174757312280a05737461747318012001280b32192e677270" . - "632e74657374696e672e5365727665725374617473120c0a04706f727418" . - "0220012805120d0a05636f726573180320012805220d0a0b436f72655265" . - "7175657374221d0a0c436f7265526573706f6e7365120d0a05636f726573" . - "18012001280522060a04566f696422fd010a085363656e6172696f120c0a" . - "046e616d6518012001280912310a0d636c69656e745f636f6e6669671802" . - "2001280b321a2e677270632e74657374696e672e436c69656e74436f6e66" . - "696712130a0b6e756d5f636c69656e747318032001280512310a0d736572" . - "7665725f636f6e66696718042001280b321a2e677270632e74657374696e" . - "672e536572766572436f6e66696712130a0b6e756d5f7365727665727318" . - "052001280512160a0e7761726d75705f7365636f6e647318062001280512" . - "190a1162656e63686d61726b5f7365636f6e647318072001280512200a18" . - "737061776e5f6c6f63616c5f776f726b65725f636f756e74180820012805" . - "22360a095363656e6172696f7312290a097363656e6172696f7318012003" . - "280b32162e677270632e74657374696e672e5363656e6172696f22f8020a" . - "155363656e6172696f526573756c7453756d6d617279120b0a0371707318" . - "0120012801121b0a137170735f7065725f7365727665725f636f72651802" . - "20012801121a0a127365727665725f73797374656d5f74696d6518032001" . - "280112180a107365727665725f757365725f74696d65180420012801121a" . - "0a12636c69656e745f73797374656d5f74696d6518052001280112180a10" . - "636c69656e745f757365725f74696d6518062001280112120a0a6c617465" . - "6e63795f353018072001280112120a0a6c6174656e63795f393018082001" . - "280112120a0a6c6174656e63795f393518092001280112120a0a6c617465" . - "6e63795f3939180a2001280112130a0b6c6174656e63795f393939180b20" . - "01280112180a107365727665725f6370755f7573616765180c2001280112" . - "260a1e7375636365737366756c5f72657175657374735f7065725f736563" . - "6f6e64180d2001280112220a1a6661696c65645f72657175657374735f70" . - "65725f7365636f6e64180e200128012283030a0e5363656e6172696f5265" . - "73756c7412280a087363656e6172696f18012001280b32162e677270632e" . - "74657374696e672e5363656e6172696f122e0a096c6174656e6369657318" . - "022001280b321b2e677270632e74657374696e672e486973746f6772616d" . - "44617461122f0a0c636c69656e745f737461747318032003280b32192e67" . - "7270632e74657374696e672e436c69656e745374617473122f0a0c736572" . - "7665725f737461747318042003280b32192e677270632e74657374696e67" . - "2e536572766572537461747312140a0c7365727665725f636f7265731805" . - "2003280512340a0773756d6d61727918062001280b32232e677270632e74" . - "657374696e672e5363656e6172696f526573756c7453756d6d6172791216" . - "0a0e636c69656e745f7375636365737318072003280812160a0e73657276" . - "65725f7375636365737318082003280812390a0f726571756573745f7265" . - "73756c747318092003280b32202e677270632e74657374696e672e526571" . - "75657374526573756c74436f756e742a410a0a436c69656e745479706512" . - "0f0a0b53594e435f434c49454e54100012100a0c4153594e435f434c4945" . - "4e54100112100a0c4f544845525f434c49454e5410022a5b0a0a53657276" . - "657254797065120f0a0b53594e435f534552564552100012100a0c415359" . - "4e435f534552564552100112180a144153594e435f47454e455249435f53" . - "4552564552100212100a0c4f544845525f53455256455210032a230a0752" . - "70635479706512090a05554e4152591000120d0a0953545245414d494e47" . - "1001620670726f746f33" + "0aa21a0a247372632f70726f746f2f677270632f74657374696e672f636f" . + "6e74726f6c2e70726f746f120c677270632e74657374696e671a22737263" . + "2f70726f746f2f677270632f74657374696e672f73746174732e70726f74" . + "6f22250a0d506f6973736f6e506172616d7312140a0c6f6666657265645f" . + "6c6f616418012001280122120a10436c6f7365644c6f6f70506172616d73" . + "227b0a0a4c6f6164506172616d7312350a0b636c6f7365645f6c6f6f7018" . + "012001280b321e2e677270632e74657374696e672e436c6f7365644c6f6f" . + "70506172616d734800122e0a07706f6973736f6e18022001280b321b2e67" . + "7270632e74657374696e672e506f6973736f6e506172616d73480042060a" . + "046c6f616422560a0e5365637572697479506172616d7312130a0b757365" . + "5f746573745f6361180120012808121c0a147365727665725f686f73745f" . + "6f7665727269646518022001280912110a09637265645f74797065180320" . + "012809224d0a0a4368616e6e656c417267120c0a046e616d651801200128" . + "0912130a097374725f76616c7565180220012809480012130a09696e745f" . + "76616c7565180320012805480042070a0576616c756522d5040a0c436c69" . + "656e74436f6e66696712160a0e7365727665725f74617267657473180120" . + "032809122d0a0b636c69656e745f7479706518022001280e32182e677270" . + "632e74657374696e672e436c69656e745479706512350a0f736563757269" . + "74795f706172616d7318032001280b321c2e677270632e74657374696e67" . + "2e5365637572697479506172616d7312240a1c6f75747374616e64696e67" . + "5f727063735f7065725f6368616e6e656c18042001280512170a0f636c69" . + "656e745f6368616e6e656c73180520012805121c0a146173796e635f636c" . + "69656e745f7468726561647318072001280512270a087270635f74797065" . + "18082001280e32152e677270632e74657374696e672e5270635479706512" . + "2d0a0b6c6f61645f706172616d73180a2001280b32182e677270632e7465" . + "7374696e672e4c6f6164506172616d7312330a0e7061796c6f61645f636f" . + "6e666967180b2001280b321b2e677270632e74657374696e672e5061796c" . + "6f6164436f6e66696712370a10686973746f6772616d5f706172616d7318" . + "0c2001280b321d2e677270632e74657374696e672e486973746f6772616d" . + "506172616d7312110a09636f72655f6c697374180d2003280512120a0a63" . + "6f72655f6c696d6974180e2001280512180a106f746865725f636c69656e" . + "745f617069180f20012809122e0a0c6368616e6e656c5f61726773181020" . + "03280b32182e677270632e74657374696e672e4368616e6e656c41726712" . + "160a0e746872656164735f7065725f6371181120012805121b0a136d6573" . + "73616765735f7065725f73747265616d18122001280522380a0c436c6965" . + "6e7453746174757312280a05737461747318012001280b32192e67727063" . + "2e74657374696e672e436c69656e74537461747322150a044d61726b120d" . + "0a05726573657418012001280822680a0a436c69656e7441726773122b0a" . + "05736574757018012001280b321a2e677270632e74657374696e672e436c" . + "69656e74436f6e666967480012220a046d61726b18022001280b32122e67" . + "7270632e74657374696e672e4d61726b480042090a076172677479706522" . + "fd020a0c536572766572436f6e666967122d0a0b7365727665725f747970" . + "6518012001280e32182e677270632e74657374696e672e53657276657254" . + "79706512350a0f73656375726974795f706172616d7318022001280b321c" . + "2e677270632e74657374696e672e5365637572697479506172616d73120c" . + "0a04706f7274180420012805121c0a146173796e635f7365727665725f74" . + "68726561647318072001280512120a0a636f72655f6c696d697418082001" . + "280512330a0e7061796c6f61645f636f6e66696718092001280b321b2e67" . + "7270632e74657374696e672e5061796c6f6164436f6e66696712110a0963" . + "6f72655f6c697374180a2003280512180a106f746865725f736572766572" . + "5f617069180b2001280912160a0e746872656164735f7065725f6371180c" . + "20012805121c0a137265736f757263655f71756f74615f73697a6518e907" . + "20012805122f0a0c6368616e6e656c5f6172677318ea072003280b32182e" . + "677270632e74657374696e672e4368616e6e656c41726722680a0a536572" . + "76657241726773122b0a05736574757018012001280b321a2e677270632e" . + "74657374696e672e536572766572436f6e666967480012220a046d61726b" . + "18022001280b32122e677270632e74657374696e672e4d61726b48004209" . + "0a076172677479706522550a0c53657276657253746174757312280a0573" . + "7461747318012001280b32192e677270632e74657374696e672e53657276" . + "65725374617473120c0a04706f7274180220012805120d0a05636f726573" . + "180320012805220d0a0b436f726552657175657374221d0a0c436f726552" . + "6573706f6e7365120d0a05636f72657318012001280522060a04566f6964" . + "22fd010a085363656e6172696f120c0a046e616d6518012001280912310a" . + "0d636c69656e745f636f6e66696718022001280b321a2e677270632e7465" . + "7374696e672e436c69656e74436f6e66696712130a0b6e756d5f636c6965" . + "6e747318032001280512310a0d7365727665725f636f6e66696718042001" . + "280b321a2e677270632e74657374696e672e536572766572436f6e666967" . + "12130a0b6e756d5f7365727665727318052001280512160a0e7761726d75" . + "705f7365636f6e647318062001280512190a1162656e63686d61726b5f73" . + "65636f6e647318072001280512200a18737061776e5f6c6f63616c5f776f" . + "726b65725f636f756e7418082001280522360a095363656e6172696f7312" . + "290a097363656e6172696f7318012003280b32162e677270632e74657374" . + "696e672e5363656e6172696f2284040a155363656e6172696f526573756c" . + "7453756d6d617279120b0a03717073180120012801121b0a137170735f70" . + "65725f7365727665725f636f7265180220012801121a0a12736572766572" . + "5f73797374656d5f74696d6518032001280112180a107365727665725f75" . + "7365725f74696d65180420012801121a0a12636c69656e745f7379737465" . + "6d5f74696d6518052001280112180a10636c69656e745f757365725f7469" . + "6d6518062001280112120a0a6c6174656e63795f35301807200128011212" . + "0a0a6c6174656e63795f393018082001280112120a0a6c6174656e63795f" . + "393518092001280112120a0a6c6174656e63795f3939180a200128011213" . + "0a0b6c6174656e63795f393939180b2001280112180a107365727665725f" . + "6370755f7573616765180c2001280112260a1e7375636365737366756c5f" . + "72657175657374735f7065725f7365636f6e64180d2001280112220a1a66" . + "61696c65645f72657175657374735f7065725f7365636f6e64180e200128" . + "0112200a18636c69656e745f706f6c6c735f7065725f7265717565737418" . + "0f2001280112200a187365727665725f706f6c6c735f7065725f72657175" . + "65737418102001280112220a1a7365727665725f717565726965735f7065" . + "725f6370755f73656318112001280112220a1a636c69656e745f71756572" . + "6965735f7065725f6370755f7365631812200128012283030a0e5363656e" . + "6172696f526573756c7412280a087363656e6172696f18012001280b3216" . + "2e677270632e74657374696e672e5363656e6172696f122e0a096c617465" . + "6e6369657318022001280b321b2e677270632e74657374696e672e486973" . + "746f6772616d44617461122f0a0c636c69656e745f737461747318032003" . + "280b32192e677270632e74657374696e672e436c69656e74537461747312" . + "2f0a0c7365727665725f737461747318042003280b32192e677270632e74" . + "657374696e672e536572766572537461747312140a0c7365727665725f63" . + "6f72657318052003280512340a0773756d6d61727918062001280b32232e" . + "677270632e74657374696e672e5363656e6172696f526573756c7453756d" . + "6d61727912160a0e636c69656e745f737563636573731807200328081216" . + "0a0e7365727665725f7375636365737318082003280812390a0f72657175" . + "6573745f726573756c747318092003280b32202e677270632e7465737469" . + "6e672e52657175657374526573756c74436f756e742a410a0a436c69656e" . + "7454797065120f0a0b53594e435f434c49454e54100012100a0c4153594e" . + "435f434c49454e54100112100a0c4f544845525f434c49454e5410022a5b" . + "0a0a53657276657254797065120f0a0b53594e435f534552564552100012" . + "100a0c4153594e435f534552564552100112180a144153594e435f47454e" . + "455249435f534552564552100212100a0c4f544845525f53455256455210" . + "032a720a075270635479706512090a05554e4152591000120d0a09535452" . + "45414d494e47100112190a1553545245414d494e475f46524f4d5f434c49" . + "454e54100212190a1553545245414d494e475f46524f4d5f534552564552" . + "100312170a1353545245414d494e475f424f54485f574159531004620670" . + "726f746f33" )); static::$is_initialized = true; diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/ProxyService.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/ProxyService.php index e35944e1d8..e07f73679e 100644 --- a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/ProxyService.php +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/ProxyService.php @@ -15,17 +15,20 @@ class ProxyService return; } \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); + \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce(); $pool->internalAddGeneratedFile(hex2bin( - "0a97020a2a7372632f70726f746f2f677270632f74657374696e672f7072" . + "0ad6020a2a7372632f70726f746f2f677270632f74657374696e672f7072" . "6f78792d736572766963652e70726f746f120c677270632e74657374696e" . - "671a247372632f70726f746f2f677270632f74657374696e672f636f6e74" . - "726f6c2e70726f746f221c0a0950726f787953746174120f0a076c617465" . - "6e6379180120012801328e010a1250726f7879436c69656e745365727669" . - "6365123b0a09476574436f6e66696712122e677270632e74657374696e67" . - "2e566f69641a1a2e677270632e74657374696e672e436c69656e74436f6e" . - "666967123b0a0a5265706f727454696d6512172e677270632e7465737469" . - "6e672e50726f7879537461741a122e677270632e74657374696e672e566f" . - "69642801620670726f746f33" + "671a227372632f70726f746f2f677270632f74657374696e672f73746174" . + "732e70726f746f221c0a0950726f787953746174120f0a076c6174656e63" . + "7918012001280132cf010a1250726f7879436c69656e7453657276696365" . + "123b0a09476574436f6e66696712122e677270632e74657374696e672e56" . + "6f69641a1a2e677270632e74657374696e672e436c69656e74436f6e6669" . + "67123b0a0a5265706f727454696d6512172e677270632e74657374696e67" . + "2e50726f7879537461741a122e677270632e74657374696e672e566f6964" . + "2801123f0a0a5265706f727448697374121b2e677270632e74657374696e" . + "672e486973746f6772616d446174611a122e677270632e74657374696e67" . + "2e566f69642801620670726f746f33" )); static::$is_initialized = true; diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Services.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Services.php index 7a9439a5b9..e4029182c7 100644 --- a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Services.php +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Services.php @@ -16,27 +16,40 @@ class Services } \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); + \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce(); $pool->internalAddGeneratedFile(hex2bin( - "0ad1040a257372632f70726f746f2f677270632f74657374696e672f7365" . - "7276696365732e70726f746f120c677270632e74657374696e671a257372" . - "632f70726f746f2f677270632f74657374696e672f6d657373616765732e" . - "70726f746f1a247372632f70726f746f2f677270632f74657374696e672f" . - "636f6e74726f6c2e70726f746f32aa010a1042656e63686d61726b536572" . - "7669636512460a09556e61727943616c6c121b2e677270632e7465737469" . - "6e672e53696d706c65526571756573741a1c2e677270632e74657374696e" . - "672e53696d706c65526573706f6e7365124e0a0d53747265616d696e6743" . - "616c6c121b2e677270632e74657374696e672e53696d706c655265717565" . - "73741a1c2e677270632e74657374696e672e53696d706c65526573706f6e" . - "7365280130013297020a0d576f726b65725365727669636512450a095275" . - "6e53657276657212182e677270632e74657374696e672e53657276657241" . - "7267731a1a2e677270632e74657374696e672e5365727665725374617475" . - "732801300112450a0952756e436c69656e7412182e677270632e74657374" . - "696e672e436c69656e74417267731a1a2e677270632e74657374696e672e" . - "436c69656e745374617475732801300112420a09436f7265436f756e7412" . - "192e677270632e74657374696e672e436f7265526571756573741a1a2e67" . - "7270632e74657374696e672e436f7265526573706f6e736512340a0a5175" . - "6974576f726b657212122e677270632e74657374696e672e566f69641a12" . - "2e677270632e74657374696e672e566f6964620670726f746f33" + "0aaa070a257372632f70726f746f2f677270632f74657374696e672f7365" . + "7276696365732e70726f746f120c677270632e74657374696e671a247372" . + "632f70726f746f2f677270632f74657374696e672f636f6e74726f6c2e70" . + "726f746f1a227372632f70726f746f2f677270632f74657374696e672f73" . + "746174732e70726f746f32a6030a1042656e63686d61726b536572766963" . + "6512460a09556e61727943616c6c121b2e677270632e74657374696e672e" . + "53696d706c65526571756573741a1c2e677270632e74657374696e672e53" . + "696d706c65526573706f6e7365124e0a0d53747265616d696e6743616c6c" . + "121b2e677270632e74657374696e672e53696d706c65526571756573741a" . + "1c2e677270632e74657374696e672e53696d706c65526573706f6e736528" . + "01300112520a1353747265616d696e6746726f6d436c69656e74121b2e67" . + "7270632e74657374696e672e53696d706c65526571756573741a1c2e6772" . + "70632e74657374696e672e53696d706c65526573706f6e7365280112520a" . + "1353747265616d696e6746726f6d536572766572121b2e677270632e7465" . + "7374696e672e53696d706c65526571756573741a1c2e677270632e746573" . + "74696e672e53696d706c65526573706f6e7365300112520a115374726561" . + "6d696e67426f746857617973121b2e677270632e74657374696e672e5369" . + "6d706c65526571756573741a1c2e677270632e74657374696e672e53696d" . + "706c65526573706f6e7365280130013297020a0d576f726b657253657276" . + "69636512450a0952756e53657276657212182e677270632e74657374696e" . + "672e536572766572417267731a1a2e677270632e74657374696e672e5365" . + "727665725374617475732801300112450a0952756e436c69656e7412182e" . + "677270632e74657374696e672e436c69656e74417267731a1a2e67727063" . + "2e74657374696e672e436c69656e745374617475732801300112420a0943" . + "6f7265436f756e7412192e677270632e74657374696e672e436f72655265" . + "71756573741a1a2e677270632e74657374696e672e436f7265526573706f" . + "6e736512340a0a51756974576f726b657212122e677270632e7465737469" . + "6e672e566f69641a122e677270632e74657374696e672e566f6964325e0a" . + "185265706f72745170735363656e6172696f5365727669636512420a0e52" . + "65706f72745363656e6172696f121c2e677270632e74657374696e672e53" . + "63656e6172696f526573756c741a122e677270632e74657374696e672e56" . + "6f6964620670726f746f33" )); static::$is_initialized = true; diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Stats.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Stats.php index 99c0000a52..3d23b75dfa 100644 --- a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Stats.php +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Stats.php @@ -14,28 +14,33 @@ class Stats if (static::$is_initialized == true) { return; } + \GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce(); $pool->internalAddGeneratedFile(hex2bin( - "0adf040a227372632f70726f746f2f677270632f74657374696e672f7374" . - "6174732e70726f746f120c677270632e74657374696e67227a0a0b536572" . - "766572537461747312140a0c74696d655f656c6170736564180120012801" . - "12110a0974696d655f7573657218022001280112130a0b74696d655f7379" . - "7374656d18032001280112160a0e746f74616c5f6370755f74696d651804" . - "2001280412150a0d69646c655f6370755f74696d65180520012804223b0a" . - "0f486973746f6772616d506172616d7312120a0a7265736f6c7574696f6e" . - "18012001280112140a0c6d61785f706f737369626c651802200128012277" . - "0a0d486973746f6772616d44617461120e0a066275636b65741801200328" . - "0d12100a086d696e5f7365656e18022001280112100a086d61785f736565" . - "6e180320012801120b0a0373756d18042001280112160a0e73756d5f6f66" . - "5f73717561726573180520012801120d0a05636f756e7418062001280122" . - "380a1252657175657374526573756c74436f756e7412130a0b7374617475" . - "735f636f6465180120012805120d0a05636f756e7418022001280322b601" . - "0a0b436c69656e745374617473122e0a096c6174656e6369657318012001" . - "280b321b2e677270632e74657374696e672e486973746f6772616d446174" . - "6112140a0c74696d655f656c617073656418022001280112110a0974696d" . - "655f7573657218032001280112130a0b74696d655f73797374656d180420" . - "01280112390a0f726571756573745f726573756c747318052003280b3220" . - "2e677270632e74657374696e672e52657175657374526573756c74436f75" . - "6e74620670726f746f33" + "0ada050a227372632f70726f746f2f677270632f74657374696e672f7374" . + "6174732e70726f746f120c677270632e74657374696e6722b7010a0b5365" . + "72766572537461747312140a0c74696d655f656c61707365641801200128" . + "0112110a0974696d655f7573657218022001280112130a0b74696d655f73" . + "797374656d18032001280112160a0e746f74616c5f6370755f74696d6518" . + "042001280412150a0d69646c655f6370755f74696d651805200128041215" . + "0a0d63715f706f6c6c5f636f756e7418062001280412240a0a636f72655f" . + "737461747318072001280b32102e677270632e636f72652e537461747322" . + "3b0a0f486973746f6772616d506172616d7312120a0a7265736f6c757469" . + "6f6e18012001280112140a0c6d61785f706f737369626c65180220012801" . + "22770a0d486973746f6772616d44617461120e0a066275636b6574180120" . + "03280d12100a086d696e5f7365656e18022001280112100a086d61785f73" . + "65656e180320012801120b0a0373756d18042001280112160a0e73756d5f" . + "6f665f73717561726573180520012801120d0a05636f756e741806200128" . + "0122380a1252657175657374526573756c74436f756e7412130a0b737461" . + "7475735f636f6465180120012805120d0a05636f756e7418022001280322" . + "f3010a0b436c69656e745374617473122e0a096c6174656e636965731801" . + "2001280b321b2e677270632e74657374696e672e486973746f6772616d44" . + "61746112140a0c74696d655f656c617073656418022001280112110a0974" . + "696d655f7573657218032001280112130a0b74696d655f73797374656d18" . + "042001280112390a0f726571756573745f726573756c747318052003280b" . + "32202e677270632e74657374696e672e52657175657374526573756c7443" . + "6f756e7412150a0d63715f706f6c6c5f636f756e7418062001280412240a" . + "0a636f72655f737461747318072001280b32102e677270632e636f72652e" . + "5374617473620670726f746f33" )); static::$is_initialized = true; diff --git a/src/php/tests/qps/generated_code/Grpc/Core/Bucket.php b/src/php/tests/qps/generated_code/Grpc/Core/Bucket.php new file mode 100644 index 0000000000..897d6271c2 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Core/Bucket.php @@ -0,0 +1,75 @@ +grpc.core.Bucket + */ +class Bucket extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field double start = 1; + */ + private $start = 0.0; + /** + * Generated from protobuf field uint64 count = 2; + */ + private $count = 0; + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field double start = 1; + * @return float + */ + public function getStart() + { + return $this->start; + } + + /** + * Generated from protobuf field double start = 1; + * @param float $var + * @return $this + */ + public function setStart($var) + { + GPBUtil::checkDouble($var); + $this->start = $var; + + return $this; + } + + /** + * Generated from protobuf field uint64 count = 2; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Generated from protobuf field uint64 count = 2; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkUint64($var); + $this->count = $var; + + return $this; + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Core/Histogram.php b/src/php/tests/qps/generated_code/Grpc/Core/Histogram.php new file mode 100644 index 0000000000..1902be8e4a --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Core/Histogram.php @@ -0,0 +1,49 @@ +grpc.core.Histogram + */ +class Histogram extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .grpc.core.Bucket buckets = 1; + */ + private $buckets; + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field repeated .grpc.core.Bucket buckets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBuckets() + { + return $this->buckets; + } + + /** + * Generated from protobuf field repeated .grpc.core.Bucket buckets = 1; + * @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; + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Core/Metric.php b/src/php/tests/qps/generated_code/Grpc/Core/Metric.php new file mode 100644 index 0000000000..c3581b7d21 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Core/Metric.php @@ -0,0 +1,102 @@ +grpc.core.Metric + */ +class Metric extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1; + */ + private $name = ''; + protected $value; + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Generated from protobuf field uint64 count = 10; + * @return int|string + */ + public function getCount() + { + return $this->readOneof(10); + } + + /** + * Generated from protobuf field uint64 count = 10; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkUint64($var); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Generated from protobuf field .grpc.core.Histogram histogram = 11; + * @return \Grpc\Core\Histogram + */ + public function getHistogram() + { + return $this->readOneof(11); + } + + /** + * Generated from protobuf field .grpc.core.Histogram histogram = 11; + * @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"); + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Core/Stats.php b/src/php/tests/qps/generated_code/Grpc/Core/Stats.php new file mode 100644 index 0000000000..e6f3fb0899 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Core/Stats.php @@ -0,0 +1,49 @@ +grpc.core.Stats + */ +class Stats extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .grpc.core.Metric metrics = 1; + */ + private $metrics; + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field repeated .grpc.core.Metric metrics = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetrics() + { + return $this->metrics; + } + + /** + * Generated from protobuf field repeated .grpc.core.Metric metrics = 1; + * @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; + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/BenchmarkServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/BenchmarkServiceClient.php index ddf750a94f..fa3e147909 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/BenchmarkServiceClient.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/BenchmarkServiceClient.php @@ -18,17 +18,19 @@ // // An integration test service that covers all the method signature permutations // 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 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) { - parent::__construct($hostname, $opts, $channel); + parent::__construct($hostname, $opts, $channel); } /** @@ -40,24 +42,62 @@ namespace Grpc\Testing { */ public function UnaryCall(\Grpc\Testing\SimpleRequest $argument, $metadata = [], $options = []) { - return $this->_simpleRequest('/grpc.testing.BenchmarkService/UnaryCall', - $argument, - ['\Grpc\Testing\SimpleResponse', 'decode'], - $metadata, $options); + return $this->_simpleRequest('/grpc.testing.BenchmarkService/UnaryCall', + $argument, + ['\Grpc\Testing\SimpleResponse', 'decode'], + $metadata, $options); } /** - * One request followed by one response. - * The server returns the client payload as-is. + * Repeated sequence of one request followed by one response. + * Should be called streaming ping-pong + * The server returns the client payload as-is on each response * @param array $metadata metadata * @param array $options call options */ public function StreamingCall($metadata = [], $options = []) { - return $this->_bidiRequest('/grpc.testing.BenchmarkService/StreamingCall', - ['\Grpc\Testing\SimpleResponse','decode'], - $metadata, $options); + return $this->_bidiRequest('/grpc.testing.BenchmarkService/StreamingCall', + ['\Grpc\Testing\SimpleResponse','decode'], + $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); + } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/BoolValue.php b/src/php/tests/qps/generated_code/Grpc/Testing/BoolValue.php index f0497accfb..7eb364b7a0 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/BoolValue.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/BoolValue.php @@ -9,22 +9,18 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * TODO(dgq): Go back to using well-known types once
  * https://github.com/grpc/grpc/issues/6980 has been fixed.
  * import "google/protobuf/wrappers.proto";
- * 
* - * Protobuf type grpc.testing.BoolValue + * Generated from protobuf message grpc.testing.BoolValue */ class BoolValue extends \Google\Protobuf\Internal\Message { /** - *
      * The bool value.
-     * 
* - * bool value = 1; + * Generated from protobuf field bool value = 1; */ private $value = false; @@ -34,11 +30,10 @@ class BoolValue extends \Google\Protobuf\Internal\Message } /** - *
      * The bool value.
-     * 
* - * bool value = 1; + * Generated from protobuf field bool value = 1; + * @return bool */ public function getValue() { @@ -46,16 +41,18 @@ class BoolValue extends \Google\Protobuf\Internal\Message } /** - *
      * The bool value.
-     * 
* - * bool value = 1; + * Generated from protobuf field bool value = 1; + * @param bool $var + * @return $this */ public function setValue($var) { GPBUtil::checkBool($var); $this->value = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ByteBufferParams.php b/src/php/tests/qps/generated_code/Grpc/Testing/ByteBufferParams.php index 0057d38748..0511026ba7 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ByteBufferParams.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ByteBufferParams.php @@ -9,16 +9,16 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.ByteBufferParams + * Generated from protobuf message grpc.testing.ByteBufferParams */ class ByteBufferParams extends \Google\Protobuf\Internal\Message { /** - * int32 req_size = 1; + * Generated from protobuf field int32 req_size = 1; */ private $req_size = 0; /** - * int32 resp_size = 2; + * Generated from protobuf field int32 resp_size = 2; */ private $resp_size = 0; @@ -28,7 +28,8 @@ class ByteBufferParams extends \Google\Protobuf\Internal\Message } /** - * int32 req_size = 1; + * Generated from protobuf field int32 req_size = 1; + * @return int */ public function getReqSize() { @@ -36,16 +37,21 @@ class ByteBufferParams extends \Google\Protobuf\Internal\Message } /** - * int32 req_size = 1; + * Generated from protobuf field int32 req_size = 1; + * @param int $var + * @return $this */ public function setReqSize($var) { GPBUtil::checkInt32($var); $this->req_size = $var; + + return $this; } /** - * int32 resp_size = 2; + * Generated from protobuf field int32 resp_size = 2; + * @return int */ public function getRespSize() { @@ -53,12 +59,16 @@ class ByteBufferParams extends \Google\Protobuf\Internal\Message } /** - * int32 resp_size = 2; + * Generated from protobuf field int32 resp_size = 2; + * @param int $var + * @return $this */ public function setRespSize($var) { GPBUtil::checkInt32($var); $this->resp_size = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ChannelArg.php b/src/php/tests/qps/generated_code/Grpc/Testing/ChannelArg.php index d2fe3ae5ff..5c5fb861a4 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ChannelArg.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ChannelArg.php @@ -9,12 +9,12 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.ChannelArg + * Generated from protobuf message grpc.testing.ChannelArg */ class ChannelArg extends \Google\Protobuf\Internal\Message { /** - * string name = 1; + * Generated from protobuf field string name = 1; */ private $name = ''; protected $value; @@ -25,7 +25,8 @@ class ChannelArg extends \Google\Protobuf\Internal\Message } /** - * string name = 1; + * Generated from protobuf field string name = 1; + * @return string */ public function getName() { @@ -33,16 +34,21 @@ class ChannelArg extends \Google\Protobuf\Internal\Message } /** - * string name = 1; + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this */ public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; + + return $this; } /** - * string str_value = 2; + * Generated from protobuf field string str_value = 2; + * @return string */ public function getStrValue() { @@ -50,16 +56,21 @@ class ChannelArg extends \Google\Protobuf\Internal\Message } /** - * string str_value = 2; + * Generated from protobuf field string str_value = 2; + * @param string $var + * @return $this */ public function setStrValue($var) { GPBUtil::checkString($var, True); $this->writeOneof(2, $var); + + return $this; } /** - * int32 int_value = 3; + * Generated from protobuf field int32 int_value = 3; + * @return int */ public function getIntValue() { @@ -67,14 +78,21 @@ class ChannelArg extends \Google\Protobuf\Internal\Message } /** - * int32 int_value = 3; + * Generated from protobuf field int32 int_value = 3; + * @param int $var + * @return $this */ public function setIntValue($var) { GPBUtil::checkInt32($var); $this->writeOneof(3, $var); + + return $this; } + /** + * @return string + */ public function getValue() { return $this->whichOneof("value"); diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ClientArgs.php b/src/php/tests/qps/generated_code/Grpc/Testing/ClientArgs.php index c878c5a7bc..ee3fd46f0f 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ClientArgs.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ClientArgs.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.ClientArgs + * Generated from protobuf message grpc.testing.ClientArgs */ class ClientArgs extends \Google\Protobuf\Internal\Message { @@ -21,7 +21,8 @@ class ClientArgs extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ClientConfig setup = 1; + * Generated from protobuf field .grpc.testing.ClientConfig setup = 1; + * @return \Grpc\Testing\ClientConfig */ public function getSetup() { @@ -29,16 +30,21 @@ class ClientArgs extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ClientConfig setup = 1; + * Generated from protobuf field .grpc.testing.ClientConfig setup = 1; + * @param \Grpc\Testing\ClientConfig $var + * @return $this */ - public function setSetup(&$var) + public function setSetup($var) { GPBUtil::checkMessage($var, \Grpc\Testing\ClientConfig::class); $this->writeOneof(1, $var); + + return $this; } /** - * .grpc.testing.Mark mark = 2; + * Generated from protobuf field .grpc.testing.Mark mark = 2; + * @return \Grpc\Testing\Mark */ public function getMark() { @@ -46,14 +52,21 @@ class ClientArgs extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.Mark mark = 2; + * Generated from protobuf field .grpc.testing.Mark mark = 2; + * @param \Grpc\Testing\Mark $var + * @return $this */ - public function setMark(&$var) + public function setMark($var) { GPBUtil::checkMessage($var, \Grpc\Testing\Mark::class); $this->writeOneof(2, $var); + + return $this; } + /** + * @return string + */ public function getArgtype() { return $this->whichOneof("argtype"); diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ClientConfig.php b/src/php/tests/qps/generated_code/Grpc/Testing/ClientConfig.php index 52d6a75fb0..f7bc21587c 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ClientConfig.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ClientConfig.php @@ -9,96 +9,94 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.ClientConfig + * Generated from protobuf message grpc.testing.ClientConfig */ class ClientConfig extends \Google\Protobuf\Internal\Message { /** - *
      * List of targets to connect to. At least one target needs to be specified.
-     * 
* - * repeated string server_targets = 1; + * Generated from protobuf field repeated string server_targets = 1; */ private $server_targets; /** - * .grpc.testing.ClientType client_type = 2; + * Generated from protobuf field .grpc.testing.ClientType client_type = 2; */ private $client_type = 0; /** - * .grpc.testing.SecurityParams security_params = 3; + * Generated from protobuf field .grpc.testing.SecurityParams security_params = 3; */ private $security_params = null; /** - *
      * How many concurrent RPCs to start for each channel.
      * For synchronous client, use a separate thread for each outstanding RPC.
-     * 
* - * int32 outstanding_rpcs_per_channel = 4; + * Generated from protobuf field int32 outstanding_rpcs_per_channel = 4; */ private $outstanding_rpcs_per_channel = 0; /** - *
      * Number of independent client channels to create.
      * i-th channel will connect to server_target[i % server_targets.size()]
-     * 
* - * int32 client_channels = 5; + * Generated from protobuf field int32 client_channels = 5; */ private $client_channels = 0; /** - *
      * Only for async client. Number of threads to use to start/manage RPCs.
-     * 
* - * int32 async_client_threads = 7; + * Generated from protobuf field int32 async_client_threads = 7; */ private $async_client_threads = 0; /** - * .grpc.testing.RpcType rpc_type = 8; + * Generated from protobuf field .grpc.testing.RpcType rpc_type = 8; */ private $rpc_type = 0; /** - *
      * The requested load for the entire client (aggregated over all the threads).
-     * 
* - * .grpc.testing.LoadParams load_params = 10; + * Generated from protobuf field .grpc.testing.LoadParams load_params = 10; */ private $load_params = null; /** - * .grpc.testing.PayloadConfig payload_config = 11; + * Generated from protobuf field .grpc.testing.PayloadConfig payload_config = 11; */ private $payload_config = null; /** - * .grpc.testing.HistogramParams histogram_params = 12; + * Generated from protobuf field .grpc.testing.HistogramParams histogram_params = 12; */ private $histogram_params = null; /** - *
      * Specify the cores we should run the client on, if desired
-     * 
* - * repeated int32 core_list = 13; + * Generated from protobuf field repeated int32 core_list = 13; */ private $core_list; /** - * int32 core_limit = 14; + * Generated from protobuf field int32 core_limit = 14; */ private $core_limit = 0; /** - *
      * If we use an OTHER_CLIENT client_type, this string gives more detail
-     * 
* - * string other_client_api = 15; + * Generated from protobuf field string other_client_api = 15; */ private $other_client_api = ''; /** - * repeated .grpc.testing.ChannelArg channel_args = 16; + * Generated from protobuf field repeated .grpc.testing.ChannelArg channel_args = 16; */ private $channel_args; + /** + * Number of threads that share each completion queue + * + * Generated from protobuf field int32 threads_per_cq = 17; + */ + private $threads_per_cq = 0; + /** + * Number of messages on a stream before it gets finished/restarted + * + * Generated from protobuf field int32 messages_per_stream = 18; + */ + private $messages_per_stream = 0; public function __construct() { \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); @@ -106,11 +104,10 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - *
      * List of targets to connect to. At least one target needs to be specified.
-     * 
* - * repeated string server_targets = 1; + * Generated from protobuf field repeated string server_targets = 1; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getServerTargets() { @@ -118,20 +115,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - *
      * List of targets to connect to. At least one target needs to be specified.
-     * 
* - * repeated string server_targets = 1; + * Generated from protobuf field repeated string server_targets = 1; + * @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); - $this->server_targets = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->server_targets = $arr; + + return $this; } /** - * .grpc.testing.ClientType client_type = 2; + * Generated from protobuf field .grpc.testing.ClientType client_type = 2; + * @return int */ public function getClientType() { @@ -139,16 +139,21 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ClientType client_type = 2; + * Generated from protobuf field .grpc.testing.ClientType client_type = 2; + * @param int $var + * @return $this */ public function setClientType($var) { GPBUtil::checkEnum($var, \Grpc\Testing\ClientType::class); $this->client_type = $var; + + return $this; } /** - * .grpc.testing.SecurityParams security_params = 3; + * Generated from protobuf field .grpc.testing.SecurityParams security_params = 3; + * @return \Grpc\Testing\SecurityParams */ public function getSecurityParams() { @@ -156,21 +161,24 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.SecurityParams security_params = 3; + * Generated from protobuf field .grpc.testing.SecurityParams security_params = 3; + * @param \Grpc\Testing\SecurityParams $var + * @return $this */ - public function setSecurityParams(&$var) + public function setSecurityParams($var) { GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class); $this->security_params = $var; + + return $this; } /** - *
      * How many concurrent RPCs to start for each channel.
      * For synchronous client, use a separate thread for each outstanding RPC.
-     * 
* - * int32 outstanding_rpcs_per_channel = 4; + * Generated from protobuf field int32 outstanding_rpcs_per_channel = 4; + * @return int */ public function getOutstandingRpcsPerChannel() { @@ -178,26 +186,27 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - *
      * How many concurrent RPCs to start for each channel.
      * For synchronous client, use a separate thread for each outstanding RPC.
-     * 
* - * int32 outstanding_rpcs_per_channel = 4; + * Generated from protobuf field int32 outstanding_rpcs_per_channel = 4; + * @param int $var + * @return $this */ public function setOutstandingRpcsPerChannel($var) { GPBUtil::checkInt32($var); $this->outstanding_rpcs_per_channel = $var; + + return $this; } /** - *
      * Number of independent client channels to create.
      * i-th channel will connect to server_target[i % server_targets.size()]
-     * 
* - * int32 client_channels = 5; + * Generated from protobuf field int32 client_channels = 5; + * @return int */ public function getClientChannels() { @@ -205,25 +214,26 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - *
      * Number of independent client channels to create.
      * i-th channel will connect to server_target[i % server_targets.size()]
-     * 
* - * int32 client_channels = 5; + * Generated from protobuf field int32 client_channels = 5; + * @param int $var + * @return $this */ public function setClientChannels($var) { GPBUtil::checkInt32($var); $this->client_channels = $var; + + return $this; } /** - *
      * Only for async client. Number of threads to use to start/manage RPCs.
-     * 
* - * int32 async_client_threads = 7; + * Generated from protobuf field int32 async_client_threads = 7; + * @return int */ public function getAsyncClientThreads() { @@ -231,20 +241,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - *
      * Only for async client. Number of threads to use to start/manage RPCs.
-     * 
* - * int32 async_client_threads = 7; + * Generated from protobuf field int32 async_client_threads = 7; + * @param int $var + * @return $this */ public function setAsyncClientThreads($var) { GPBUtil::checkInt32($var); $this->async_client_threads = $var; + + return $this; } /** - * .grpc.testing.RpcType rpc_type = 8; + * Generated from protobuf field .grpc.testing.RpcType rpc_type = 8; + * @return int */ public function getRpcType() { @@ -252,20 +265,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.RpcType rpc_type = 8; + * Generated from protobuf field .grpc.testing.RpcType rpc_type = 8; + * @param int $var + * @return $this */ public function setRpcType($var) { GPBUtil::checkEnum($var, \Grpc\Testing\RpcType::class); $this->rpc_type = $var; + + return $this; } /** - *
      * The requested load for the entire client (aggregated over all the threads).
-     * 
* - * .grpc.testing.LoadParams load_params = 10; + * Generated from protobuf field .grpc.testing.LoadParams load_params = 10; + * @return \Grpc\Testing\LoadParams */ public function getLoadParams() { @@ -273,20 +289,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - *
      * The requested load for the entire client (aggregated over all the threads).
-     * 
* - * .grpc.testing.LoadParams load_params = 10; + * Generated from protobuf field .grpc.testing.LoadParams load_params = 10; + * @param \Grpc\Testing\LoadParams $var + * @return $this */ - public function setLoadParams(&$var) + public function setLoadParams($var) { GPBUtil::checkMessage($var, \Grpc\Testing\LoadParams::class); $this->load_params = $var; + + return $this; } /** - * .grpc.testing.PayloadConfig payload_config = 11; + * Generated from protobuf field .grpc.testing.PayloadConfig payload_config = 11; + * @return \Grpc\Testing\PayloadConfig */ public function getPayloadConfig() { @@ -294,16 +313,21 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.PayloadConfig payload_config = 11; + * Generated from protobuf field .grpc.testing.PayloadConfig payload_config = 11; + * @param \Grpc\Testing\PayloadConfig $var + * @return $this */ - public function setPayloadConfig(&$var) + public function setPayloadConfig($var) { GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class); $this->payload_config = $var; + + return $this; } /** - * .grpc.testing.HistogramParams histogram_params = 12; + * Generated from protobuf field .grpc.testing.HistogramParams histogram_params = 12; + * @return \Grpc\Testing\HistogramParams */ public function getHistogramParams() { @@ -311,20 +335,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.HistogramParams histogram_params = 12; + * Generated from protobuf field .grpc.testing.HistogramParams histogram_params = 12; + * @param \Grpc\Testing\HistogramParams $var + * @return $this */ - public function setHistogramParams(&$var) + public function setHistogramParams($var) { GPBUtil::checkMessage($var, \Grpc\Testing\HistogramParams::class); $this->histogram_params = $var; + + return $this; } /** - *
      * Specify the cores we should run the client on, if desired
-     * 
* - * repeated int32 core_list = 13; + * Generated from protobuf field repeated int32 core_list = 13; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getCoreList() { @@ -332,20 +359,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - *
      * Specify the cores we should run the client on, if desired
-     * 
* - * repeated int32 core_list = 13; + * Generated from protobuf field repeated int32 core_list = 13; + * @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); - $this->core_list = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->core_list = $arr; + + return $this; } /** - * int32 core_limit = 14; + * Generated from protobuf field int32 core_limit = 14; + * @return int */ public function getCoreLimit() { @@ -353,20 +383,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - * int32 core_limit = 14; + * Generated from protobuf field int32 core_limit = 14; + * @param int $var + * @return $this */ public function setCoreLimit($var) { GPBUtil::checkInt32($var); $this->core_limit = $var; + + return $this; } /** - *
      * If we use an OTHER_CLIENT client_type, this string gives more detail
-     * 
* - * string other_client_api = 15; + * Generated from protobuf field string other_client_api = 15; + * @return string */ public function getOtherClientApi() { @@ -374,20 +407,23 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - *
      * If we use an OTHER_CLIENT client_type, this string gives more detail
-     * 
* - * string other_client_api = 15; + * Generated from protobuf field string other_client_api = 15; + * @param string $var + * @return $this */ public function setOtherClientApi($var) { GPBUtil::checkString($var, True); $this->other_client_api = $var; + + return $this; } /** - * repeated .grpc.testing.ChannelArg channel_args = 16; + * Generated from protobuf field repeated .grpc.testing.ChannelArg channel_args = 16; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getChannelArgs() { @@ -395,12 +431,68 @@ class ClientConfig extends \Google\Protobuf\Internal\Message } /** - * repeated .grpc.testing.ChannelArg channel_args = 16; + * Generated from protobuf field repeated .grpc.testing.ChannelArg channel_args = 16; + * @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 int32 threads_per_cq = 17; + * @return int + */ + public function getThreadsPerCq() + { + return $this->threads_per_cq; + } + + /** + * Number of threads that share each completion queue + * + * Generated from protobuf field int32 threads_per_cq = 17; + * @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 int32 messages_per_stream = 18; + * @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 int32 messages_per_stream = 18; + * @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); - $this->channel_args = $var; + GPBUtil::checkInt32($var); + $this->messages_per_stream = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ClientStats.php b/src/php/tests/qps/generated_code/Grpc/Testing/ClientStats.php index 8b9a0c33a4..f2a7621791 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ClientStats.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ClientStats.php @@ -9,42 +9,48 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.ClientStats + * Generated from protobuf message grpc.testing.ClientStats */ class ClientStats extends \Google\Protobuf\Internal\Message { /** - *
      * Latency histogram. Data points are in nanoseconds.
-     * 
* - * .grpc.testing.HistogramData latencies = 1; + * Generated from protobuf field .grpc.testing.HistogramData latencies = 1; */ private $latencies = null; /** - *
      * See ServerStats for details.
-     * 
* - * double time_elapsed = 2; + * Generated from protobuf field double time_elapsed = 2; */ private $time_elapsed = 0.0; /** - * double time_user = 3; + * Generated from protobuf field double time_user = 3; */ private $time_user = 0.0; /** - * double time_system = 4; + * Generated from protobuf field double time_system = 4; */ private $time_system = 0.0; /** - *
      * Number of failed requests (one row per status code seen)
-     * 
* - * repeated .grpc.testing.RequestResultCount request_results = 5; + * Generated from protobuf field repeated .grpc.testing.RequestResultCount request_results = 5; */ private $request_results; + /** + * Number of polls called inside completion queue + * + * Generated from protobuf field uint64 cq_poll_count = 6; + */ + private $cq_poll_count = 0; + /** + * Core library stats + * + * Generated from protobuf field .grpc.core.Stats core_stats = 7; + */ + private $core_stats = null; public function __construct() { \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce(); @@ -52,11 +58,10 @@ class ClientStats extends \Google\Protobuf\Internal\Message } /** - *
      * Latency histogram. Data points are in nanoseconds.
-     * 
* - * .grpc.testing.HistogramData latencies = 1; + * Generated from protobuf field .grpc.testing.HistogramData latencies = 1; + * @return \Grpc\Testing\HistogramData */ public function getLatencies() { @@ -64,24 +69,25 @@ class ClientStats extends \Google\Protobuf\Internal\Message } /** - *
      * Latency histogram. Data points are in nanoseconds.
-     * 
* - * .grpc.testing.HistogramData latencies = 1; + * Generated from protobuf field .grpc.testing.HistogramData latencies = 1; + * @param \Grpc\Testing\HistogramData $var + * @return $this */ - public function setLatencies(&$var) + public function setLatencies($var) { GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class); $this->latencies = $var; + + return $this; } /** - *
      * See ServerStats for details.
-     * 
* - * double time_elapsed = 2; + * Generated from protobuf field double time_elapsed = 2; + * @return float */ public function getTimeElapsed() { @@ -89,20 +95,23 @@ class ClientStats extends \Google\Protobuf\Internal\Message } /** - *
      * See ServerStats for details.
-     * 
* - * double time_elapsed = 2; + * Generated from protobuf field double time_elapsed = 2; + * @param float $var + * @return $this */ public function setTimeElapsed($var) { GPBUtil::checkDouble($var); $this->time_elapsed = $var; + + return $this; } /** - * double time_user = 3; + * Generated from protobuf field double time_user = 3; + * @return float */ public function getTimeUser() { @@ -110,16 +119,21 @@ class ClientStats extends \Google\Protobuf\Internal\Message } /** - * double time_user = 3; + * Generated from protobuf field double time_user = 3; + * @param float $var + * @return $this */ public function setTimeUser($var) { GPBUtil::checkDouble($var); $this->time_user = $var; + + return $this; } /** - * double time_system = 4; + * Generated from protobuf field double time_system = 4; + * @return float */ public function getTimeSystem() { @@ -127,20 +141,23 @@ class ClientStats extends \Google\Protobuf\Internal\Message } /** - * double time_system = 4; + * Generated from protobuf field double time_system = 4; + * @param float $var + * @return $this */ public function setTimeSystem($var) { GPBUtil::checkDouble($var); $this->time_system = $var; + + return $this; } /** - *
      * Number of failed requests (one row per status code seen)
-     * 
* - * repeated .grpc.testing.RequestResultCount request_results = 5; + * Generated from protobuf field repeated .grpc.testing.RequestResultCount request_results = 5; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getRequestResults() { @@ -148,16 +165,70 @@ class ClientStats extends \Google\Protobuf\Internal\Message } /** - *
      * Number of failed requests (one row per status code seen)
-     * 
* - * repeated .grpc.testing.RequestResultCount request_results = 5; + * Generated from protobuf field repeated .grpc.testing.RequestResultCount request_results = 5; + * @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); - $this->request_results = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class); + $this->request_results = $arr; + + return $this; + } + + /** + * Number of polls called inside completion queue + * + * Generated from protobuf field uint64 cq_poll_count = 6; + * @return int|string + */ + public function getCqPollCount() + { + return $this->cq_poll_count; + } + + /** + * Number of polls called inside completion queue + * + * Generated from protobuf field uint64 cq_poll_count = 6; + * @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 .grpc.core.Stats core_stats = 7; + * @return \Grpc\Core\Stats + */ + public function getCoreStats() + { + return $this->core_stats; + } + + /** + * Core library stats + * + * Generated from protobuf field .grpc.core.Stats core_stats = 7; + * @param \Grpc\Core\Stats $var + * @return $this + */ + public function setCoreStats($var) + { + GPBUtil::checkMessage($var, \Grpc\Core\Stats::class); + $this->core_stats = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ClientStatus.php b/src/php/tests/qps/generated_code/Grpc/Testing/ClientStatus.php index a59f87a962..3ea40c4dfa 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ClientStatus.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ClientStatus.php @@ -9,12 +9,12 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.ClientStatus + * Generated from protobuf message grpc.testing.ClientStatus */ class ClientStatus extends \Google\Protobuf\Internal\Message { /** - * .grpc.testing.ClientStats stats = 1; + * Generated from protobuf field .grpc.testing.ClientStats stats = 1; */ private $stats = null; @@ -24,7 +24,8 @@ class ClientStatus extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ClientStats stats = 1; + * Generated from protobuf field .grpc.testing.ClientStats stats = 1; + * @return \Grpc\Testing\ClientStats */ public function getStats() { @@ -32,12 +33,16 @@ class ClientStatus extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ClientStats stats = 1; + * Generated from protobuf field .grpc.testing.ClientStats stats = 1; + * @param \Grpc\Testing\ClientStats $var + * @return $this */ - public function setStats(&$var) + public function setStats($var) { GPBUtil::checkMessage($var, \Grpc\Testing\ClientStats::class); $this->stats = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ClientType.php b/src/php/tests/qps/generated_code/Grpc/Testing/ClientType.php index 4f59da992f..d1df4f1943 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ClientType.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ClientType.php @@ -5,29 +5,25 @@ namespace Grpc\Testing; /** - * Protobuf enum grpc.testing.ClientType + * Protobuf enum Grpc\Testing\ClientType */ class ClientType { /** - *
      * Many languages support a basic distinction between using
      * sync or async client, and this allows the specification
-     * 
* - * SYNC_CLIENT = 0; + * Generated from protobuf enum SYNC_CLIENT = 0; */ const SYNC_CLIENT = 0; /** - * ASYNC_CLIENT = 1; + * Generated from protobuf enum ASYNC_CLIENT = 1; */ const ASYNC_CLIENT = 1; /** - *
      * used for some language-specific variants
-     * 
* - * OTHER_CLIENT = 2; + * Generated from protobuf enum OTHER_CLIENT = 2; */ const OTHER_CLIENT = 2; } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ClosedLoopParams.php b/src/php/tests/qps/generated_code/Grpc/Testing/ClosedLoopParams.php index 53f2948af2..2772836f13 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ClosedLoopParams.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ClosedLoopParams.php @@ -9,12 +9,10 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Once an RPC finishes, immediately start a new one.
  * No configuration parameters needed.
- * 
* - * Protobuf type grpc.testing.ClosedLoopParams + * Generated from protobuf message grpc.testing.ClosedLoopParams */ class ClosedLoopParams extends \Google\Protobuf\Internal\Message { diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ComplexProtoParams.php b/src/php/tests/qps/generated_code/Grpc/Testing/ComplexProtoParams.php index 6d990f1b06..b9013cdb30 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ComplexProtoParams.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ComplexProtoParams.php @@ -9,12 +9,10 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * TODO (vpai): Fill this in once the details of complex, representative
  *              protos are decided
- * 
* - * Protobuf type grpc.testing.ComplexProtoParams + * Generated from protobuf message grpc.testing.ComplexProtoParams */ class ComplexProtoParams extends \Google\Protobuf\Internal\Message { diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/CoreRequest.php b/src/php/tests/qps/generated_code/Grpc/Testing/CoreRequest.php index 2e078b3fcd..7772572f1c 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/CoreRequest.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/CoreRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.CoreRequest + * Generated from protobuf message grpc.testing.CoreRequest */ class CoreRequest extends \Google\Protobuf\Internal\Message { diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/CoreResponse.php b/src/php/tests/qps/generated_code/Grpc/Testing/CoreResponse.php index 85cb3418ad..e0b40ee300 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/CoreResponse.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/CoreResponse.php @@ -9,16 +9,14 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.CoreResponse + * Generated from protobuf message grpc.testing.CoreResponse */ class CoreResponse extends \Google\Protobuf\Internal\Message { /** - *
      * Number of cores available on the server
-     * 
* - * int32 cores = 1; + * Generated from protobuf field int32 cores = 1; */ private $cores = 0; @@ -28,11 +26,10 @@ class CoreResponse extends \Google\Protobuf\Internal\Message } /** - *
      * Number of cores available on the server
-     * 
* - * int32 cores = 1; + * Generated from protobuf field int32 cores = 1; + * @return int */ public function getCores() { @@ -40,16 +37,18 @@ class CoreResponse extends \Google\Protobuf\Internal\Message } /** - *
      * Number of cores available on the server
-     * 
* - * int32 cores = 1; + * Generated from protobuf field int32 cores = 1; + * @param int $var + * @return $this */ public function setCores($var) { GPBUtil::checkInt32($var); $this->cores = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/EchoStatus.php b/src/php/tests/qps/generated_code/Grpc/Testing/EchoStatus.php index 27340fb0ef..6a6623a042 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/EchoStatus.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/EchoStatus.php @@ -9,21 +9,19 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * A protobuf representation for grpc status. This is used by test
  * clients to specify a status that the server should attempt to return.
- * 
* - * Protobuf type grpc.testing.EchoStatus + * Generated from protobuf message grpc.testing.EchoStatus */ class EchoStatus extends \Google\Protobuf\Internal\Message { /** - * int32 code = 1; + * Generated from protobuf field int32 code = 1; */ private $code = 0; /** - * string message = 2; + * Generated from protobuf field string message = 2; */ private $message = ''; @@ -33,7 +31,8 @@ class EchoStatus extends \Google\Protobuf\Internal\Message } /** - * int32 code = 1; + * Generated from protobuf field int32 code = 1; + * @return int */ public function getCode() { @@ -41,16 +40,21 @@ class EchoStatus extends \Google\Protobuf\Internal\Message } /** - * int32 code = 1; + * Generated from protobuf field int32 code = 1; + * @param int $var + * @return $this */ public function setCode($var) { GPBUtil::checkInt32($var); $this->code = $var; + + return $this; } /** - * string message = 2; + * Generated from protobuf field string message = 2; + * @return string */ public function getMessage() { @@ -58,12 +62,16 @@ class EchoStatus extends \Google\Protobuf\Internal\Message } /** - * string message = 2; + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this */ public function setMessage($var) { GPBUtil::checkString($var, True); $this->message = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/HistogramData.php b/src/php/tests/qps/generated_code/Grpc/Testing/HistogramData.php index 056da6e5de..136eac75e2 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/HistogramData.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/HistogramData.php @@ -9,36 +9,34 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Histogram data based on grpc/support/histogram.c
- * 
* - * Protobuf type grpc.testing.HistogramData + * Generated from protobuf message grpc.testing.HistogramData */ class HistogramData extends \Google\Protobuf\Internal\Message { /** - * repeated uint32 bucket = 1; + * Generated from protobuf field repeated uint32 bucket = 1; */ private $bucket; /** - * double min_seen = 2; + * Generated from protobuf field double min_seen = 2; */ private $min_seen = 0.0; /** - * double max_seen = 3; + * Generated from protobuf field double max_seen = 3; */ private $max_seen = 0.0; /** - * double sum = 4; + * Generated from protobuf field double sum = 4; */ private $sum = 0.0; /** - * double sum_of_squares = 5; + * Generated from protobuf field double sum_of_squares = 5; */ private $sum_of_squares = 0.0; /** - * double count = 6; + * Generated from protobuf field double count = 6; */ private $count = 0.0; @@ -48,7 +46,8 @@ class HistogramData extends \Google\Protobuf\Internal\Message } /** - * repeated uint32 bucket = 1; + * Generated from protobuf field repeated uint32 bucket = 1; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getBucket() { @@ -56,16 +55,21 @@ class HistogramData extends \Google\Protobuf\Internal\Message } /** - * repeated uint32 bucket = 1; + * Generated from protobuf field repeated uint32 bucket = 1; + * @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); - $this->bucket = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); + $this->bucket = $arr; + + return $this; } /** - * double min_seen = 2; + * Generated from protobuf field double min_seen = 2; + * @return float */ public function getMinSeen() { @@ -73,16 +77,21 @@ class HistogramData extends \Google\Protobuf\Internal\Message } /** - * double min_seen = 2; + * Generated from protobuf field double min_seen = 2; + * @param float $var + * @return $this */ public function setMinSeen($var) { GPBUtil::checkDouble($var); $this->min_seen = $var; + + return $this; } /** - * double max_seen = 3; + * Generated from protobuf field double max_seen = 3; + * @return float */ public function getMaxSeen() { @@ -90,16 +99,21 @@ class HistogramData extends \Google\Protobuf\Internal\Message } /** - * double max_seen = 3; + * Generated from protobuf field double max_seen = 3; + * @param float $var + * @return $this */ public function setMaxSeen($var) { GPBUtil::checkDouble($var); $this->max_seen = $var; + + return $this; } /** - * double sum = 4; + * Generated from protobuf field double sum = 4; + * @return float */ public function getSum() { @@ -107,16 +121,21 @@ class HistogramData extends \Google\Protobuf\Internal\Message } /** - * double sum = 4; + * Generated from protobuf field double sum = 4; + * @param float $var + * @return $this */ public function setSum($var) { GPBUtil::checkDouble($var); $this->sum = $var; + + return $this; } /** - * double sum_of_squares = 5; + * Generated from protobuf field double sum_of_squares = 5; + * @return float */ public function getSumOfSquares() { @@ -124,16 +143,21 @@ class HistogramData extends \Google\Protobuf\Internal\Message } /** - * double sum_of_squares = 5; + * Generated from protobuf field double sum_of_squares = 5; + * @param float $var + * @return $this */ public function setSumOfSquares($var) { GPBUtil::checkDouble($var); $this->sum_of_squares = $var; + + return $this; } /** - * double count = 6; + * Generated from protobuf field double count = 6; + * @return float */ public function getCount() { @@ -141,12 +165,16 @@ class HistogramData extends \Google\Protobuf\Internal\Message } /** - * double count = 6; + * Generated from protobuf field double count = 6; + * @param float $var + * @return $this */ public function setCount($var) { GPBUtil::checkDouble($var); $this->count = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/HistogramParams.php b/src/php/tests/qps/generated_code/Grpc/Testing/HistogramParams.php index 836c94b01d..1a1b484f14 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/HistogramParams.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/HistogramParams.php @@ -9,28 +9,22 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Histogram params based on grpc/support/histogram.c
- * 
* - * Protobuf type grpc.testing.HistogramParams + * Generated from protobuf message grpc.testing.HistogramParams */ class HistogramParams extends \Google\Protobuf\Internal\Message { /** - *
      * first bucket is [0, 1 + resolution)
-     * 
* - * double resolution = 1; + * Generated from protobuf field double resolution = 1; */ private $resolution = 0.0; /** - *
      * use enough buckets to allow this value
-     * 
* - * double max_possible = 2; + * Generated from protobuf field double max_possible = 2; */ private $max_possible = 0.0; @@ -40,11 +34,10 @@ class HistogramParams extends \Google\Protobuf\Internal\Message } /** - *
      * first bucket is [0, 1 + resolution)
-     * 
* - * double resolution = 1; + * Generated from protobuf field double resolution = 1; + * @return float */ public function getResolution() { @@ -52,24 +45,25 @@ class HistogramParams extends \Google\Protobuf\Internal\Message } /** - *
      * first bucket is [0, 1 + resolution)
-     * 
* - * double resolution = 1; + * Generated from protobuf field double resolution = 1; + * @param float $var + * @return $this */ public function setResolution($var) { GPBUtil::checkDouble($var); $this->resolution = $var; + + return $this; } /** - *
      * use enough buckets to allow this value
-     * 
* - * double max_possible = 2; + * Generated from protobuf field double max_possible = 2; + * @return float */ public function getMaxPossible() { @@ -77,16 +71,18 @@ class HistogramParams extends \Google\Protobuf\Internal\Message } /** - *
      * use enough buckets to allow this value
-     * 
* - * double max_possible = 2; + * Generated from protobuf field double max_possible = 2; + * @param float $var + * @return $this */ public function setMaxPossible($var) { GPBUtil::checkDouble($var); $this->max_possible = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/LoadParams.php b/src/php/tests/qps/generated_code/Grpc/Testing/LoadParams.php index 1f32e49c8a..04c345f242 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/LoadParams.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/LoadParams.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.LoadParams + * Generated from protobuf message grpc.testing.LoadParams */ class LoadParams extends \Google\Protobuf\Internal\Message { @@ -21,7 +21,8 @@ class LoadParams extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ClosedLoopParams closed_loop = 1; + * Generated from protobuf field .grpc.testing.ClosedLoopParams closed_loop = 1; + * @return \Grpc\Testing\ClosedLoopParams */ public function getClosedLoop() { @@ -29,16 +30,21 @@ class LoadParams extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ClosedLoopParams closed_loop = 1; + * Generated from protobuf field .grpc.testing.ClosedLoopParams closed_loop = 1; + * @param \Grpc\Testing\ClosedLoopParams $var + * @return $this */ - public function setClosedLoop(&$var) + public function setClosedLoop($var) { GPBUtil::checkMessage($var, \Grpc\Testing\ClosedLoopParams::class); $this->writeOneof(1, $var); + + return $this; } /** - * .grpc.testing.PoissonParams poisson = 2; + * Generated from protobuf field .grpc.testing.PoissonParams poisson = 2; + * @return \Grpc\Testing\PoissonParams */ public function getPoisson() { @@ -46,14 +52,21 @@ class LoadParams extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.PoissonParams poisson = 2; + * Generated from protobuf field .grpc.testing.PoissonParams poisson = 2; + * @param \Grpc\Testing\PoissonParams $var + * @return $this */ - public function setPoisson(&$var) + public function setPoisson($var) { GPBUtil::checkMessage($var, \Grpc\Testing\PoissonParams::class); $this->writeOneof(2, $var); + + return $this; } + /** + * @return string + */ public function getLoad() { return $this->whichOneof("load"); diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/Mark.php b/src/php/tests/qps/generated_code/Grpc/Testing/Mark.php index ce006efacd..be058d51be 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/Mark.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/Mark.php @@ -9,20 +9,16 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Request current stats
- * 
* - * Protobuf type grpc.testing.Mark + * Generated from protobuf message grpc.testing.Mark */ class Mark extends \Google\Protobuf\Internal\Message { /** - *
      * if true, the stats will be reset after taking their snapshot.
-     * 
* - * bool reset = 1; + * Generated from protobuf field bool reset = 1; */ private $reset = false; @@ -32,11 +28,10 @@ class Mark extends \Google\Protobuf\Internal\Message } /** - *
      * if true, the stats will be reset after taking their snapshot.
-     * 
* - * bool reset = 1; + * Generated from protobuf field bool reset = 1; + * @return bool */ public function getReset() { @@ -44,16 +39,18 @@ class Mark extends \Google\Protobuf\Internal\Message } /** - *
      * if true, the stats will be reset after taking their snapshot.
-     * 
* - * bool reset = 1; + * Generated from protobuf field bool reset = 1; + * @param bool $var + * @return $this */ public function setReset($var) { GPBUtil::checkBool($var); $this->reset = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/Payload.php b/src/php/tests/qps/generated_code/Grpc/Testing/Payload.php index d17c271af7..ad97890c93 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/Payload.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/Payload.php @@ -9,29 +9,23 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * A block of data, to simply increase gRPC message size.
- * 
* - * Protobuf type grpc.testing.Payload + * Generated from protobuf message grpc.testing.Payload */ class Payload extends \Google\Protobuf\Internal\Message { /** - *
      * DEPRECATED, don't use. To be removed shortly.
      * The type of data in body.
-     * 
* - * .grpc.testing.PayloadType type = 1; + * Generated from protobuf field .grpc.testing.PayloadType type = 1; */ private $type = 0; /** - *
      * Primary contents of payload.
-     * 
* - * bytes body = 2; + * Generated from protobuf field bytes body = 2; */ private $body = ''; @@ -41,12 +35,11 @@ class Payload extends \Google\Protobuf\Internal\Message } /** - *
      * DEPRECATED, don't use. To be removed shortly.
      * The type of data in body.
-     * 
* - * .grpc.testing.PayloadType type = 1; + * Generated from protobuf field .grpc.testing.PayloadType type = 1; + * @return int */ public function getType() { @@ -54,25 +47,26 @@ class Payload extends \Google\Protobuf\Internal\Message } /** - *
      * DEPRECATED, don't use. To be removed shortly.
      * The type of data in body.
-     * 
* - * .grpc.testing.PayloadType type = 1; + * Generated from protobuf field .grpc.testing.PayloadType type = 1; + * @param int $var + * @return $this */ public function setType($var) { GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); $this->type = $var; + + return $this; } /** - *
      * Primary contents of payload.
-     * 
* - * bytes body = 2; + * Generated from protobuf field bytes body = 2; + * @return string */ public function getBody() { @@ -80,16 +74,18 @@ class Payload extends \Google\Protobuf\Internal\Message } /** - *
      * Primary contents of payload.
-     * 
* - * bytes body = 2; + * Generated from protobuf field bytes body = 2; + * @param string $var + * @return $this */ public function setBody($var) { GPBUtil::checkString($var, False); $this->body = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/PayloadConfig.php b/src/php/tests/qps/generated_code/Grpc/Testing/PayloadConfig.php index a2fe7109ba..748f52da82 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/PayloadConfig.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/PayloadConfig.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.PayloadConfig + * Generated from protobuf message grpc.testing.PayloadConfig */ class PayloadConfig extends \Google\Protobuf\Internal\Message { @@ -21,7 +21,8 @@ class PayloadConfig extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ByteBufferParams bytebuf_params = 1; + * Generated from protobuf field .grpc.testing.ByteBufferParams bytebuf_params = 1; + * @return \Grpc\Testing\ByteBufferParams */ public function getBytebufParams() { @@ -29,16 +30,21 @@ class PayloadConfig extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ByteBufferParams bytebuf_params = 1; + * Generated from protobuf field .grpc.testing.ByteBufferParams bytebuf_params = 1; + * @param \Grpc\Testing\ByteBufferParams $var + * @return $this */ - public function setBytebufParams(&$var) + public function setBytebufParams($var) { GPBUtil::checkMessage($var, \Grpc\Testing\ByteBufferParams::class); $this->writeOneof(1, $var); + + return $this; } /** - * .grpc.testing.SimpleProtoParams simple_params = 2; + * Generated from protobuf field .grpc.testing.SimpleProtoParams simple_params = 2; + * @return \Grpc\Testing\SimpleProtoParams */ public function getSimpleParams() { @@ -46,16 +52,21 @@ class PayloadConfig extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.SimpleProtoParams simple_params = 2; + * Generated from protobuf field .grpc.testing.SimpleProtoParams simple_params = 2; + * @param \Grpc\Testing\SimpleProtoParams $var + * @return $this */ - public function setSimpleParams(&$var) + public function setSimpleParams($var) { GPBUtil::checkMessage($var, \Grpc\Testing\SimpleProtoParams::class); $this->writeOneof(2, $var); + + return $this; } /** - * .grpc.testing.ComplexProtoParams complex_params = 3; + * Generated from protobuf field .grpc.testing.ComplexProtoParams complex_params = 3; + * @return \Grpc\Testing\ComplexProtoParams */ public function getComplexParams() { @@ -63,14 +74,21 @@ class PayloadConfig extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ComplexProtoParams complex_params = 3; + * Generated from protobuf field .grpc.testing.ComplexProtoParams complex_params = 3; + * @param \Grpc\Testing\ComplexProtoParams $var + * @return $this */ - public function setComplexParams(&$var) + public function setComplexParams($var) { GPBUtil::checkMessage($var, \Grpc\Testing\ComplexProtoParams::class); $this->writeOneof(3, $var); + + return $this; } + /** + * @return string + */ public function getPayload() { return $this->whichOneof("payload"); diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/PayloadType.php b/src/php/tests/qps/generated_code/Grpc/Testing/PayloadType.php index 189ef034b4..d8df1af798 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/PayloadType.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/PayloadType.php @@ -5,21 +5,17 @@ namespace Grpc\Testing; /** - *
  * DEPRECATED, don't use. To be removed shortly.
  * The type of payload that should be returned.
- * 
* - * Protobuf enum grpc.testing.PayloadType + * Protobuf enum Grpc\Testing\PayloadType */ class PayloadType { /** - *
      * Compressable text format.
-     * 
* - * COMPRESSABLE = 0; + * Generated from protobuf enum COMPRESSABLE = 0; */ const COMPRESSABLE = 0; } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/PoissonParams.php b/src/php/tests/qps/generated_code/Grpc/Testing/PoissonParams.php index d64edd45f0..6a4047f2ec 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/PoissonParams.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/PoissonParams.php @@ -9,21 +9,17 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Parameters of poisson process distribution, which is a good representation
  * of activity coming in from independent identical stationary sources.
- * 
* - * Protobuf type grpc.testing.PoissonParams + * Generated from protobuf message grpc.testing.PoissonParams */ class PoissonParams extends \Google\Protobuf\Internal\Message { /** - *
      * The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
-     * 
* - * double offered_load = 1; + * Generated from protobuf field double offered_load = 1; */ private $offered_load = 0.0; @@ -33,11 +29,10 @@ class PoissonParams extends \Google\Protobuf\Internal\Message } /** - *
      * The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
-     * 
* - * double offered_load = 1; + * Generated from protobuf field double offered_load = 1; + * @return float */ public function getOfferedLoad() { @@ -45,16 +40,18 @@ class PoissonParams extends \Google\Protobuf\Internal\Message } /** - *
      * The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
-     * 
* - * double offered_load = 1; + * Generated from protobuf field double offered_load = 1; + * @param float $var + * @return $this */ public function setOfferedLoad($var) { GPBUtil::checkDouble($var); $this->offered_load = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ProxyClientServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/ProxyClientServiceClient.php index a6da2e7aef..5510b57064 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ProxyClientServiceClient.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ProxyClientServiceClient.php @@ -16,17 +16,19 @@ // See the License for the specific language governing permissions and // 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 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) { - parent::__construct($hostname, $opts, $channel); + parent::__construct($hostname, $opts, $channel); } /** @@ -36,10 +38,10 @@ namespace Grpc\Testing { */ public function GetConfig(\Grpc\Testing\Void $argument, $metadata = [], $options = []) { - return $this->_simpleRequest('/grpc.testing.ProxyClientService/GetConfig', - $argument, - ['\Grpc\Testing\ClientConfig', 'decode'], - $metadata, $options); + return $this->_simpleRequest('/grpc.testing.ProxyClientService/GetConfig', + $argument, + ['\Grpc\Testing\ClientConfig', 'decode'], + $metadata, $options); } /** @@ -47,11 +49,19 @@ namespace Grpc\Testing { * @param array $options call options */ public function ReportTime($metadata = [], $options = []) { - return $this->_clientStreamRequest('/grpc.testing.ProxyClientService/ReportTime', - ['\Grpc\Testing\Void','decode'], - $metadata, $options); + return $this->_clientStreamRequest('/grpc.testing.ProxyClientService/ReportTime', + ['\Grpc\Testing\Void','decode'], + $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); + } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ProxyStat.php b/src/php/tests/qps/generated_code/Grpc/Testing/ProxyStat.php index ed43be99ce..6fab611534 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ProxyStat.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ProxyStat.php @@ -9,12 +9,12 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.ProxyStat + * Generated from protobuf message grpc.testing.ProxyStat */ class ProxyStat extends \Google\Protobuf\Internal\Message { /** - * double latency = 1; + * Generated from protobuf field double latency = 1; */ private $latency = 0.0; @@ -24,7 +24,8 @@ class ProxyStat extends \Google\Protobuf\Internal\Message } /** - * double latency = 1; + * Generated from protobuf field double latency = 1; + * @return float */ public function getLatency() { @@ -32,12 +33,16 @@ class ProxyStat extends \Google\Protobuf\Internal\Message } /** - * double latency = 1; + * Generated from protobuf field double latency = 1; + * @param float $var + * @return $this */ public function setLatency($var) { GPBUtil::checkDouble($var); $this->latency = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ReconnectInfo.php b/src/php/tests/qps/generated_code/Grpc/Testing/ReconnectInfo.php index dfaaa606c3..cd728705fa 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ReconnectInfo.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ReconnectInfo.php @@ -9,22 +9,20 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * For reconnect interop test only.
  * Server tells client whether its reconnects are following the spec and the
  * reconnect backoffs it saw.
- * 
* - * Protobuf type grpc.testing.ReconnectInfo + * Generated from protobuf message grpc.testing.ReconnectInfo */ class ReconnectInfo extends \Google\Protobuf\Internal\Message { /** - * bool passed = 1; + * Generated from protobuf field bool passed = 1; */ private $passed = false; /** - * repeated int32 backoff_ms = 2; + * Generated from protobuf field repeated int32 backoff_ms = 2; */ private $backoff_ms; @@ -34,7 +32,8 @@ class ReconnectInfo extends \Google\Protobuf\Internal\Message } /** - * bool passed = 1; + * Generated from protobuf field bool passed = 1; + * @return bool */ public function getPassed() { @@ -42,16 +41,21 @@ class ReconnectInfo extends \Google\Protobuf\Internal\Message } /** - * bool passed = 1; + * Generated from protobuf field bool passed = 1; + * @param bool $var + * @return $this */ public function setPassed($var) { GPBUtil::checkBool($var); $this->passed = $var; + + return $this; } /** - * repeated int32 backoff_ms = 2; + * Generated from protobuf field repeated int32 backoff_ms = 2; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getBackoffMs() { @@ -59,12 +63,16 @@ class ReconnectInfo extends \Google\Protobuf\Internal\Message } /** - * repeated int32 backoff_ms = 2; + * Generated from protobuf field repeated int32 backoff_ms = 2; + * @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); - $this->backoff_ms = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->backoff_ms = $arr; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ReconnectParams.php b/src/php/tests/qps/generated_code/Grpc/Testing/ReconnectParams.php index 9715855783..f91dc410cb 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ReconnectParams.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ReconnectParams.php @@ -9,17 +9,15 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * For reconnect interop test only.
  * Client tells server what reconnection parameters it used.
- * 
* - * Protobuf type grpc.testing.ReconnectParams + * Generated from protobuf message grpc.testing.ReconnectParams */ class ReconnectParams extends \Google\Protobuf\Internal\Message { /** - * int32 max_reconnect_backoff_ms = 1; + * Generated from protobuf field int32 max_reconnect_backoff_ms = 1; */ private $max_reconnect_backoff_ms = 0; @@ -29,7 +27,8 @@ class ReconnectParams extends \Google\Protobuf\Internal\Message } /** - * int32 max_reconnect_backoff_ms = 1; + * Generated from protobuf field int32 max_reconnect_backoff_ms = 1; + * @return int */ public function getMaxReconnectBackoffMs() { @@ -37,12 +36,16 @@ class ReconnectParams extends \Google\Protobuf\Internal\Message } /** - * int32 max_reconnect_backoff_ms = 1; + * Generated from protobuf field int32 max_reconnect_backoff_ms = 1; + * @param int $var + * @return $this */ public function setMaxReconnectBackoffMs($var) { GPBUtil::checkInt32($var); $this->max_reconnect_backoff_ms = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ReportQpsScenarioServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/ReportQpsScenarioServiceClient.php new file mode 100644 index 0000000000..72d44ffc66 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ReportQpsScenarioServiceClient.php @@ -0,0 +1,50 @@ +_simpleRequest('/grpc.testing.ReportQpsScenarioService/ReportScenario', + $argument, + ['\Grpc\Testing\Void', 'decode'], + $metadata, $options); + } + +} diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/RequestResultCount.php b/src/php/tests/qps/generated_code/Grpc/Testing/RequestResultCount.php index 1be42b2ac9..75fa6cafe2 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/RequestResultCount.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/RequestResultCount.php @@ -9,16 +9,16 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.RequestResultCount + * Generated from protobuf message grpc.testing.RequestResultCount */ class RequestResultCount extends \Google\Protobuf\Internal\Message { /** - * int32 status_code = 1; + * Generated from protobuf field int32 status_code = 1; */ private $status_code = 0; /** - * int64 count = 2; + * Generated from protobuf field int64 count = 2; */ private $count = 0; @@ -28,7 +28,8 @@ class RequestResultCount extends \Google\Protobuf\Internal\Message } /** - * int32 status_code = 1; + * Generated from protobuf field int32 status_code = 1; + * @return int */ public function getStatusCode() { @@ -36,16 +37,21 @@ class RequestResultCount extends \Google\Protobuf\Internal\Message } /** - * int32 status_code = 1; + * Generated from protobuf field int32 status_code = 1; + * @param int $var + * @return $this */ public function setStatusCode($var) { GPBUtil::checkInt32($var); $this->status_code = $var; + + return $this; } /** - * int64 count = 2; + * Generated from protobuf field int64 count = 2; + * @return int|string */ public function getCount() { @@ -53,12 +59,16 @@ class RequestResultCount extends \Google\Protobuf\Internal\Message } /** - * int64 count = 2; + * Generated from protobuf field int64 count = 2; + * @param int|string $var + * @return $this */ public function setCount($var) { GPBUtil::checkInt64($var); $this->count = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ResponseParameters.php b/src/php/tests/qps/generated_code/Grpc/Testing/ResponseParameters.php index b7a8e5ece7..b2f0a827fe 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ResponseParameters.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ResponseParameters.php @@ -9,40 +9,32 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Configuration for a particular response.
- * 
* - * Protobuf type grpc.testing.ResponseParameters + * Generated from protobuf message grpc.testing.ResponseParameters */ class ResponseParameters extends \Google\Protobuf\Internal\Message { /** - *
      * Desired payload sizes in responses from the server.
-     * 
* - * int32 size = 1; + * Generated from protobuf field int32 size = 1; */ private $size = 0; /** - *
      * Desired interval between consecutive responses in the response stream in
      * microseconds.
-     * 
* - * int32 interval_us = 2; + * Generated from protobuf field int32 interval_us = 2; */ private $interval_us = 0; /** - *
      * Whether to request the server to compress the response. This field is
      * "nullable" in order to interoperate seamlessly with clients not able to
      * implement the full compression tests by introspecting the call to verify
      * the response's compression status.
-     * 
* - * .grpc.testing.BoolValue compressed = 3; + * Generated from protobuf field .grpc.testing.BoolValue compressed = 3; */ private $compressed = null; @@ -52,11 +44,10 @@ class ResponseParameters extends \Google\Protobuf\Internal\Message } /** - *
      * Desired payload sizes in responses from the server.
-     * 
* - * int32 size = 1; + * Generated from protobuf field int32 size = 1; + * @return int */ public function getSize() { @@ -64,25 +55,26 @@ class ResponseParameters extends \Google\Protobuf\Internal\Message } /** - *
      * Desired payload sizes in responses from the server.
-     * 
* - * int32 size = 1; + * Generated from protobuf field int32 size = 1; + * @param int $var + * @return $this */ public function setSize($var) { GPBUtil::checkInt32($var); $this->size = $var; + + return $this; } /** - *
      * Desired interval between consecutive responses in the response stream in
      * microseconds.
-     * 
* - * int32 interval_us = 2; + * Generated from protobuf field int32 interval_us = 2; + * @return int */ public function getIntervalUs() { @@ -90,28 +82,29 @@ class ResponseParameters extends \Google\Protobuf\Internal\Message } /** - *
      * Desired interval between consecutive responses in the response stream in
      * microseconds.
-     * 
* - * int32 interval_us = 2; + * Generated from protobuf field int32 interval_us = 2; + * @param int $var + * @return $this */ public function setIntervalUs($var) { GPBUtil::checkInt32($var); $this->interval_us = $var; + + return $this; } /** - *
      * Whether to request the server to compress the response. This field is
      * "nullable" in order to interoperate seamlessly with clients not able to
      * implement the full compression tests by introspecting the call to verify
      * the response's compression status.
-     * 
* - * .grpc.testing.BoolValue compressed = 3; + * Generated from protobuf field .grpc.testing.BoolValue compressed = 3; + * @return \Grpc\Testing\BoolValue */ public function getCompressed() { @@ -119,19 +112,21 @@ class ResponseParameters extends \Google\Protobuf\Internal\Message } /** - *
      * Whether to request the server to compress the response. This field is
      * "nullable" in order to interoperate seamlessly with clients not able to
      * implement the full compression tests by introspecting the call to verify
      * the response's compression status.
-     * 
* - * .grpc.testing.BoolValue compressed = 3; + * Generated from protobuf field .grpc.testing.BoolValue compressed = 3; + * @param \Grpc\Testing\BoolValue $var + * @return $this */ - public function setCompressed(&$var) + public function setCompressed($var) { GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); $this->compressed = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/RpcType.php b/src/php/tests/qps/generated_code/Grpc/Testing/RpcType.php index 2e664fff47..73a66490ea 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/RpcType.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/RpcType.php @@ -5,17 +5,29 @@ namespace Grpc\Testing; /** - * Protobuf enum grpc.testing.RpcType + * Protobuf enum Grpc\Testing\RpcType */ class RpcType { /** - * UNARY = 0; + * Generated from protobuf enum UNARY = 0; */ const UNARY = 0; /** - * STREAMING = 1; + * Generated from protobuf enum STREAMING = 1; */ const STREAMING = 1; + /** + * Generated from protobuf enum STREAMING_FROM_CLIENT = 2; + */ + const STREAMING_FROM_CLIENT = 2; + /** + * Generated from protobuf enum STREAMING_FROM_SERVER = 3; + */ + const STREAMING_FROM_SERVER = 3; + /** + * Generated from protobuf enum STREAMING_BOTH_WAYS = 4; + */ + const STREAMING_BOTH_WAYS = 4; } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/Scenario.php b/src/php/tests/qps/generated_code/Grpc/Testing/Scenario.php index 136ed299ea..9ec284b71f 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/Scenario.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/Scenario.php @@ -9,76 +9,58 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * A single performance scenario: input to qps_json_driver
- * 
* - * Protobuf type grpc.testing.Scenario + * Generated from protobuf message grpc.testing.Scenario */ class Scenario extends \Google\Protobuf\Internal\Message { /** - *
      * Human readable name for this scenario
-     * 
* - * string name = 1; + * Generated from protobuf field string name = 1; */ private $name = ''; /** - *
      * Client configuration
-     * 
* - * .grpc.testing.ClientConfig client_config = 2; + * Generated from protobuf field .grpc.testing.ClientConfig client_config = 2; */ private $client_config = null; /** - *
      * Number of clients to start for the test
-     * 
* - * int32 num_clients = 3; + * Generated from protobuf field int32 num_clients = 3; */ private $num_clients = 0; /** - *
      * Server configuration
-     * 
* - * .grpc.testing.ServerConfig server_config = 4; + * Generated from protobuf field .grpc.testing.ServerConfig server_config = 4; */ private $server_config = null; /** - *
      * Number of servers to start for the test
-     * 
* - * int32 num_servers = 5; + * Generated from protobuf field int32 num_servers = 5; */ private $num_servers = 0; /** - *
      * Warmup period, in seconds
-     * 
* - * int32 warmup_seconds = 6; + * Generated from protobuf field int32 warmup_seconds = 6; */ private $warmup_seconds = 0; /** - *
      * Benchmark time, in seconds
-     * 
* - * int32 benchmark_seconds = 7; + * Generated from protobuf field int32 benchmark_seconds = 7; */ private $benchmark_seconds = 0; /** - *
      * Number of workers to spawn locally (usually zero)
-     * 
* - * int32 spawn_local_worker_count = 8; + * Generated from protobuf field int32 spawn_local_worker_count = 8; */ private $spawn_local_worker_count = 0; @@ -88,11 +70,10 @@ class Scenario extends \Google\Protobuf\Internal\Message } /** - *
      * Human readable name for this scenario
-     * 
* - * string name = 1; + * Generated from protobuf field string name = 1; + * @return string */ public function getName() { @@ -100,24 +81,25 @@ class Scenario extends \Google\Protobuf\Internal\Message } /** - *
      * Human readable name for this scenario
-     * 
* - * string name = 1; + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this */ public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; + + return $this; } /** - *
      * Client configuration
-     * 
* - * .grpc.testing.ClientConfig client_config = 2; + * Generated from protobuf field .grpc.testing.ClientConfig client_config = 2; + * @return \Grpc\Testing\ClientConfig */ public function getClientConfig() { @@ -125,24 +107,25 @@ class Scenario extends \Google\Protobuf\Internal\Message } /** - *
      * Client configuration
-     * 
* - * .grpc.testing.ClientConfig client_config = 2; + * Generated from protobuf field .grpc.testing.ClientConfig client_config = 2; + * @param \Grpc\Testing\ClientConfig $var + * @return $this */ - public function setClientConfig(&$var) + public function setClientConfig($var) { GPBUtil::checkMessage($var, \Grpc\Testing\ClientConfig::class); $this->client_config = $var; + + return $this; } /** - *
      * Number of clients to start for the test
-     * 
* - * int32 num_clients = 3; + * Generated from protobuf field int32 num_clients = 3; + * @return int */ public function getNumClients() { @@ -150,24 +133,25 @@ class Scenario extends \Google\Protobuf\Internal\Message } /** - *
      * Number of clients to start for the test
-     * 
* - * int32 num_clients = 3; + * Generated from protobuf field int32 num_clients = 3; + * @param int $var + * @return $this */ public function setNumClients($var) { GPBUtil::checkInt32($var); $this->num_clients = $var; + + return $this; } /** - *
      * Server configuration
-     * 
* - * .grpc.testing.ServerConfig server_config = 4; + * Generated from protobuf field .grpc.testing.ServerConfig server_config = 4; + * @return \Grpc\Testing\ServerConfig */ public function getServerConfig() { @@ -175,24 +159,25 @@ class Scenario extends \Google\Protobuf\Internal\Message } /** - *
      * Server configuration
-     * 
* - * .grpc.testing.ServerConfig server_config = 4; + * Generated from protobuf field .grpc.testing.ServerConfig server_config = 4; + * @param \Grpc\Testing\ServerConfig $var + * @return $this */ - public function setServerConfig(&$var) + public function setServerConfig($var) { GPBUtil::checkMessage($var, \Grpc\Testing\ServerConfig::class); $this->server_config = $var; + + return $this; } /** - *
      * Number of servers to start for the test
-     * 
* - * int32 num_servers = 5; + * Generated from protobuf field int32 num_servers = 5; + * @return int */ public function getNumServers() { @@ -200,24 +185,25 @@ class Scenario extends \Google\Protobuf\Internal\Message } /** - *
      * Number of servers to start for the test
-     * 
* - * int32 num_servers = 5; + * Generated from protobuf field int32 num_servers = 5; + * @param int $var + * @return $this */ public function setNumServers($var) { GPBUtil::checkInt32($var); $this->num_servers = $var; + + return $this; } /** - *
      * Warmup period, in seconds
-     * 
* - * int32 warmup_seconds = 6; + * Generated from protobuf field int32 warmup_seconds = 6; + * @return int */ public function getWarmupSeconds() { @@ -225,24 +211,25 @@ class Scenario extends \Google\Protobuf\Internal\Message } /** - *
      * Warmup period, in seconds
-     * 
* - * int32 warmup_seconds = 6; + * Generated from protobuf field int32 warmup_seconds = 6; + * @param int $var + * @return $this */ public function setWarmupSeconds($var) { GPBUtil::checkInt32($var); $this->warmup_seconds = $var; + + return $this; } /** - *
      * Benchmark time, in seconds
-     * 
* - * int32 benchmark_seconds = 7; + * Generated from protobuf field int32 benchmark_seconds = 7; + * @return int */ public function getBenchmarkSeconds() { @@ -250,24 +237,25 @@ class Scenario extends \Google\Protobuf\Internal\Message } /** - *
      * Benchmark time, in seconds
-     * 
* - * int32 benchmark_seconds = 7; + * Generated from protobuf field int32 benchmark_seconds = 7; + * @param int $var + * @return $this */ public function setBenchmarkSeconds($var) { GPBUtil::checkInt32($var); $this->benchmark_seconds = $var; + + return $this; } /** - *
      * Number of workers to spawn locally (usually zero)
-     * 
* - * int32 spawn_local_worker_count = 8; + * Generated from protobuf field int32 spawn_local_worker_count = 8; + * @return int */ public function getSpawnLocalWorkerCount() { @@ -275,16 +263,18 @@ class Scenario extends \Google\Protobuf\Internal\Message } /** - *
      * Number of workers to spawn locally (usually zero)
-     * 
* - * int32 spawn_local_worker_count = 8; + * Generated from protobuf field int32 spawn_local_worker_count = 8; + * @param int $var + * @return $this */ public function setSpawnLocalWorkerCount($var) { GPBUtil::checkInt32($var); $this->spawn_local_worker_count = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ScenarioResult.php b/src/php/tests/qps/generated_code/Grpc/Testing/ScenarioResult.php index 809cd96244..31d9a39a1f 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ScenarioResult.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ScenarioResult.php @@ -9,80 +9,62 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Results of a single benchmark scenario.
- * 
* - * Protobuf type grpc.testing.ScenarioResult + * Generated from protobuf message grpc.testing.ScenarioResult */ class ScenarioResult extends \Google\Protobuf\Internal\Message { /** - *
      * Inputs used to run the scenario.
-     * 
* - * .grpc.testing.Scenario scenario = 1; + * Generated from protobuf field .grpc.testing.Scenario scenario = 1; */ private $scenario = null; /** - *
      * Histograms from all clients merged into one histogram.
-     * 
* - * .grpc.testing.HistogramData latencies = 2; + * Generated from protobuf field .grpc.testing.HistogramData latencies = 2; */ private $latencies = null; /** - *
      * Client stats for each client
-     * 
* - * repeated .grpc.testing.ClientStats client_stats = 3; + * Generated from protobuf field repeated .grpc.testing.ClientStats client_stats = 3; */ private $client_stats; /** - *
      * Server stats for each server
-     * 
* - * repeated .grpc.testing.ServerStats server_stats = 4; + * Generated from protobuf field repeated .grpc.testing.ServerStats server_stats = 4; */ private $server_stats; /** - *
      * Number of cores available to each server
-     * 
* - * repeated int32 server_cores = 5; + * Generated from protobuf field repeated int32 server_cores = 5; */ private $server_cores; /** - *
      * An after-the-fact computed summary
-     * 
* - * .grpc.testing.ScenarioResultSummary summary = 6; + * Generated from protobuf field .grpc.testing.ScenarioResultSummary summary = 6; */ private $summary = null; /** - *
      * Information on success or failure of each worker
-     * 
* - * repeated bool client_success = 7; + * Generated from protobuf field repeated bool client_success = 7; */ private $client_success; /** - * repeated bool server_success = 8; + * Generated from protobuf field repeated bool server_success = 8; */ private $server_success; /** - *
      * Number of failed requests (one row per status code seen)
-     * 
* - * repeated .grpc.testing.RequestResultCount request_results = 9; + * Generated from protobuf field repeated .grpc.testing.RequestResultCount request_results = 9; */ private $request_results; @@ -92,11 +74,10 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message } /** - *
      * Inputs used to run the scenario.
-     * 
* - * .grpc.testing.Scenario scenario = 1; + * Generated from protobuf field .grpc.testing.Scenario scenario = 1; + * @return \Grpc\Testing\Scenario */ public function getScenario() { @@ -104,24 +85,25 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message } /** - *
      * Inputs used to run the scenario.
-     * 
* - * .grpc.testing.Scenario scenario = 1; + * Generated from protobuf field .grpc.testing.Scenario scenario = 1; + * @param \Grpc\Testing\Scenario $var + * @return $this */ - public function setScenario(&$var) + public function setScenario($var) { GPBUtil::checkMessage($var, \Grpc\Testing\Scenario::class); $this->scenario = $var; + + return $this; } /** - *
      * Histograms from all clients merged into one histogram.
-     * 
* - * .grpc.testing.HistogramData latencies = 2; + * Generated from protobuf field .grpc.testing.HistogramData latencies = 2; + * @return \Grpc\Testing\HistogramData */ public function getLatencies() { @@ -129,24 +111,25 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message } /** - *
      * Histograms from all clients merged into one histogram.
-     * 
* - * .grpc.testing.HistogramData latencies = 2; + * Generated from protobuf field .grpc.testing.HistogramData latencies = 2; + * @param \Grpc\Testing\HistogramData $var + * @return $this */ - public function setLatencies(&$var) + public function setLatencies($var) { GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class); $this->latencies = $var; + + return $this; } /** - *
      * Client stats for each client
-     * 
* - * repeated .grpc.testing.ClientStats client_stats = 3; + * Generated from protobuf field repeated .grpc.testing.ClientStats client_stats = 3; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getClientStats() { @@ -154,24 +137,25 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message } /** - *
      * Client stats for each client
-     * 
* - * repeated .grpc.testing.ClientStats client_stats = 3; + * Generated from protobuf field repeated .grpc.testing.ClientStats client_stats = 3; + * @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); - $this->client_stats = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ClientStats::class); + $this->client_stats = $arr; + + return $this; } /** - *
      * Server stats for each server
-     * 
* - * repeated .grpc.testing.ServerStats server_stats = 4; + * Generated from protobuf field repeated .grpc.testing.ServerStats server_stats = 4; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getServerStats() { @@ -179,24 +163,25 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message } /** - *
      * Server stats for each server
-     * 
* - * repeated .grpc.testing.ServerStats server_stats = 4; + * Generated from protobuf field repeated .grpc.testing.ServerStats server_stats = 4; + * @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); - $this->server_stats = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ServerStats::class); + $this->server_stats = $arr; + + return $this; } /** - *
      * Number of cores available to each server
-     * 
* - * repeated int32 server_cores = 5; + * Generated from protobuf field repeated int32 server_cores = 5; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getServerCores() { @@ -204,24 +189,25 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message } /** - *
      * Number of cores available to each server
-     * 
* - * repeated int32 server_cores = 5; + * Generated from protobuf field repeated int32 server_cores = 5; + * @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); - $this->server_cores = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->server_cores = $arr; + + return $this; } /** - *
      * An after-the-fact computed summary
-     * 
* - * .grpc.testing.ScenarioResultSummary summary = 6; + * Generated from protobuf field .grpc.testing.ScenarioResultSummary summary = 6; + * @return \Grpc\Testing\ScenarioResultSummary */ public function getSummary() { @@ -229,24 +215,25 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message } /** - *
      * An after-the-fact computed summary
-     * 
* - * .grpc.testing.ScenarioResultSummary summary = 6; + * Generated from protobuf field .grpc.testing.ScenarioResultSummary summary = 6; + * @param \Grpc\Testing\ScenarioResultSummary $var + * @return $this */ - public function setSummary(&$var) + public function setSummary($var) { GPBUtil::checkMessage($var, \Grpc\Testing\ScenarioResultSummary::class); $this->summary = $var; + + return $this; } /** - *
      * Information on success or failure of each worker
-     * 
* - * repeated bool client_success = 7; + * Generated from protobuf field repeated bool client_success = 7; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getClientSuccess() { @@ -254,20 +241,23 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message } /** - *
      * Information on success or failure of each worker
-     * 
* - * repeated bool client_success = 7; + * Generated from protobuf field repeated bool client_success = 7; + * @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); - $this->client_success = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL); + $this->client_success = $arr; + + return $this; } /** - * repeated bool server_success = 8; + * Generated from protobuf field repeated bool server_success = 8; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getServerSuccess() { @@ -275,20 +265,23 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message } /** - * repeated bool server_success = 8; + * Generated from protobuf field repeated bool server_success = 8; + * @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); - $this->server_success = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL); + $this->server_success = $arr; + + return $this; } /** - *
      * Number of failed requests (one row per status code seen)
-     * 
* - * repeated .grpc.testing.RequestResultCount request_results = 9; + * Generated from protobuf field repeated .grpc.testing.RequestResultCount request_results = 9; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getRequestResults() { @@ -296,16 +289,18 @@ class ScenarioResult extends \Google\Protobuf\Internal\Message } /** - *
      * Number of failed requests (one row per status code seen)
-     * 
* - * repeated .grpc.testing.RequestResultCount request_results = 9; + * Generated from protobuf field repeated .grpc.testing.RequestResultCount request_results = 9; + * @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); - $this->request_results = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class); + $this->request_results = $arr; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ScenarioResultSummary.php b/src/php/tests/qps/generated_code/Grpc/Testing/ScenarioResultSummary.php index 7520cff78e..f7f1c987b5 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ScenarioResultSummary.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ScenarioResultSummary.php @@ -9,107 +9,107 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Basic summary that can be computed from ClientStats and ServerStats
  * once the scenario has finished.
- * 
* - * Protobuf type grpc.testing.ScenarioResultSummary + * Generated from protobuf message grpc.testing.ScenarioResultSummary */ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message { /** - *
      * Total number of operations per second over all clients.
-     * 
* - * double qps = 1; + * Generated from protobuf field double qps = 1; */ private $qps = 0.0; /** - *
      * QPS per one server core.
-     * 
* - * double qps_per_server_core = 2; + * Generated from protobuf field double qps_per_server_core = 2; */ private $qps_per_server_core = 0.0; /** - *
-     * server load based on system_time (0.85 => 85%)
-     * 
+ * server load based on system_time (0.85 => 85%) * - * double server_system_time = 3; + * Generated from protobuf field double server_system_time = 3; */ private $server_system_time = 0.0; /** - *
-     * server load based on user_time (0.85 => 85%)
-     * 
+ * server load based on user_time (0.85 => 85%) * - * double server_user_time = 4; + * Generated from protobuf field double server_user_time = 4; */ private $server_user_time = 0.0; /** - *
-     * client load based on system_time (0.85 => 85%)
-     * 
+ * client load based on system_time (0.85 => 85%) * - * double client_system_time = 5; + * Generated from protobuf field double client_system_time = 5; */ private $client_system_time = 0.0; /** - *
-     * client load based on user_time (0.85 => 85%)
-     * 
+ * client load based on user_time (0.85 => 85%) * - * double client_user_time = 6; + * Generated from protobuf field double client_user_time = 6; */ private $client_user_time = 0.0; /** - *
      * X% latency percentiles (in nanoseconds)
-     * 
* - * double latency_50 = 7; + * Generated from protobuf field double latency_50 = 7; */ private $latency_50 = 0.0; /** - * double latency_90 = 8; + * Generated from protobuf field double latency_90 = 8; */ private $latency_90 = 0.0; /** - * double latency_95 = 9; + * Generated from protobuf field double latency_95 = 9; */ private $latency_95 = 0.0; /** - * double latency_99 = 10; + * Generated from protobuf field double latency_99 = 10; */ private $latency_99 = 0.0; /** - * double latency_999 = 11; + * Generated from protobuf field double latency_999 = 11; */ private $latency_999 = 0.0; /** - *
      * server cpu usage percentage
-     * 
* - * double server_cpu_usage = 12; + * Generated from protobuf field double server_cpu_usage = 12; */ private $server_cpu_usage = 0.0; /** - *
      * Number of requests that succeeded/failed
-     * 
* - * double successful_requests_per_second = 13; + * Generated from protobuf field double successful_requests_per_second = 13; */ private $successful_requests_per_second = 0.0; /** - * double failed_requests_per_second = 14; + * Generated from protobuf field double failed_requests_per_second = 14; */ private $failed_requests_per_second = 0.0; + /** + * Number of polls called inside completion queue per request + * + * Generated from protobuf field double client_polls_per_request = 15; + */ + private $client_polls_per_request = 0.0; + /** + * Generated from protobuf field double server_polls_per_request = 16; + */ + private $server_polls_per_request = 0.0; + /** + * Queries per CPU-sec over all servers or clients + * + * Generated from protobuf field double server_queries_per_cpu_sec = 17; + */ + private $server_queries_per_cpu_sec = 0.0; + /** + * Generated from protobuf field double client_queries_per_cpu_sec = 18; + */ + private $client_queries_per_cpu_sec = 0.0; public function __construct() { \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); @@ -117,11 +117,10 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - *
      * Total number of operations per second over all clients.
-     * 
* - * double qps = 1; + * Generated from protobuf field double qps = 1; + * @return float */ public function getQps() { @@ -129,24 +128,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - *
      * Total number of operations per second over all clients.
-     * 
* - * double qps = 1; + * Generated from protobuf field double qps = 1; + * @param float $var + * @return $this */ public function setQps($var) { GPBUtil::checkDouble($var); $this->qps = $var; + + return $this; } /** - *
      * QPS per one server core.
-     * 
* - * double qps_per_server_core = 2; + * Generated from protobuf field double qps_per_server_core = 2; + * @return float */ public function getQpsPerServerCore() { @@ -154,24 +154,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - *
      * QPS per one server core.
-     * 
* - * double qps_per_server_core = 2; + * Generated from protobuf field double qps_per_server_core = 2; + * @param float $var + * @return $this */ public function setQpsPerServerCore($var) { GPBUtil::checkDouble($var); $this->qps_per_server_core = $var; + + return $this; } /** - *
-     * server load based on system_time (0.85 => 85%)
-     * 
+ * server load based on system_time (0.85 => 85%) * - * double server_system_time = 3; + * Generated from protobuf field double server_system_time = 3; + * @return float */ public function getServerSystemTime() { @@ -179,24 +180,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - *
-     * server load based on system_time (0.85 => 85%)
-     * 
+ * server load based on system_time (0.85 => 85%) * - * double server_system_time = 3; + * Generated from protobuf field double server_system_time = 3; + * @param float $var + * @return $this */ public function setServerSystemTime($var) { GPBUtil::checkDouble($var); $this->server_system_time = $var; + + return $this; } /** - *
-     * server load based on user_time (0.85 => 85%)
-     * 
+ * server load based on user_time (0.85 => 85%) * - * double server_user_time = 4; + * Generated from protobuf field double server_user_time = 4; + * @return float */ public function getServerUserTime() { @@ -204,24 +206,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - *
-     * server load based on user_time (0.85 => 85%)
-     * 
+ * server load based on user_time (0.85 => 85%) * - * double server_user_time = 4; + * Generated from protobuf field double server_user_time = 4; + * @param float $var + * @return $this */ public function setServerUserTime($var) { GPBUtil::checkDouble($var); $this->server_user_time = $var; + + return $this; } /** - *
-     * client load based on system_time (0.85 => 85%)
-     * 
+ * client load based on system_time (0.85 => 85%) * - * double client_system_time = 5; + * Generated from protobuf field double client_system_time = 5; + * @return float */ public function getClientSystemTime() { @@ -229,24 +232,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - *
-     * client load based on system_time (0.85 => 85%)
-     * 
+ * client load based on system_time (0.85 => 85%) * - * double client_system_time = 5; + * Generated from protobuf field double client_system_time = 5; + * @param float $var + * @return $this */ public function setClientSystemTime($var) { GPBUtil::checkDouble($var); $this->client_system_time = $var; + + return $this; } /** - *
-     * client load based on user_time (0.85 => 85%)
-     * 
+ * client load based on user_time (0.85 => 85%) * - * double client_user_time = 6; + * Generated from protobuf field double client_user_time = 6; + * @return float */ public function getClientUserTime() { @@ -254,24 +258,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - *
-     * client load based on user_time (0.85 => 85%)
-     * 
+ * client load based on user_time (0.85 => 85%) * - * double client_user_time = 6; + * Generated from protobuf field double client_user_time = 6; + * @param float $var + * @return $this */ public function setClientUserTime($var) { GPBUtil::checkDouble($var); $this->client_user_time = $var; + + return $this; } /** - *
      * X% latency percentiles (in nanoseconds)
-     * 
* - * double latency_50 = 7; + * Generated from protobuf field double latency_50 = 7; + * @return float */ public function getLatency50() { @@ -279,20 +284,23 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - *
      * X% latency percentiles (in nanoseconds)
-     * 
* - * double latency_50 = 7; + * Generated from protobuf field double latency_50 = 7; + * @param float $var + * @return $this */ public function setLatency50($var) { GPBUtil::checkDouble($var); $this->latency_50 = $var; + + return $this; } /** - * double latency_90 = 8; + * Generated from protobuf field double latency_90 = 8; + * @return float */ public function getLatency90() { @@ -300,16 +308,21 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - * double latency_90 = 8; + * Generated from protobuf field double latency_90 = 8; + * @param float $var + * @return $this */ public function setLatency90($var) { GPBUtil::checkDouble($var); $this->latency_90 = $var; + + return $this; } /** - * double latency_95 = 9; + * Generated from protobuf field double latency_95 = 9; + * @return float */ public function getLatency95() { @@ -317,16 +330,21 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - * double latency_95 = 9; + * Generated from protobuf field double latency_95 = 9; + * @param float $var + * @return $this */ public function setLatency95($var) { GPBUtil::checkDouble($var); $this->latency_95 = $var; + + return $this; } /** - * double latency_99 = 10; + * Generated from protobuf field double latency_99 = 10; + * @return float */ public function getLatency99() { @@ -334,16 +352,21 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - * double latency_99 = 10; + * Generated from protobuf field double latency_99 = 10; + * @param float $var + * @return $this */ public function setLatency99($var) { GPBUtil::checkDouble($var); $this->latency_99 = $var; + + return $this; } /** - * double latency_999 = 11; + * Generated from protobuf field double latency_999 = 11; + * @return float */ public function getLatency999() { @@ -351,20 +374,23 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - * double latency_999 = 11; + * Generated from protobuf field double latency_999 = 11; + * @param float $var + * @return $this */ public function setLatency999($var) { GPBUtil::checkDouble($var); $this->latency_999 = $var; + + return $this; } /** - *
      * server cpu usage percentage
-     * 
* - * double server_cpu_usage = 12; + * Generated from protobuf field double server_cpu_usage = 12; + * @return float */ public function getServerCpuUsage() { @@ -372,24 +398,25 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - *
      * server cpu usage percentage
-     * 
* - * double server_cpu_usage = 12; + * Generated from protobuf field double server_cpu_usage = 12; + * @param float $var + * @return $this */ public function setServerCpuUsage($var) { GPBUtil::checkDouble($var); $this->server_cpu_usage = $var; + + return $this; } /** - *
      * Number of requests that succeeded/failed
-     * 
* - * double successful_requests_per_second = 13; + * Generated from protobuf field double successful_requests_per_second = 13; + * @return float */ public function getSuccessfulRequestsPerSecond() { @@ -397,20 +424,23 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - *
      * Number of requests that succeeded/failed
-     * 
* - * double successful_requests_per_second = 13; + * Generated from protobuf field double successful_requests_per_second = 13; + * @param float $var + * @return $this */ public function setSuccessfulRequestsPerSecond($var) { GPBUtil::checkDouble($var); $this->successful_requests_per_second = $var; + + return $this; } /** - * double failed_requests_per_second = 14; + * Generated from protobuf field double failed_requests_per_second = 14; + * @return float */ public function getFailedRequestsPerSecond() { @@ -418,12 +448,112 @@ class ScenarioResultSummary extends \Google\Protobuf\Internal\Message } /** - * double failed_requests_per_second = 14; + * Generated from protobuf field double failed_requests_per_second = 14; + * @param float $var + * @return $this */ public function setFailedRequestsPerSecond($var) { GPBUtil::checkDouble($var); $this->failed_requests_per_second = $var; + + return $this; + } + + /** + * Number of polls called inside completion queue per request + * + * Generated from protobuf field double client_polls_per_request = 15; + * @return float + */ + public function getClientPollsPerRequest() + { + return $this->client_polls_per_request; + } + + /** + * Number of polls called inside completion queue per request + * + * Generated from protobuf field double client_polls_per_request = 15; + * @param float $var + * @return $this + */ + public function setClientPollsPerRequest($var) + { + GPBUtil::checkDouble($var); + $this->client_polls_per_request = $var; + + return $this; + } + + /** + * Generated from protobuf field double server_polls_per_request = 16; + * @return float + */ + public function getServerPollsPerRequest() + { + return $this->server_polls_per_request; + } + + /** + * Generated from protobuf field double server_polls_per_request = 16; + * @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 double server_queries_per_cpu_sec = 17; + * @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 double server_queries_per_cpu_sec = 17; + * @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 double client_queries_per_cpu_sec = 18; + * @return float + */ + public function getClientQueriesPerCpuSec() + { + return $this->client_queries_per_cpu_sec; + } + + /** + * Generated from protobuf field double client_queries_per_cpu_sec = 18; + * @param float $var + * @return $this + */ + public function setClientQueriesPerCpuSec($var) + { + GPBUtil::checkDouble($var); + $this->client_queries_per_cpu_sec = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/Scenarios.php b/src/php/tests/qps/generated_code/Grpc/Testing/Scenarios.php index 278f555b76..2146b4776e 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/Scenarios.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/Scenarios.php @@ -9,16 +9,14 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * A set of scenarios to be run with qps_json_driver
- * 
* - * Protobuf type grpc.testing.Scenarios + * Generated from protobuf message grpc.testing.Scenarios */ class Scenarios extends \Google\Protobuf\Internal\Message { /** - * repeated .grpc.testing.Scenario scenarios = 1; + * Generated from protobuf field repeated .grpc.testing.Scenario scenarios = 1; */ private $scenarios; @@ -28,7 +26,8 @@ class Scenarios extends \Google\Protobuf\Internal\Message } /** - * repeated .grpc.testing.Scenario scenarios = 1; + * Generated from protobuf field repeated .grpc.testing.Scenario scenarios = 1; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getScenarios() { @@ -36,12 +35,16 @@ class Scenarios extends \Google\Protobuf\Internal\Message } /** - * repeated .grpc.testing.Scenario scenarios = 1; + * Generated from protobuf field repeated .grpc.testing.Scenario scenarios = 1; + * @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); - $this->scenarios = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\Scenario::class); + $this->scenarios = $arr; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/SecurityParams.php b/src/php/tests/qps/generated_code/Grpc/Testing/SecurityParams.php index 27a5b95cc9..8ce623a4bc 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/SecurityParams.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/SecurityParams.php @@ -9,22 +9,24 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * presence of SecurityParams implies use of TLS
- * 
* - * Protobuf type grpc.testing.SecurityParams + * Generated from protobuf message grpc.testing.SecurityParams */ class SecurityParams extends \Google\Protobuf\Internal\Message { /** - * bool use_test_ca = 1; + * Generated from protobuf field bool use_test_ca = 1; */ private $use_test_ca = false; /** - * string server_host_override = 2; + * Generated from protobuf field string server_host_override = 2; */ private $server_host_override = ''; + /** + * Generated from protobuf field string cred_type = 3; + */ + private $cred_type = ''; public function __construct() { \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); @@ -32,7 +34,8 @@ class SecurityParams extends \Google\Protobuf\Internal\Message } /** - * bool use_test_ca = 1; + * Generated from protobuf field bool use_test_ca = 1; + * @return bool */ public function getUseTestCa() { @@ -40,16 +43,21 @@ class SecurityParams extends \Google\Protobuf\Internal\Message } /** - * bool use_test_ca = 1; + * Generated from protobuf field bool use_test_ca = 1; + * @param bool $var + * @return $this */ public function setUseTestCa($var) { GPBUtil::checkBool($var); $this->use_test_ca = $var; + + return $this; } /** - * string server_host_override = 2; + * Generated from protobuf field string server_host_override = 2; + * @return string */ public function getServerHostOverride() { @@ -57,12 +65,38 @@ class SecurityParams extends \Google\Protobuf\Internal\Message } /** - * string server_host_override = 2; + * Generated from protobuf field string server_host_override = 2; + * @param string $var + * @return $this */ public function setServerHostOverride($var) { GPBUtil::checkString($var, True); $this->server_host_override = $var; + + return $this; + } + + /** + * Generated from protobuf field string cred_type = 3; + * @return string + */ + public function getCredType() + { + return $this->cred_type; + } + + /** + * Generated from protobuf field string cred_type = 3; + * @param string $var + * @return $this + */ + public function setCredType($var) + { + GPBUtil::checkString($var, True); + $this->cred_type = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ServerArgs.php b/src/php/tests/qps/generated_code/Grpc/Testing/ServerArgs.php index 0d84b80124..acf7e18b6d 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ServerArgs.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ServerArgs.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.ServerArgs + * Generated from protobuf message grpc.testing.ServerArgs */ class ServerArgs extends \Google\Protobuf\Internal\Message { @@ -21,7 +21,8 @@ class ServerArgs extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ServerConfig setup = 1; + * Generated from protobuf field .grpc.testing.ServerConfig setup = 1; + * @return \Grpc\Testing\ServerConfig */ public function getSetup() { @@ -29,16 +30,21 @@ class ServerArgs extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ServerConfig setup = 1; + * Generated from protobuf field .grpc.testing.ServerConfig setup = 1; + * @param \Grpc\Testing\ServerConfig $var + * @return $this */ - public function setSetup(&$var) + public function setSetup($var) { GPBUtil::checkMessage($var, \Grpc\Testing\ServerConfig::class); $this->writeOneof(1, $var); + + return $this; } /** - * .grpc.testing.Mark mark = 2; + * Generated from protobuf field .grpc.testing.Mark mark = 2; + * @return \Grpc\Testing\Mark */ public function getMark() { @@ -46,14 +52,21 @@ class ServerArgs extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.Mark mark = 2; + * Generated from protobuf field .grpc.testing.Mark mark = 2; + * @param \Grpc\Testing\Mark $var + * @return $this */ - public function setMark(&$var) + public function setMark($var) { GPBUtil::checkMessage($var, \Grpc\Testing\Mark::class); $this->writeOneof(2, $var); + + return $this; } + /** + * @return string + */ public function getArgtype() { return $this->whichOneof("argtype"); diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ServerConfig.php b/src/php/tests/qps/generated_code/Grpc/Testing/ServerConfig.php index e2bcede48c..8bd4c69566 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ServerConfig.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ServerConfig.php @@ -9,77 +9,73 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.ServerConfig + * Generated from protobuf message grpc.testing.ServerConfig */ class ServerConfig extends \Google\Protobuf\Internal\Message { /** - * .grpc.testing.ServerType server_type = 1; + * Generated from protobuf field .grpc.testing.ServerType server_type = 1; */ private $server_type = 0; /** - * .grpc.testing.SecurityParams security_params = 2; + * Generated from protobuf field .grpc.testing.SecurityParams security_params = 2; */ private $security_params = null; /** - *
      * Port on which to listen. Zero means pick unused port.
-     * 
* - * int32 port = 4; + * Generated from protobuf field int32 port = 4; */ private $port = 0; /** - *
      * Only for async server. Number of threads used to serve the requests.
-     * 
* - * int32 async_server_threads = 7; + * Generated from protobuf field int32 async_server_threads = 7; */ private $async_server_threads = 0; /** - *
      * Specify the number of cores to limit server to, if desired
-     * 
* - * int32 core_limit = 8; + * Generated from protobuf field int32 core_limit = 8; */ private $core_limit = 0; /** - *
      * payload config, used in generic server.
      * 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
      * 'SimpleRequest' objects in RPC requests.
-     * 
* - * .grpc.testing.PayloadConfig payload_config = 9; + * Generated from protobuf field .grpc.testing.PayloadConfig payload_config = 9; */ private $payload_config = null; /** - *
      * Specify the cores we should run the server on, if desired
-     * 
* - * repeated int32 core_list = 10; + * Generated from protobuf field repeated int32 core_list = 10; */ private $core_list; /** - *
      * If we use an OTHER_SERVER client_type, this string gives more detail
-     * 
* - * string other_server_api = 11; + * Generated from protobuf field string other_server_api = 11; */ private $other_server_api = ''; /** - *
+     * Number of threads that share each completion queue
+     *
+     * Generated from protobuf field int32 threads_per_cq = 12;
+     */
+    private $threads_per_cq = 0;
+    /**
      * Buffer pool size (no buffer pool specified if unset)
-     * 
* - * int32 resource_quota_size = 1001; + * Generated from protobuf field int32 resource_quota_size = 1001; */ private $resource_quota_size = 0; + /** + * Generated from protobuf field repeated .grpc.testing.ChannelArg channel_args = 1002; + */ + private $channel_args; public function __construct() { \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); @@ -87,7 +83,8 @@ class ServerConfig extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ServerType server_type = 1; + * Generated from protobuf field .grpc.testing.ServerType server_type = 1; + * @return int */ public function getServerType() { @@ -95,16 +92,21 @@ class ServerConfig extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ServerType server_type = 1; + * Generated from protobuf field .grpc.testing.ServerType server_type = 1; + * @param int $var + * @return $this */ public function setServerType($var) { GPBUtil::checkEnum($var, \Grpc\Testing\ServerType::class); $this->server_type = $var; + + return $this; } /** - * .grpc.testing.SecurityParams security_params = 2; + * Generated from protobuf field .grpc.testing.SecurityParams security_params = 2; + * @return \Grpc\Testing\SecurityParams */ public function getSecurityParams() { @@ -112,20 +114,23 @@ class ServerConfig extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.SecurityParams security_params = 2; + * Generated from protobuf field .grpc.testing.SecurityParams security_params = 2; + * @param \Grpc\Testing\SecurityParams $var + * @return $this */ - public function setSecurityParams(&$var) + public function setSecurityParams($var) { GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class); $this->security_params = $var; + + return $this; } /** - *
      * Port on which to listen. Zero means pick unused port.
-     * 
* - * int32 port = 4; + * Generated from protobuf field int32 port = 4; + * @return int */ public function getPort() { @@ -133,24 +138,25 @@ class ServerConfig extends \Google\Protobuf\Internal\Message } /** - *
      * Port on which to listen. Zero means pick unused port.
-     * 
* - * int32 port = 4; + * Generated from protobuf field int32 port = 4; + * @param int $var + * @return $this */ public function setPort($var) { GPBUtil::checkInt32($var); $this->port = $var; + + return $this; } /** - *
      * Only for async server. Number of threads used to serve the requests.
-     * 
* - * int32 async_server_threads = 7; + * Generated from protobuf field int32 async_server_threads = 7; + * @return int */ public function getAsyncServerThreads() { @@ -158,24 +164,25 @@ class ServerConfig extends \Google\Protobuf\Internal\Message } /** - *
      * Only for async server. Number of threads used to serve the requests.
-     * 
* - * int32 async_server_threads = 7; + * Generated from protobuf field int32 async_server_threads = 7; + * @param int $var + * @return $this */ public function setAsyncServerThreads($var) { GPBUtil::checkInt32($var); $this->async_server_threads = $var; + + return $this; } /** - *
      * Specify the number of cores to limit server to, if desired
-     * 
* - * int32 core_limit = 8; + * Generated from protobuf field int32 core_limit = 8; + * @return int */ public function getCoreLimit() { @@ -183,27 +190,28 @@ class ServerConfig extends \Google\Protobuf\Internal\Message } /** - *
      * Specify the number of cores to limit server to, if desired
-     * 
* - * int32 core_limit = 8; + * Generated from protobuf field int32 core_limit = 8; + * @param int $var + * @return $this */ public function setCoreLimit($var) { GPBUtil::checkInt32($var); $this->core_limit = $var; + + return $this; } /** - *
      * payload config, used in generic server.
      * 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
      * 'SimpleRequest' objects in RPC requests.
-     * 
* - * .grpc.testing.PayloadConfig payload_config = 9; + * Generated from protobuf field .grpc.testing.PayloadConfig payload_config = 9; + * @return \Grpc\Testing\PayloadConfig */ public function getPayloadConfig() { @@ -211,27 +219,28 @@ class ServerConfig extends \Google\Protobuf\Internal\Message } /** - *
      * payload config, used in generic server.
      * 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
      * 'SimpleRequest' objects in RPC requests.
-     * 
* - * .grpc.testing.PayloadConfig payload_config = 9; + * Generated from protobuf field .grpc.testing.PayloadConfig payload_config = 9; + * @param \Grpc\Testing\PayloadConfig $var + * @return $this */ - public function setPayloadConfig(&$var) + public function setPayloadConfig($var) { GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class); $this->payload_config = $var; + + return $this; } /** - *
      * Specify the cores we should run the server on, if desired
-     * 
* - * repeated int32 core_list = 10; + * Generated from protobuf field repeated int32 core_list = 10; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getCoreList() { @@ -239,24 +248,25 @@ class ServerConfig extends \Google\Protobuf\Internal\Message } /** - *
      * Specify the cores we should run the server on, if desired
-     * 
* - * repeated int32 core_list = 10; + * Generated from protobuf field repeated int32 core_list = 10; + * @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); - $this->core_list = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->core_list = $arr; + + return $this; } /** - *
      * If we use an OTHER_SERVER client_type, this string gives more detail
-     * 
* - * string other_server_api = 11; + * Generated from protobuf field string other_server_api = 11; + * @return string */ public function getOtherServerApi() { @@ -264,24 +274,51 @@ class ServerConfig extends \Google\Protobuf\Internal\Message } /** - *
      * If we use an OTHER_SERVER client_type, this string gives more detail
-     * 
* - * string other_server_api = 11; + * Generated from protobuf field string other_server_api = 11; + * @param string $var + * @return $this */ public function setOtherServerApi($var) { GPBUtil::checkString($var, True); $this->other_server_api = $var; + + return $this; + } + + /** + * Number of threads that share each completion queue + * + * Generated from protobuf field int32 threads_per_cq = 12; + * @return int + */ + public function getThreadsPerCq() + { + return $this->threads_per_cq; + } + + /** + * Number of threads that share each completion queue + * + * Generated from protobuf field int32 threads_per_cq = 12; + * @param int $var + * @return $this + */ + public function setThreadsPerCq($var) + { + GPBUtil::checkInt32($var); + $this->threads_per_cq = $var; + + return $this; } /** - *
      * Buffer pool size (no buffer pool specified if unset)
-     * 
* - * int32 resource_quota_size = 1001; + * Generated from protobuf field int32 resource_quota_size = 1001; + * @return int */ public function getResourceQuotaSize() { @@ -289,16 +326,40 @@ class ServerConfig extends \Google\Protobuf\Internal\Message } /** - *
      * Buffer pool size (no buffer pool specified if unset)
-     * 
* - * int32 resource_quota_size = 1001; + * Generated from protobuf field int32 resource_quota_size = 1001; + * @param int $var + * @return $this */ public function setResourceQuotaSize($var) { GPBUtil::checkInt32($var); $this->resource_quota_size = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .grpc.testing.ChannelArg channel_args = 1002; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannelArgs() + { + return $this->channel_args; + } + + /** + * Generated from protobuf field repeated .grpc.testing.ChannelArg channel_args = 1002; + * @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; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ServerStats.php b/src/php/tests/qps/generated_code/Grpc/Testing/ServerStats.php index 98b2af764c..aea2cb0fce 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ServerStats.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ServerStats.php @@ -9,51 +9,53 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.ServerStats + * Generated from protobuf message grpc.testing.ServerStats */ class ServerStats extends \Google\Protobuf\Internal\Message { /** - *
      * wall clock time change in seconds since last reset
-     * 
* - * double time_elapsed = 1; + * Generated from protobuf field double time_elapsed = 1; */ private $time_elapsed = 0.0; /** - *
      * change in user time (in seconds) used by the server since last reset
-     * 
* - * double time_user = 2; + * Generated from protobuf field double time_user = 2; */ private $time_user = 0.0; /** - *
      * change in server time (in seconds) used by the server process and all
      * threads since last reset
-     * 
* - * double time_system = 3; + * Generated from protobuf field double time_system = 3; */ private $time_system = 0.0; /** - *
      * change in total cpu time of the server (data from proc/stat)
-     * 
* - * uint64 total_cpu_time = 4; + * Generated from protobuf field uint64 total_cpu_time = 4; */ private $total_cpu_time = 0; /** - *
      * change in idle time of the server (data from proc/stat)
-     * 
* - * uint64 idle_cpu_time = 5; + * Generated from protobuf field uint64 idle_cpu_time = 5; */ private $idle_cpu_time = 0; + /** + * Number of polls called inside completion queue + * + * Generated from protobuf field uint64 cq_poll_count = 6; + */ + private $cq_poll_count = 0; + /** + * Core library stats + * + * Generated from protobuf field .grpc.core.Stats core_stats = 7; + */ + private $core_stats = null; public function __construct() { \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce(); @@ -61,11 +63,10 @@ class ServerStats extends \Google\Protobuf\Internal\Message } /** - *
      * wall clock time change in seconds since last reset
-     * 
* - * double time_elapsed = 1; + * Generated from protobuf field double time_elapsed = 1; + * @return float */ public function getTimeElapsed() { @@ -73,24 +74,25 @@ class ServerStats extends \Google\Protobuf\Internal\Message } /** - *
      * wall clock time change in seconds since last reset
-     * 
* - * double time_elapsed = 1; + * Generated from protobuf field double time_elapsed = 1; + * @param float $var + * @return $this */ public function setTimeElapsed($var) { GPBUtil::checkDouble($var); $this->time_elapsed = $var; + + return $this; } /** - *
      * change in user time (in seconds) used by the server since last reset
-     * 
* - * double time_user = 2; + * Generated from protobuf field double time_user = 2; + * @return float */ public function getTimeUser() { @@ -98,25 +100,26 @@ class ServerStats extends \Google\Protobuf\Internal\Message } /** - *
      * change in user time (in seconds) used by the server since last reset
-     * 
* - * double time_user = 2; + * Generated from protobuf field double time_user = 2; + * @param float $var + * @return $this */ public function setTimeUser($var) { GPBUtil::checkDouble($var); $this->time_user = $var; + + return $this; } /** - *
      * change in server time (in seconds) used by the server process and all
      * threads since last reset
-     * 
* - * double time_system = 3; + * Generated from protobuf field double time_system = 3; + * @return float */ public function getTimeSystem() { @@ -124,25 +127,26 @@ class ServerStats extends \Google\Protobuf\Internal\Message } /** - *
      * change in server time (in seconds) used by the server process and all
      * threads since last reset
-     * 
* - * double time_system = 3; + * Generated from protobuf field double time_system = 3; + * @param float $var + * @return $this */ public function setTimeSystem($var) { GPBUtil::checkDouble($var); $this->time_system = $var; + + return $this; } /** - *
      * change in total cpu time of the server (data from proc/stat)
-     * 
* - * uint64 total_cpu_time = 4; + * Generated from protobuf field uint64 total_cpu_time = 4; + * @return int|string */ public function getTotalCpuTime() { @@ -150,24 +154,25 @@ class ServerStats extends \Google\Protobuf\Internal\Message } /** - *
      * change in total cpu time of the server (data from proc/stat)
-     * 
* - * uint64 total_cpu_time = 4; + * Generated from protobuf field uint64 total_cpu_time = 4; + * @param int|string $var + * @return $this */ public function setTotalCpuTime($var) { GPBUtil::checkUint64($var); $this->total_cpu_time = $var; + + return $this; } /** - *
      * change in idle time of the server (data from proc/stat)
-     * 
* - * uint64 idle_cpu_time = 5; + * Generated from protobuf field uint64 idle_cpu_time = 5; + * @return int|string */ public function getIdleCpuTime() { @@ -175,16 +180,70 @@ class ServerStats extends \Google\Protobuf\Internal\Message } /** - *
      * change in idle time of the server (data from proc/stat)
-     * 
* - * uint64 idle_cpu_time = 5; + * Generated from protobuf field uint64 idle_cpu_time = 5; + * @param int|string $var + * @return $this */ public function setIdleCpuTime($var) { GPBUtil::checkUint64($var); $this->idle_cpu_time = $var; + + return $this; + } + + /** + * Number of polls called inside completion queue + * + * Generated from protobuf field uint64 cq_poll_count = 6; + * @return int|string + */ + public function getCqPollCount() + { + return $this->cq_poll_count; + } + + /** + * Number of polls called inside completion queue + * + * Generated from protobuf field uint64 cq_poll_count = 6; + * @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 .grpc.core.Stats core_stats = 7; + * @return \Grpc\Core\Stats + */ + public function getCoreStats() + { + return $this->core_stats; + } + + /** + * Core library stats + * + * Generated from protobuf field .grpc.core.Stats core_stats = 7; + * @param \Grpc\Core\Stats $var + * @return $this + */ + public function setCoreStats($var) + { + GPBUtil::checkMessage($var, \Grpc\Core\Stats::class); + $this->core_stats = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ServerStatus.php b/src/php/tests/qps/generated_code/Grpc/Testing/ServerStatus.php index d293f03fbd..04f2ca7c4a 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ServerStatus.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ServerStatus.php @@ -9,28 +9,24 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.ServerStatus + * Generated from protobuf message grpc.testing.ServerStatus */ class ServerStatus extends \Google\Protobuf\Internal\Message { /** - * .grpc.testing.ServerStats stats = 1; + * Generated from protobuf field .grpc.testing.ServerStats stats = 1; */ private $stats = null; /** - *
      * the port bound by the server
-     * 
* - * int32 port = 2; + * Generated from protobuf field int32 port = 2; */ private $port = 0; /** - *
      * Number of cores available to the server
-     * 
* - * int32 cores = 3; + * Generated from protobuf field int32 cores = 3; */ private $cores = 0; @@ -40,7 +36,8 @@ class ServerStatus extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ServerStats stats = 1; + * Generated from protobuf field .grpc.testing.ServerStats stats = 1; + * @return \Grpc\Testing\ServerStats */ public function getStats() { @@ -48,20 +45,23 @@ class ServerStatus extends \Google\Protobuf\Internal\Message } /** - * .grpc.testing.ServerStats stats = 1; + * Generated from protobuf field .grpc.testing.ServerStats stats = 1; + * @param \Grpc\Testing\ServerStats $var + * @return $this */ - public function setStats(&$var) + public function setStats($var) { GPBUtil::checkMessage($var, \Grpc\Testing\ServerStats::class); $this->stats = $var; + + return $this; } /** - *
      * the port bound by the server
-     * 
* - * int32 port = 2; + * Generated from protobuf field int32 port = 2; + * @return int */ public function getPort() { @@ -69,24 +69,25 @@ class ServerStatus extends \Google\Protobuf\Internal\Message } /** - *
      * the port bound by the server
-     * 
* - * int32 port = 2; + * Generated from protobuf field int32 port = 2; + * @param int $var + * @return $this */ public function setPort($var) { GPBUtil::checkInt32($var); $this->port = $var; + + return $this; } /** - *
      * Number of cores available to the server
-     * 
* - * int32 cores = 3; + * Generated from protobuf field int32 cores = 3; + * @return int */ public function getCores() { @@ -94,16 +95,18 @@ class ServerStatus extends \Google\Protobuf\Internal\Message } /** - *
      * Number of cores available to the server
-     * 
* - * int32 cores = 3; + * Generated from protobuf field int32 cores = 3; + * @param int $var + * @return $this */ public function setCores($var) { GPBUtil::checkInt32($var); $this->cores = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ServerType.php b/src/php/tests/qps/generated_code/Grpc/Testing/ServerType.php index 605c83c3f7..4110e91c18 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ServerType.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ServerType.php @@ -5,28 +5,26 @@ namespace Grpc\Testing; /** - * Protobuf enum grpc.testing.ServerType + * Protobuf enum Grpc\Testing\ServerType */ class ServerType { /** - * SYNC_SERVER = 0; + * Generated from protobuf enum SYNC_SERVER = 0; */ const SYNC_SERVER = 0; /** - * ASYNC_SERVER = 1; + * Generated from protobuf enum ASYNC_SERVER = 1; */ const ASYNC_SERVER = 1; /** - * ASYNC_GENERIC_SERVER = 2; + * Generated from protobuf enum ASYNC_GENERIC_SERVER = 2; */ const ASYNC_GENERIC_SERVER = 2; /** - *
      * used for some language-specific variants
-     * 
* - * OTHER_SERVER = 3; + * Generated from protobuf enum OTHER_SERVER = 3; */ const OTHER_SERVER = 3; } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/SimpleProtoParams.php b/src/php/tests/qps/generated_code/Grpc/Testing/SimpleProtoParams.php index 29834a3be7..507db598f0 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/SimpleProtoParams.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/SimpleProtoParams.php @@ -9,16 +9,16 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.SimpleProtoParams + * Generated from protobuf message grpc.testing.SimpleProtoParams */ class SimpleProtoParams extends \Google\Protobuf\Internal\Message { /** - * int32 req_size = 1; + * Generated from protobuf field int32 req_size = 1; */ private $req_size = 0; /** - * int32 resp_size = 2; + * Generated from protobuf field int32 resp_size = 2; */ private $resp_size = 0; @@ -28,7 +28,8 @@ class SimpleProtoParams extends \Google\Protobuf\Internal\Message } /** - * int32 req_size = 1; + * Generated from protobuf field int32 req_size = 1; + * @return int */ public function getReqSize() { @@ -36,16 +37,21 @@ class SimpleProtoParams extends \Google\Protobuf\Internal\Message } /** - * int32 req_size = 1; + * Generated from protobuf field int32 req_size = 1; + * @param int $var + * @return $this */ public function setReqSize($var) { GPBUtil::checkInt32($var); $this->req_size = $var; + + return $this; } /** - * int32 resp_size = 2; + * Generated from protobuf field int32 resp_size = 2; + * @return int */ public function getRespSize() { @@ -53,12 +59,16 @@ class SimpleProtoParams extends \Google\Protobuf\Internal\Message } /** - * int32 resp_size = 2; + * Generated from protobuf field int32 resp_size = 2; + * @param int $var + * @return $this */ public function setRespSize($var) { GPBUtil::checkInt32($var); $this->resp_size = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/SimpleRequest.php b/src/php/tests/qps/generated_code/Grpc/Testing/SimpleRequest.php index f84c95319f..e0c2d2d94c 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/SimpleRequest.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/SimpleRequest.php @@ -9,81 +9,63 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Unary request.
- * 
* - * Protobuf type grpc.testing.SimpleRequest + * Generated from protobuf message grpc.testing.SimpleRequest */ class SimpleRequest extends \Google\Protobuf\Internal\Message { /** - *
      * DEPRECATED, don't use. To be removed shortly.
      * Desired payload type in the response from the server.
      * If response_type is RANDOM, server randomly chooses one from other formats.
-     * 
* - * .grpc.testing.PayloadType response_type = 1; + * Generated from protobuf field .grpc.testing.PayloadType response_type = 1; */ private $response_type = 0; /** - *
      * Desired payload size in the response from the server.
-     * 
* - * int32 response_size = 2; + * Generated from protobuf field int32 response_size = 2; */ private $response_size = 0; /** - *
      * Optional input payload sent along with the request.
-     * 
* - * .grpc.testing.Payload payload = 3; + * Generated from protobuf field .grpc.testing.Payload payload = 3; */ private $payload = null; /** - *
      * Whether SimpleResponse should include username.
-     * 
* - * bool fill_username = 4; + * Generated from protobuf field bool fill_username = 4; */ private $fill_username = false; /** - *
      * Whether SimpleResponse should include OAuth scope.
-     * 
* - * bool fill_oauth_scope = 5; + * Generated from protobuf field bool fill_oauth_scope = 5; */ private $fill_oauth_scope = false; /** - *
      * Whether to request the server to compress the response. This field is
      * "nullable" in order to interoperate seamlessly with clients not able to
      * implement the full compression tests by introspecting the call to verify
      * the response's compression status.
-     * 
* - * .grpc.testing.BoolValue response_compressed = 6; + * Generated from protobuf field .grpc.testing.BoolValue response_compressed = 6; */ private $response_compressed = null; /** - *
      * Whether server should return a given status
-     * 
* - * .grpc.testing.EchoStatus response_status = 7; + * Generated from protobuf field .grpc.testing.EchoStatus response_status = 7; */ private $response_status = null; /** - *
      * Whether the server should expect this request to be compressed.
-     * 
* - * .grpc.testing.BoolValue expect_compressed = 8; + * Generated from protobuf field .grpc.testing.BoolValue expect_compressed = 8; */ private $expect_compressed = null; @@ -93,13 +75,12 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message } /** - *
      * DEPRECATED, don't use. To be removed shortly.
      * Desired payload type in the response from the server.
      * If response_type is RANDOM, server randomly chooses one from other formats.
-     * 
* - * .grpc.testing.PayloadType response_type = 1; + * Generated from protobuf field .grpc.testing.PayloadType response_type = 1; + * @return int */ public function getResponseType() { @@ -107,26 +88,27 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message } /** - *
      * DEPRECATED, don't use. To be removed shortly.
      * Desired payload type in the response from the server.
      * If response_type is RANDOM, server randomly chooses one from other formats.
-     * 
* - * .grpc.testing.PayloadType response_type = 1; + * Generated from protobuf field .grpc.testing.PayloadType response_type = 1; + * @param int $var + * @return $this */ public function setResponseType($var) { GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); $this->response_type = $var; + + return $this; } /** - *
      * Desired payload size in the response from the server.
-     * 
* - * int32 response_size = 2; + * Generated from protobuf field int32 response_size = 2; + * @return int */ public function getResponseSize() { @@ -134,24 +116,25 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Desired payload size in the response from the server.
-     * 
* - * int32 response_size = 2; + * Generated from protobuf field int32 response_size = 2; + * @param int $var + * @return $this */ public function setResponseSize($var) { GPBUtil::checkInt32($var); $this->response_size = $var; + + return $this; } /** - *
      * Optional input payload sent along with the request.
-     * 
* - * .grpc.testing.Payload payload = 3; + * Generated from protobuf field .grpc.testing.Payload payload = 3; + * @return \Grpc\Testing\Payload */ public function getPayload() { @@ -159,24 +142,25 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Optional input payload sent along with the request.
-     * 
* - * .grpc.testing.Payload payload = 3; + * Generated from protobuf field .grpc.testing.Payload payload = 3; + * @param \Grpc\Testing\Payload $var + * @return $this */ - public function setPayload(&$var) + public function setPayload($var) { GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); $this->payload = $var; + + return $this; } /** - *
      * Whether SimpleResponse should include username.
-     * 
* - * bool fill_username = 4; + * Generated from protobuf field bool fill_username = 4; + * @return bool */ public function getFillUsername() { @@ -184,24 +168,25 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Whether SimpleResponse should include username.
-     * 
* - * bool fill_username = 4; + * Generated from protobuf field bool fill_username = 4; + * @param bool $var + * @return $this */ public function setFillUsername($var) { GPBUtil::checkBool($var); $this->fill_username = $var; + + return $this; } /** - *
      * Whether SimpleResponse should include OAuth scope.
-     * 
* - * bool fill_oauth_scope = 5; + * Generated from protobuf field bool fill_oauth_scope = 5; + * @return bool */ public function getFillOauthScope() { @@ -209,27 +194,28 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Whether SimpleResponse should include OAuth scope.
-     * 
* - * bool fill_oauth_scope = 5; + * Generated from protobuf field bool fill_oauth_scope = 5; + * @param bool $var + * @return $this */ public function setFillOauthScope($var) { GPBUtil::checkBool($var); $this->fill_oauth_scope = $var; + + return $this; } /** - *
      * Whether to request the server to compress the response. This field is
      * "nullable" in order to interoperate seamlessly with clients not able to
      * implement the full compression tests by introspecting the call to verify
      * the response's compression status.
-     * 
* - * .grpc.testing.BoolValue response_compressed = 6; + * Generated from protobuf field .grpc.testing.BoolValue response_compressed = 6; + * @return \Grpc\Testing\BoolValue */ public function getResponseCompressed() { @@ -237,27 +223,28 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Whether to request the server to compress the response. This field is
      * "nullable" in order to interoperate seamlessly with clients not able to
      * implement the full compression tests by introspecting the call to verify
      * the response's compression status.
-     * 
* - * .grpc.testing.BoolValue response_compressed = 6; + * Generated from protobuf field .grpc.testing.BoolValue response_compressed = 6; + * @param \Grpc\Testing\BoolValue $var + * @return $this */ - public function setResponseCompressed(&$var) + public function setResponseCompressed($var) { GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); $this->response_compressed = $var; + + return $this; } /** - *
      * Whether server should return a given status
-     * 
* - * .grpc.testing.EchoStatus response_status = 7; + * Generated from protobuf field .grpc.testing.EchoStatus response_status = 7; + * @return \Grpc\Testing\EchoStatus */ public function getResponseStatus() { @@ -265,24 +252,25 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Whether server should return a given status
-     * 
* - * .grpc.testing.EchoStatus response_status = 7; + * Generated from protobuf field .grpc.testing.EchoStatus response_status = 7; + * @param \Grpc\Testing\EchoStatus $var + * @return $this */ - public function setResponseStatus(&$var) + public function setResponseStatus($var) { GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class); $this->response_status = $var; + + return $this; } /** - *
      * Whether the server should expect this request to be compressed.
-     * 
* - * .grpc.testing.BoolValue expect_compressed = 8; + * Generated from protobuf field .grpc.testing.BoolValue expect_compressed = 8; + * @return \Grpc\Testing\BoolValue */ public function getExpectCompressed() { @@ -290,16 +278,18 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Whether the server should expect this request to be compressed.
-     * 
* - * .grpc.testing.BoolValue expect_compressed = 8; + * Generated from protobuf field .grpc.testing.BoolValue expect_compressed = 8; + * @param \Grpc\Testing\BoolValue $var + * @return $this */ - public function setExpectCompressed(&$var) + public function setExpectCompressed($var) { GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); $this->expect_compressed = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/SimpleResponse.php b/src/php/tests/qps/generated_code/Grpc/Testing/SimpleResponse.php index ccc628ec4c..d49f33746e 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/SimpleResponse.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/SimpleResponse.php @@ -9,37 +9,29 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Unary response, as configured by the request.
- * 
* - * Protobuf type grpc.testing.SimpleResponse + * Generated from protobuf message grpc.testing.SimpleResponse */ class SimpleResponse extends \Google\Protobuf\Internal\Message { /** - *
      * Payload to increase message size.
-     * 
* - * .grpc.testing.Payload payload = 1; + * Generated from protobuf field .grpc.testing.Payload payload = 1; */ private $payload = null; /** - *
      * The user the request came from, for verifying authentication was
      * successful when the client expected it.
-     * 
* - * string username = 2; + * Generated from protobuf field string username = 2; */ private $username = ''; /** - *
      * OAuth scope.
-     * 
* - * string oauth_scope = 3; + * Generated from protobuf field string oauth_scope = 3; */ private $oauth_scope = ''; @@ -49,11 +41,10 @@ class SimpleResponse extends \Google\Protobuf\Internal\Message } /** - *
      * Payload to increase message size.
-     * 
* - * .grpc.testing.Payload payload = 1; + * Generated from protobuf field .grpc.testing.Payload payload = 1; + * @return \Grpc\Testing\Payload */ public function getPayload() { @@ -61,25 +52,26 @@ class SimpleResponse extends \Google\Protobuf\Internal\Message } /** - *
      * Payload to increase message size.
-     * 
* - * .grpc.testing.Payload payload = 1; + * Generated from protobuf field .grpc.testing.Payload payload = 1; + * @param \Grpc\Testing\Payload $var + * @return $this */ - public function setPayload(&$var) + public function setPayload($var) { GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); $this->payload = $var; + + return $this; } /** - *
      * The user the request came from, for verifying authentication was
      * successful when the client expected it.
-     * 
* - * string username = 2; + * Generated from protobuf field string username = 2; + * @return string */ public function getUsername() { @@ -87,25 +79,26 @@ class SimpleResponse extends \Google\Protobuf\Internal\Message } /** - *
      * The user the request came from, for verifying authentication was
      * successful when the client expected it.
-     * 
* - * string username = 2; + * Generated from protobuf field string username = 2; + * @param string $var + * @return $this */ public function setUsername($var) { GPBUtil::checkString($var, True); $this->username = $var; + + return $this; } /** - *
      * OAuth scope.
-     * 
* - * string oauth_scope = 3; + * Generated from protobuf field string oauth_scope = 3; + * @return string */ public function getOauthScope() { @@ -113,16 +106,18 @@ class SimpleResponse extends \Google\Protobuf\Internal\Message } /** - *
      * OAuth scope.
-     * 
* - * string oauth_scope = 3; + * Generated from protobuf field string oauth_scope = 3; + * @param string $var + * @return $this */ public function setOauthScope($var) { GPBUtil::checkString($var, True); $this->oauth_scope = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/StreamingInputCallRequest.php b/src/php/tests/qps/generated_code/Grpc/Testing/StreamingInputCallRequest.php index d7bbc70779..a7460af83a 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/StreamingInputCallRequest.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/StreamingInputCallRequest.php @@ -9,31 +9,25 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Client-streaming request.
- * 
* - * Protobuf type grpc.testing.StreamingInputCallRequest + * Generated from protobuf message grpc.testing.StreamingInputCallRequest */ class StreamingInputCallRequest extends \Google\Protobuf\Internal\Message { /** - *
      * Optional input payload sent along with the request.
-     * 
* - * .grpc.testing.Payload payload = 1; + * Generated from protobuf field .grpc.testing.Payload payload = 1; */ private $payload = null; /** - *
      * Whether the server should expect this request to be compressed. This field
      * is "nullable" in order to interoperate seamlessly with servers not able to
      * implement the full compression tests by introspecting the call to verify
      * the request's compression status.
-     * 
* - * .grpc.testing.BoolValue expect_compressed = 2; + * Generated from protobuf field .grpc.testing.BoolValue expect_compressed = 2; */ private $expect_compressed = null; @@ -43,11 +37,10 @@ class StreamingInputCallRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Optional input payload sent along with the request.
-     * 
* - * .grpc.testing.Payload payload = 1; + * Generated from protobuf field .grpc.testing.Payload payload = 1; + * @return \Grpc\Testing\Payload */ public function getPayload() { @@ -55,27 +48,28 @@ class StreamingInputCallRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Optional input payload sent along with the request.
-     * 
* - * .grpc.testing.Payload payload = 1; + * Generated from protobuf field .grpc.testing.Payload payload = 1; + * @param \Grpc\Testing\Payload $var + * @return $this */ - public function setPayload(&$var) + public function setPayload($var) { GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); $this->payload = $var; + + return $this; } /** - *
      * Whether the server should expect this request to be compressed. This field
      * is "nullable" in order to interoperate seamlessly with servers not able to
      * implement the full compression tests by introspecting the call to verify
      * the request's compression status.
-     * 
* - * .grpc.testing.BoolValue expect_compressed = 2; + * Generated from protobuf field .grpc.testing.BoolValue expect_compressed = 2; + * @return \Grpc\Testing\BoolValue */ public function getExpectCompressed() { @@ -83,19 +77,21 @@ class StreamingInputCallRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Whether the server should expect this request to be compressed. This field
      * is "nullable" in order to interoperate seamlessly with servers not able to
      * implement the full compression tests by introspecting the call to verify
      * the request's compression status.
-     * 
* - * .grpc.testing.BoolValue expect_compressed = 2; + * Generated from protobuf field .grpc.testing.BoolValue expect_compressed = 2; + * @param \Grpc\Testing\BoolValue $var + * @return $this */ - public function setExpectCompressed(&$var) + public function setExpectCompressed($var) { GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); $this->expect_compressed = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/StreamingInputCallResponse.php b/src/php/tests/qps/generated_code/Grpc/Testing/StreamingInputCallResponse.php index fdd1d0dbf8..41f3893aa3 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/StreamingInputCallResponse.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/StreamingInputCallResponse.php @@ -9,20 +9,16 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Client-streaming response.
- * 
* - * Protobuf type grpc.testing.StreamingInputCallResponse + * Generated from protobuf message grpc.testing.StreamingInputCallResponse */ class StreamingInputCallResponse extends \Google\Protobuf\Internal\Message { /** - *
      * Aggregated size of payloads received from the client.
-     * 
* - * int32 aggregated_payload_size = 1; + * Generated from protobuf field int32 aggregated_payload_size = 1; */ private $aggregated_payload_size = 0; @@ -32,11 +28,10 @@ class StreamingInputCallResponse extends \Google\Protobuf\Internal\Message } /** - *
      * Aggregated size of payloads received from the client.
-     * 
* - * int32 aggregated_payload_size = 1; + * Generated from protobuf field int32 aggregated_payload_size = 1; + * @return int */ public function getAggregatedPayloadSize() { @@ -44,16 +39,18 @@ class StreamingInputCallResponse extends \Google\Protobuf\Internal\Message } /** - *
      * Aggregated size of payloads received from the client.
-     * 
* - * int32 aggregated_payload_size = 1; + * Generated from protobuf field int32 aggregated_payload_size = 1; + * @param int $var + * @return $this */ public function setAggregatedPayloadSize($var) { GPBUtil::checkInt32($var); $this->aggregated_payload_size = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/StreamingOutputCallRequest.php b/src/php/tests/qps/generated_code/Grpc/Testing/StreamingOutputCallRequest.php index 2aab5fadad..69d9cecffa 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/StreamingOutputCallRequest.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/StreamingOutputCallRequest.php @@ -9,48 +9,38 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Server-streaming request.
- * 
* - * Protobuf type grpc.testing.StreamingOutputCallRequest + * Generated from protobuf message grpc.testing.StreamingOutputCallRequest */ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message { /** - *
      * DEPRECATED, don't use. To be removed shortly.
      * Desired payload type in the response from the server.
      * If response_type is RANDOM, the payload from each response in the stream
      * might be of different types. This is to simulate a mixed type of payload
      * stream.
-     * 
* - * .grpc.testing.PayloadType response_type = 1; + * Generated from protobuf field .grpc.testing.PayloadType response_type = 1; */ private $response_type = 0; /** - *
      * Configuration for each expected response message.
-     * 
* - * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * Generated from protobuf field repeated .grpc.testing.ResponseParameters response_parameters = 2; */ private $response_parameters; /** - *
      * Optional input payload sent along with the request.
-     * 
* - * .grpc.testing.Payload payload = 3; + * Generated from protobuf field .grpc.testing.Payload payload = 3; */ private $payload = null; /** - *
      * Whether server should return a given status
-     * 
* - * .grpc.testing.EchoStatus response_status = 7; + * Generated from protobuf field .grpc.testing.EchoStatus response_status = 7; */ private $response_status = null; @@ -60,15 +50,14 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message } /** - *
      * DEPRECATED, don't use. To be removed shortly.
      * Desired payload type in the response from the server.
      * If response_type is RANDOM, the payload from each response in the stream
      * might be of different types. This is to simulate a mixed type of payload
      * stream.
-     * 
* - * .grpc.testing.PayloadType response_type = 1; + * Generated from protobuf field .grpc.testing.PayloadType response_type = 1; + * @return int */ public function getResponseType() { @@ -76,28 +65,29 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message } /** - *
      * DEPRECATED, don't use. To be removed shortly.
      * Desired payload type in the response from the server.
      * If response_type is RANDOM, the payload from each response in the stream
      * might be of different types. This is to simulate a mixed type of payload
      * stream.
-     * 
* - * .grpc.testing.PayloadType response_type = 1; + * Generated from protobuf field .grpc.testing.PayloadType response_type = 1; + * @param int $var + * @return $this */ public function setResponseType($var) { GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); $this->response_type = $var; + + return $this; } /** - *
      * Configuration for each expected response message.
-     * 
* - * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * Generated from protobuf field repeated .grpc.testing.ResponseParameters response_parameters = 2; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getResponseParameters() { @@ -105,24 +95,25 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Configuration for each expected response message.
-     * 
* - * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * Generated from protobuf field repeated .grpc.testing.ResponseParameters response_parameters = 2; + * @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); - $this->response_parameters = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ResponseParameters::class); + $this->response_parameters = $arr; + + return $this; } /** - *
      * Optional input payload sent along with the request.
-     * 
* - * .grpc.testing.Payload payload = 3; + * Generated from protobuf field .grpc.testing.Payload payload = 3; + * @return \Grpc\Testing\Payload */ public function getPayload() { @@ -130,24 +121,25 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Optional input payload sent along with the request.
-     * 
* - * .grpc.testing.Payload payload = 3; + * Generated from protobuf field .grpc.testing.Payload payload = 3; + * @param \Grpc\Testing\Payload $var + * @return $this */ - public function setPayload(&$var) + public function setPayload($var) { GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); $this->payload = $var; + + return $this; } /** - *
      * Whether server should return a given status
-     * 
* - * .grpc.testing.EchoStatus response_status = 7; + * Generated from protobuf field .grpc.testing.EchoStatus response_status = 7; + * @return \Grpc\Testing\EchoStatus */ public function getResponseStatus() { @@ -155,16 +147,18 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message } /** - *
      * Whether server should return a given status
-     * 
* - * .grpc.testing.EchoStatus response_status = 7; + * Generated from protobuf field .grpc.testing.EchoStatus response_status = 7; + * @param \Grpc\Testing\EchoStatus $var + * @return $this */ - public function setResponseStatus(&$var) + public function setResponseStatus($var) { GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class); $this->response_status = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/StreamingOutputCallResponse.php b/src/php/tests/qps/generated_code/Grpc/Testing/StreamingOutputCallResponse.php index c06c78c9d8..52315bb499 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/StreamingOutputCallResponse.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/StreamingOutputCallResponse.php @@ -9,20 +9,16 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - *
  * Server-streaming response, as configured by the request and parameters.
- * 
* - * Protobuf type grpc.testing.StreamingOutputCallResponse + * Generated from protobuf message grpc.testing.StreamingOutputCallResponse */ class StreamingOutputCallResponse extends \Google\Protobuf\Internal\Message { /** - *
      * Payload to increase response size.
-     * 
* - * .grpc.testing.Payload payload = 1; + * Generated from protobuf field .grpc.testing.Payload payload = 1; */ private $payload = null; @@ -32,11 +28,10 @@ class StreamingOutputCallResponse extends \Google\Protobuf\Internal\Message } /** - *
      * Payload to increase response size.
-     * 
* - * .grpc.testing.Payload payload = 1; + * Generated from protobuf field .grpc.testing.Payload payload = 1; + * @return \Grpc\Testing\Payload */ public function getPayload() { @@ -44,16 +39,18 @@ class StreamingOutputCallResponse extends \Google\Protobuf\Internal\Message } /** - *
      * Payload to increase response size.
-     * 
* - * .grpc.testing.Payload payload = 1; + * Generated from protobuf field .grpc.testing.Payload payload = 1; + * @param \Grpc\Testing\Payload $var + * @return $this */ - public function setPayload(&$var) + public function setPayload($var) { GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); $this->payload = $var; + + return $this; } } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/Void.php b/src/php/tests/qps/generated_code/Grpc/Testing/Void.php index 38c100845a..623021d99b 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/Void.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/Void.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type grpc.testing.Void + * Generated from protobuf message grpc.testing.Void */ class Void extends \Google\Protobuf\Internal\Message { diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/WorkerServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/WorkerServiceClient.php index 959d839c80..98c244ff9d 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/WorkerServiceClient.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/WorkerServiceClient.php @@ -18,17 +18,19 @@ // // An integration test service that covers all the method signature permutations // 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 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) { - parent::__construct($hostname, $opts, $channel); + parent::__construct($hostname, $opts, $channel); } /** @@ -42,9 +44,9 @@ namespace Grpc\Testing { * @param array $options call options */ public function RunServer($metadata = [], $options = []) { - return $this->_bidiRequest('/grpc.testing.WorkerService/RunServer', - ['\Grpc\Testing\ServerStatus','decode'], - $metadata, $options); + return $this->_bidiRequest('/grpc.testing.WorkerService/RunServer', + ['\Grpc\Testing\ServerStatus','decode'], + $metadata, $options); } /** @@ -58,9 +60,9 @@ namespace Grpc\Testing { * @param array $options call options */ public function RunClient($metadata = [], $options = []) { - return $this->_bidiRequest('/grpc.testing.WorkerService/RunClient', - ['\Grpc\Testing\ClientStatus','decode'], - $metadata, $options); + return $this->_bidiRequest('/grpc.testing.WorkerService/RunClient', + ['\Grpc\Testing\ClientStatus','decode'], + $metadata, $options); } /** @@ -71,10 +73,10 @@ namespace Grpc\Testing { */ public function CoreCount(\Grpc\Testing\CoreRequest $argument, $metadata = [], $options = []) { - return $this->_simpleRequest('/grpc.testing.WorkerService/CoreCount', - $argument, - ['\Grpc\Testing\CoreResponse', 'decode'], - $metadata, $options); + return $this->_simpleRequest('/grpc.testing.WorkerService/CoreCount', + $argument, + ['\Grpc\Testing\CoreResponse', 'decode'], + $metadata, $options); } /** @@ -85,12 +87,10 @@ namespace Grpc\Testing { */ public function QuitWorker(\Grpc\Testing\Void $argument, $metadata = [], $options = []) { - return $this->_simpleRequest('/grpc.testing.WorkerService/QuitWorker', - $argument, - ['\Grpc\Testing\Void', 'decode'], - $metadata, $options); + return $this->_simpleRequest('/grpc.testing.WorkerService/QuitWorker', + $argument, + ['\Grpc\Testing\Void', 'decode'], + $metadata, $options); } - } - } diff --git a/src/php/tests/qps/histogram.php b/src/php/tests/qps/histogram.php new file mode 100644 index 0000000000..c11a67c618 --- /dev/null +++ b/src/php/tests/qps/histogram.php @@ -0,0 +1,93 @@ +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); + } +} -- cgit v1.2.3