Skip to content
Snippets Groups Projects
Commit a2005032 authored by Vijay Pai's avatar Vijay Pai Committed by GitHub
Browse files

Merge pull request #10012 from vjpai/phpqps

PHP benchmarking performance client, proxied through Ruby
parents b290fc9d 958ded97
No related branches found
No related tags found
No related merge requests found
Showing
with 1613 additions and 0 deletions
<?php
/*
*
* Copyright 2017, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*
* PHP client for QPS testing works as follows:
* 1. Gets initiated by a call from a proxy that implements the worker service. The
* argument to this client is the proxy connection information
* 2. Initiate an RPC to the proxy to get ClientConfig
* 3. Initiate a client-side telemetry RPC to the proxy
* 4. Parse the client config, which includes server target information and then start
* a unary or streaming test as appropriate.
* 5. After each completed RPC, send its timing to the proxy. The proxy does all histogramming
* 6. Proxy will respond on the timing channel when it's time to complete. Our
* next timing write will fail and we know that it's time to stop
* The above complex dance is since threading and async are not idiomatic and we
* shouldn't ever be waiting to read a mark
*
* This test only supports a single channel since threading/async is not idiomatic
* This test supports unary or streaming ping-pongs, as well as open-loop
*
*/
require dirname(__FILE__).'/vendor/autoload.php';
/**
* Assertion function that always exits with an error code if the assertion is
* falsy.
*
* @param $value Assertion value. Should be true.
* @param $error_message Message to display if the assertion is false
*/
function hardAssert($value, $error_message)
{
if (!$value) {
echo $error_message."\n";
exit(1);
}
}
function hardAssertIfStatusOk($status)
{
if ($status->code !== Grpc\STATUS_OK) {
echo "Call did not complete successfully. Status object:\n";
var_dump($status);
exit(1);
}
}
/* Start the actual client */
function qps_client_main($proxy_address) {
echo "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";
$stubopts = [];
if ($config->getSecurityParams()) {
if ($config->getSecurityParams()->getUseTestCa()) {
$stubopts['credentials'] = Grpc\ChannelCredentials::createSsl(
file_get_contents(dirname(__FILE__).'/../data/ca.pem'));
} else {
$stubopts['credentials'] = Grpc\ChannelCredentials::createSsl(null);
}
$override = $config->getSecurityParams()->getServerHostOverride();
if ($override) {
$stubopts['grpc.ssl_target_name_override'] = $override;
$stubopts['grpc.default_authority'] = $override;
}
} else {
$stubopts['credentials'] = Grpc\ChannelCredentials::createInsecure();
}
echo "Initiating php benchmarking client\n";
$stub = new Grpc\Testing\BenchmarkServiceClient(
$config->getServerTargets()[0], $stubopts);
$req = new Grpc\Testing\SimpleRequest();
$req->setResponseType(Grpc\Testing\PayloadType::COMPRESSABLE);
$req->setResponseSize($config->getPayloadConfig()->getSimpleParams()->getRespSize());
$payload = new Grpc\Testing\Payload();
$payload->setType(Grpc\Testing\PayloadType::COMPRESSABLE);
$payload->setBody(str_repeat("\0", $config->getPayloadConfig()->getSimpleParams()->getReqSize()));
$req->setPayload($payload);
/* TODO(stanley-cheung): Enable the following by removing the 0&& once protobuf
* properly supports oneof in PHP */
if (0 && $config->getLoadParams()->getLoad() == "poisson") {
$poisson = true;
$lamrecip = 1.0/($config->getLoadParams()->getPoisson()->getOfferedLoad());
$issue = microtime(true) + $lamrecip * -log(1.0-rand()/(getrandmax()+1));
} else {
$poisson = false;
}
$metric = new Grpc\Testing\ProxyStat;
$telemetry = $proxystub->ReportTime();
if ($config->getRpcType() == Grpc\Testing\RpcType::UNARY) {
while (1) {
if ($poisson) {
time_sleep_until($issue);
$issue = $issue + $lamrecip * -log(1.0-rand()/(getrandmax()+1));
}
$startreq = microtime(true);
list($resp,$status) = $stub->UnaryCall($req)->wait();
hardAssertIfStatusOk($status);
$metric->setLatency(microtime(true)-$startreq);
$telemetry->write($metric);
}
} else {
$stream = $stub->StreamingCall();
while (1) {
if ($poisson) {
time_sleep_until($issue);
$issue = $issue + $lamrecip * -log(1.0-rand()/(getrandmax()+1));
}
$startreq = microtime(true);
$stream->write($req);
$resp = $stream->read();
$metric->setLatency(microtime(true)-$startreq);
$telemetry->write($metric);
}
}
}
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
qps_client_main($argv[1]);
{
"minimum-stability": "dev",
"require": {
"grpc/grpc": "dev-master"
},
"autoload": {
"psr-4": {
"": "generated_code/"
}
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class Control
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
\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"
));
static::$is_initialized = true;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class Messages
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0ad50a0a257372632f70726f746f2f677270632f74657374696e672f6d65" .
"7373616765732e70726f746f120c677270632e74657374696e67221a0a09" .
"426f6f6c56616c7565120d0a0576616c756518012001280822400a075061" .
"796c6f616412270a047479706518012001280e32192e677270632e746573" .
"74696e672e5061796c6f616454797065120c0a04626f647918022001280c" .
"222b0a0a4563686f537461747573120c0a04636f6465180120012805120f" .
"0a076d65737361676518022001280922ce020a0d53696d706c6552657175" .
"65737412300a0d726573706f6e73655f7479706518012001280e32192e67" .
"7270632e74657374696e672e5061796c6f61645479706512150a0d726573" .
"706f6e73655f73697a6518022001280512260a077061796c6f6164180320" .
"01280b32152e677270632e74657374696e672e5061796c6f616412150a0d" .
"66696c6c5f757365726e616d6518042001280812180a1066696c6c5f6f61" .
"7574685f73636f706518052001280812340a13726573706f6e73655f636f" .
"6d7072657373656418062001280b32172e677270632e74657374696e672e" .
"426f6f6c56616c756512310a0f726573706f6e73655f7374617475731807" .
"2001280b32182e677270632e74657374696e672e4563686f537461747573" .
"12320a116578706563745f636f6d7072657373656418082001280b32172e" .
"677270632e74657374696e672e426f6f6c56616c7565225f0a0e53696d70" .
"6c65526573706f6e736512260a077061796c6f616418012001280b32152e" .
"677270632e74657374696e672e5061796c6f616412100a08757365726e61" .
"6d6518022001280912130a0b6f617574685f73636f706518032001280922" .
"770a1953747265616d696e67496e70757443616c6c526571756573741226" .
"0a077061796c6f616418012001280b32152e677270632e74657374696e67" .
"2e5061796c6f616412320a116578706563745f636f6d7072657373656418" .
"022001280b32172e677270632e74657374696e672e426f6f6c56616c7565" .
"223d0a1a53747265616d696e67496e70757443616c6c526573706f6e7365" .
"121f0a17616767726567617465645f7061796c6f61645f73697a65180120" .
"01280522640a12526573706f6e7365506172616d6574657273120c0a0473" .
"697a6518012001280512130a0b696e74657276616c5f7573180220012805" .
"122b0a0a636f6d7072657373656418032001280b32172e677270632e7465" .
"7374696e672e426f6f6c56616c756522e8010a1a53747265616d696e674f" .
"757470757443616c6c5265717565737412300a0d726573706f6e73655f74" .
"79706518012001280e32192e677270632e74657374696e672e5061796c6f" .
"616454797065123d0a13726573706f6e73655f706172616d657465727318" .
"022003280b32202e677270632e74657374696e672e526573706f6e736550" .
"6172616d657465727312260a077061796c6f616418032001280b32152e67" .
"7270632e74657374696e672e5061796c6f616412310a0f726573706f6e73" .
"655f73746174757318072001280b32182e677270632e74657374696e672e" .
"4563686f53746174757322450a1b53747265616d696e674f757470757443" .
"616c6c526573706f6e736512260a077061796c6f616418012001280b3215" .
"2e677270632e74657374696e672e5061796c6f616422330a0f5265636f6e" .
"6e656374506172616d7312200a186d61785f7265636f6e6e6563745f6261" .
"636b6f66665f6d7318012001280522330a0d5265636f6e6e656374496e66" .
"6f120e0a0670617373656418012001280812120a0a6261636b6f66665f6d" .
"731802200328052a1f0a0b5061796c6f61645479706512100a0c434f4d50" .
"5245535341424c451000620670726f746f33"
));
static::$is_initialized = true;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/payloads.proto
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class Payloads
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0a93030a257372632f70726f746f2f677270632f74657374696e672f7061" .
"796c6f6164732e70726f746f120c677270632e74657374696e6722370a10" .
"42797465427566666572506172616d7312100a087265715f73697a651801" .
"2001280512110a09726573705f73697a6518022001280522380a1153696d" .
"706c6550726f746f506172616d7312100a087265715f73697a6518012001" .
"280512110a09726573705f73697a6518022001280522140a12436f6d706c" .
"657850726f746f506172616d7322ca010a0d5061796c6f6164436f6e6669" .
"6712380a0e627974656275665f706172616d7318012001280b321e2e6772" .
"70632e74657374696e672e42797465427566666572506172616d73480012" .
"380a0d73696d706c655f706172616d7318022001280b321f2e677270632e" .
"74657374696e672e53696d706c6550726f746f506172616d734800123a0a" .
"0e636f6d706c65785f706172616d7318032001280b32202e677270632e74" .
"657374696e672e436f6d706c657850726f746f506172616d73480042090a" .
"077061796c6f6164620670726f746f33"
));
static::$is_initialized = true;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/proxy-service.proto
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class ProxyService
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
$pool->internalAddGeneratedFile(hex2bin(
"0a97020a2a7372632f70726f746f2f677270632f74657374696e672f7072" .
"6f78792d736572766963652e70726f746f120c677270632e74657374696e" .
"671a247372632f70726f746f2f677270632f74657374696e672f636f6e74" .
"726f6c2e70726f746f221c0a0950726f787953746174120f0a076c617465" .
"6e6379180120012801328e010a1250726f7879436c69656e745365727669" .
"6365123b0a09476574436f6e66696712122e677270632e74657374696e67" .
"2e566f69641a1a2e677270632e74657374696e672e436c69656e74436f6e" .
"666967123b0a0a5265706f727454696d6512172e677270632e7465737469" .
"6e672e50726f7879537461741a122e677270632e74657374696e672e566f" .
"69642801620670726f746f33"
));
static::$is_initialized = true;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/services.proto
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class Services
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
$pool->internalAddGeneratedFile(hex2bin(
"0ad1040a257372632f70726f746f2f677270632f74657374696e672f7365" .
"7276696365732e70726f746f120c677270632e74657374696e671a257372" .
"632f70726f746f2f677270632f74657374696e672f6d657373616765732e" .
"70726f746f1a247372632f70726f746f2f677270632f74657374696e672f" .
"636f6e74726f6c2e70726f746f32aa010a1042656e63686d61726b536572" .
"7669636512460a09556e61727943616c6c121b2e677270632e7465737469" .
"6e672e53696d706c65526571756573741a1c2e677270632e74657374696e" .
"672e53696d706c65526573706f6e7365124e0a0d53747265616d696e6743" .
"616c6c121b2e677270632e74657374696e672e53696d706c655265717565" .
"73741a1c2e677270632e74657374696e672e53696d706c65526573706f6e" .
"7365280130013297020a0d576f726b65725365727669636512450a095275" .
"6e53657276657212182e677270632e74657374696e672e53657276657241" .
"7267731a1a2e677270632e74657374696e672e5365727665725374617475" .
"732801300112450a0952756e436c69656e7412182e677270632e74657374" .
"696e672e436c69656e74417267731a1a2e677270632e74657374696e672e" .
"436c69656e745374617475732801300112420a09436f7265436f756e7412" .
"192e677270632e74657374696e672e436f7265526571756573741a1a2e67" .
"7270632e74657374696e672e436f7265526573706f6e736512340a0a5175" .
"6974576f726b657212122e677270632e74657374696e672e566f69641a12" .
"2e677270632e74657374696e672e566f6964620670726f746f33"
));
static::$is_initialized = true;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/stats.proto
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class Stats
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0adf040a227372632f70726f746f2f677270632f74657374696e672f7374" .
"6174732e70726f746f120c677270632e74657374696e67227a0a0b536572" .
"766572537461747312140a0c74696d655f656c6170736564180120012801" .
"12110a0974696d655f7573657218022001280112130a0b74696d655f7379" .
"7374656d18032001280112160a0e746f74616c5f6370755f74696d651804" .
"2001280412150a0d69646c655f6370755f74696d65180520012804223b0a" .
"0f486973746f6772616d506172616d7312120a0a7265736f6c7574696f6e" .
"18012001280112140a0c6d61785f706f737369626c651802200128012277" .
"0a0d486973746f6772616d44617461120e0a066275636b65741801200328" .
"0d12100a086d696e5f7365656e18022001280112100a086d61785f736565" .
"6e180320012801120b0a0373756d18042001280112160a0e73756d5f6f66" .
"5f73717561726573180520012801120d0a05636f756e7418062001280122" .
"380a1252657175657374526573756c74436f756e7412130a0b7374617475" .
"735f636f6465180120012805120d0a05636f756e7418022001280322b601" .
"0a0b436c69656e745374617473122e0a096c6174656e6369657318012001" .
"280b321b2e677270632e74657374696e672e486973746f6772616d446174" .
"6112140a0c74696d655f656c617073656418022001280112110a0974696d" .
"655f7573657218032001280112130a0b74696d655f73797374656d180420" .
"01280112390a0f726571756573745f726573756c747318052003280b3220" .
"2e677270632e74657374696e672e52657175657374526573756c74436f75" .
"6e74620670726f746f33"
));
static::$is_initialized = true;
}
}
<?php
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// An integration test service that covers all the method signature permutations
// of unary/streaming requests/responses.
namespace Grpc\Testing {
class BenchmarkServiceClient extends \Grpc\BaseStub {
/**
* @param string $hostname hostname
* @param array $opts channel options
* @param Grpc\Channel $channel (optional) re-use channel object
*/
public function __construct($hostname, $opts, $channel = null) {
parent::__construct($hostname, $opts, $channel);
}
/**
* One request followed by one response.
* The server returns the client payload as-is.
* @param \Grpc\Testing\SimpleRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function UnaryCall(\Grpc\Testing\SimpleRequest $argument,
$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.
* @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);
}
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* 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";
* </pre>
*
* Protobuf type <code>grpc.testing.BoolValue</code>
*/
class BoolValue extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* The bool value.
* </pre>
*
* <code>bool value = 1;</code>
*/
private $value = false;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <pre>
* The bool value.
* </pre>
*
* <code>bool value = 1;</code>
*/
public function getValue()
{
return $this->value;
}
/**
* <pre>
* The bool value.
* </pre>
*
* <code>bool value = 1;</code>
*/
public function setValue($var)
{
GPBUtil::checkBool($var);
$this->value = $var;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/payloads.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ByteBufferParams</code>
*/
class ByteBufferParams extends \Google\Protobuf\Internal\Message
{
/**
* <code>int32 req_size = 1;</code>
*/
private $req_size = 0;
/**
* <code>int32 resp_size = 2;</code>
*/
private $resp_size = 0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
parent::__construct();
}
/**
* <code>int32 req_size = 1;</code>
*/
public function getReqSize()
{
return $this->req_size;
}
/**
* <code>int32 req_size = 1;</code>
*/
public function setReqSize($var)
{
GPBUtil::checkInt32($var);
$this->req_size = $var;
}
/**
* <code>int32 resp_size = 2;</code>
*/
public function getRespSize()
{
return $this->resp_size;
}
/**
* <code>int32 resp_size = 2;</code>
*/
public function setRespSize($var)
{
GPBUtil::checkInt32($var);
$this->resp_size = $var;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ChannelArg</code>
*/
class ChannelArg extends \Google\Protobuf\Internal\Message
{
/**
* <code>string name = 1;</code>
*/
private $name = '';
protected $value;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <code>string name = 1;</code>
*/
public function getName()
{
return $this->name;
}
/**
* <code>string name = 1;</code>
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
}
/**
* <code>string str_value = 2;</code>
*/
public function getStrValue()
{
return $this->readOneof(2);
}
/**
* <code>string str_value = 2;</code>
*/
public function setStrValue($var)
{
GPBUtil::checkString($var, True);
$this->writeOneof(2, $var);
}
/**
* <code>int32 int_value = 3;</code>
*/
public function getIntValue()
{
return $this->readOneof(3);
}
/**
* <code>int32 int_value = 3;</code>
*/
public function setIntValue($var)
{
GPBUtil::checkInt32($var);
$this->writeOneof(3, $var);
}
public function getValue()
{
return $this->whichOneof("value");
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ClientArgs</code>
*/
class ClientArgs extends \Google\Protobuf\Internal\Message
{
protected $argtype;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <code>.grpc.testing.ClientConfig setup = 1;</code>
*/
public function getSetup()
{
return $this->readOneof(1);
}
/**
* <code>.grpc.testing.ClientConfig setup = 1;</code>
*/
public function setSetup(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\ClientConfig::class);
$this->writeOneof(1, $var);
}
/**
* <code>.grpc.testing.Mark mark = 2;</code>
*/
public function getMark()
{
return $this->readOneof(2);
}
/**
* <code>.grpc.testing.Mark mark = 2;</code>
*/
public function setMark(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\Mark::class);
$this->writeOneof(2, $var);
}
public function getArgtype()
{
return $this->whichOneof("argtype");
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ClientConfig</code>
*/
class ClientConfig extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* List of targets to connect to. At least one target needs to be specified.
* </pre>
*
* <code>repeated string server_targets = 1;</code>
*/
private $server_targets;
/**
* <code>.grpc.testing.ClientType client_type = 2;</code>
*/
private $client_type = 0;
/**
* <code>.grpc.testing.SecurityParams security_params = 3;</code>
*/
private $security_params = null;
/**
* <pre>
* How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC.
* </pre>
*
* <code>int32 outstanding_rpcs_per_channel = 4;</code>
*/
private $outstanding_rpcs_per_channel = 0;
/**
* <pre>
* Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()]
* </pre>
*
* <code>int32 client_channels = 5;</code>
*/
private $client_channels = 0;
/**
* <pre>
* Only for async client. Number of threads to use to start/manage RPCs.
* </pre>
*
* <code>int32 async_client_threads = 7;</code>
*/
private $async_client_threads = 0;
/**
* <code>.grpc.testing.RpcType rpc_type = 8;</code>
*/
private $rpc_type = 0;
/**
* <pre>
* The requested load for the entire client (aggregated over all the threads).
* </pre>
*
* <code>.grpc.testing.LoadParams load_params = 10;</code>
*/
private $load_params = null;
/**
* <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
*/
private $payload_config = null;
/**
* <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
*/
private $histogram_params = null;
/**
* <pre>
* Specify the cores we should run the client on, if desired
* </pre>
*
* <code>repeated int32 core_list = 13;</code>
*/
private $core_list;
/**
* <code>int32 core_limit = 14;</code>
*/
private $core_limit = 0;
/**
* <pre>
* If we use an OTHER_CLIENT client_type, this string gives more detail
* </pre>
*
* <code>string other_client_api = 15;</code>
*/
private $other_client_api = '';
/**
* <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
*/
private $channel_args;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <pre>
* List of targets to connect to. At least one target needs to be specified.
* </pre>
*
* <code>repeated string server_targets = 1;</code>
*/
public function getServerTargets()
{
return $this->server_targets;
}
/**
* <pre>
* List of targets to connect to. At least one target needs to be specified.
* </pre>
*
* <code>repeated string server_targets = 1;</code>
*/
public function setServerTargets(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->server_targets = $var;
}
/**
* <code>.grpc.testing.ClientType client_type = 2;</code>
*/
public function getClientType()
{
return $this->client_type;
}
/**
* <code>.grpc.testing.ClientType client_type = 2;</code>
*/
public function setClientType($var)
{
GPBUtil::checkEnum($var, \Grpc\Testing\ClientType::class);
$this->client_type = $var;
}
/**
* <code>.grpc.testing.SecurityParams security_params = 3;</code>
*/
public function getSecurityParams()
{
return $this->security_params;
}
/**
* <code>.grpc.testing.SecurityParams security_params = 3;</code>
*/
public function setSecurityParams(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class);
$this->security_params = $var;
}
/**
* <pre>
* How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC.
* </pre>
*
* <code>int32 outstanding_rpcs_per_channel = 4;</code>
*/
public function getOutstandingRpcsPerChannel()
{
return $this->outstanding_rpcs_per_channel;
}
/**
* <pre>
* How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC.
* </pre>
*
* <code>int32 outstanding_rpcs_per_channel = 4;</code>
*/
public function setOutstandingRpcsPerChannel($var)
{
GPBUtil::checkInt32($var);
$this->outstanding_rpcs_per_channel = $var;
}
/**
* <pre>
* Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()]
* </pre>
*
* <code>int32 client_channels = 5;</code>
*/
public function getClientChannels()
{
return $this->client_channels;
}
/**
* <pre>
* Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()]
* </pre>
*
* <code>int32 client_channels = 5;</code>
*/
public function setClientChannels($var)
{
GPBUtil::checkInt32($var);
$this->client_channels = $var;
}
/**
* <pre>
* Only for async client. Number of threads to use to start/manage RPCs.
* </pre>
*
* <code>int32 async_client_threads = 7;</code>
*/
public function getAsyncClientThreads()
{
return $this->async_client_threads;
}
/**
* <pre>
* Only for async client. Number of threads to use to start/manage RPCs.
* </pre>
*
* <code>int32 async_client_threads = 7;</code>
*/
public function setAsyncClientThreads($var)
{
GPBUtil::checkInt32($var);
$this->async_client_threads = $var;
}
/**
* <code>.grpc.testing.RpcType rpc_type = 8;</code>
*/
public function getRpcType()
{
return $this->rpc_type;
}
/**
* <code>.grpc.testing.RpcType rpc_type = 8;</code>
*/
public function setRpcType($var)
{
GPBUtil::checkEnum($var, \Grpc\Testing\RpcType::class);
$this->rpc_type = $var;
}
/**
* <pre>
* The requested load for the entire client (aggregated over all the threads).
* </pre>
*
* <code>.grpc.testing.LoadParams load_params = 10;</code>
*/
public function getLoadParams()
{
return $this->load_params;
}
/**
* <pre>
* The requested load for the entire client (aggregated over all the threads).
* </pre>
*
* <code>.grpc.testing.LoadParams load_params = 10;</code>
*/
public function setLoadParams(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\LoadParams::class);
$this->load_params = $var;
}
/**
* <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
*/
public function getPayloadConfig()
{
return $this->payload_config;
}
/**
* <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
*/
public function setPayloadConfig(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class);
$this->payload_config = $var;
}
/**
* <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
*/
public function getHistogramParams()
{
return $this->histogram_params;
}
/**
* <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
*/
public function setHistogramParams(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\HistogramParams::class);
$this->histogram_params = $var;
}
/**
* <pre>
* Specify the cores we should run the client on, if desired
* </pre>
*
* <code>repeated int32 core_list = 13;</code>
*/
public function getCoreList()
{
return $this->core_list;
}
/**
* <pre>
* Specify the cores we should run the client on, if desired
* </pre>
*
* <code>repeated int32 core_list = 13;</code>
*/
public function setCoreList(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
$this->core_list = $var;
}
/**
* <code>int32 core_limit = 14;</code>
*/
public function getCoreLimit()
{
return $this->core_limit;
}
/**
* <code>int32 core_limit = 14;</code>
*/
public function setCoreLimit($var)
{
GPBUtil::checkInt32($var);
$this->core_limit = $var;
}
/**
* <pre>
* If we use an OTHER_CLIENT client_type, this string gives more detail
* </pre>
*
* <code>string other_client_api = 15;</code>
*/
public function getOtherClientApi()
{
return $this->other_client_api;
}
/**
* <pre>
* If we use an OTHER_CLIENT client_type, this string gives more detail
* </pre>
*
* <code>string other_client_api = 15;</code>
*/
public function setOtherClientApi($var)
{
GPBUtil::checkString($var, True);
$this->other_client_api = $var;
}
/**
* <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
*/
public function getChannelArgs()
{
return $this->channel_args;
}
/**
* <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
*/
public function setChannelArgs(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ChannelArg::class);
$this->channel_args = $var;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/stats.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ClientStats</code>
*/
class ClientStats extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Latency histogram. Data points are in nanoseconds.
* </pre>
*
* <code>.grpc.testing.HistogramData latencies = 1;</code>
*/
private $latencies = null;
/**
* <pre>
* See ServerStats for details.
* </pre>
*
* <code>double time_elapsed = 2;</code>
*/
private $time_elapsed = 0.0;
/**
* <code>double time_user = 3;</code>
*/
private $time_user = 0.0;
/**
* <code>double time_system = 4;</code>
*/
private $time_system = 0.0;
/**
* <pre>
* Number of failed requests (one row per status code seen)
* </pre>
*
* <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code>
*/
private $request_results;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
parent::__construct();
}
/**
* <pre>
* Latency histogram. Data points are in nanoseconds.
* </pre>
*
* <code>.grpc.testing.HistogramData latencies = 1;</code>
*/
public function getLatencies()
{
return $this->latencies;
}
/**
* <pre>
* Latency histogram. Data points are in nanoseconds.
* </pre>
*
* <code>.grpc.testing.HistogramData latencies = 1;</code>
*/
public function setLatencies(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class);
$this->latencies = $var;
}
/**
* <pre>
* See ServerStats for details.
* </pre>
*
* <code>double time_elapsed = 2;</code>
*/
public function getTimeElapsed()
{
return $this->time_elapsed;
}
/**
* <pre>
* See ServerStats for details.
* </pre>
*
* <code>double time_elapsed = 2;</code>
*/
public function setTimeElapsed($var)
{
GPBUtil::checkDouble($var);
$this->time_elapsed = $var;
}
/**
* <code>double time_user = 3;</code>
*/
public function getTimeUser()
{
return $this->time_user;
}
/**
* <code>double time_user = 3;</code>
*/
public function setTimeUser($var)
{
GPBUtil::checkDouble($var);
$this->time_user = $var;
}
/**
* <code>double time_system = 4;</code>
*/
public function getTimeSystem()
{
return $this->time_system;
}
/**
* <code>double time_system = 4;</code>
*/
public function setTimeSystem($var)
{
GPBUtil::checkDouble($var);
$this->time_system = $var;
}
/**
* <pre>
* Number of failed requests (one row per status code seen)
* </pre>
*
* <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code>
*/
public function getRequestResults()
{
return $this->request_results;
}
/**
* <pre>
* Number of failed requests (one row per status code seen)
* </pre>
*
* <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code>
*/
public function setRequestResults(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class);
$this->request_results = $var;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ClientStatus</code>
*/
class ClientStatus extends \Google\Protobuf\Internal\Message
{
/**
* <code>.grpc.testing.ClientStats stats = 1;</code>
*/
private $stats = null;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <code>.grpc.testing.ClientStats stats = 1;</code>
*/
public function getStats()
{
return $this->stats;
}
/**
* <code>.grpc.testing.ClientStats stats = 1;</code>
*/
public function setStats(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\ClientStats::class);
$this->stats = $var;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
/**
* Protobuf enum <code>grpc.testing.ClientType</code>
*/
class ClientType
{
/**
* <pre>
* Many languages support a basic distinction between using
* sync or async client, and this allows the specification
* </pre>
*
* <code>SYNC_CLIENT = 0;</code>
*/
const SYNC_CLIENT = 0;
/**
* <code>ASYNC_CLIENT = 1;</code>
*/
const ASYNC_CLIENT = 1;
/**
* <pre>
* used for some language-specific variants
* </pre>
*
* <code>OTHER_CLIENT = 2;</code>
*/
const OTHER_CLIENT = 2;
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Once an RPC finishes, immediately start a new one.
* No configuration parameters needed.
* </pre>
*
* Protobuf type <code>grpc.testing.ClosedLoopParams</code>
*/
class ClosedLoopParams extends \Google\Protobuf\Internal\Message
{
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/payloads.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* TODO (vpai): Fill this in once the details of complex, representative
* protos are decided
* </pre>
*
* Protobuf type <code>grpc.testing.ComplexProtoParams</code>
*/
class ComplexProtoParams extends \Google\Protobuf\Internal\Message
{
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
parent::__construct();
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.CoreRequest</code>
*/
class CoreRequest extends \Google\Protobuf\Internal\Message
{
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment