1<?php 2# Generated by the protocol buffer compiler. DO NOT EDIT! 3# source: src/proto/grpc/testing/stats.proto 4 5namespace Grpc\Testing; 6 7use Google\Protobuf\Internal\GPBType; 8use Google\Protobuf\Internal\RepeatedField; 9use Google\Protobuf\Internal\GPBUtil; 10 11/** 12 * Generated from protobuf message <code>grpc.testing.ClientStats</code> 13 */ 14class ClientStats extends \Google\Protobuf\Internal\Message 15{ 16 /** 17 * Latency histogram. Data points are in nanoseconds. 18 * 19 * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 1;</code> 20 */ 21 protected $latencies = null; 22 /** 23 * See ServerStats for details. 24 * 25 * Generated from protobuf field <code>double time_elapsed = 2;</code> 26 */ 27 protected $time_elapsed = 0.0; 28 /** 29 * Generated from protobuf field <code>double time_user = 3;</code> 30 */ 31 protected $time_user = 0.0; 32 /** 33 * Generated from protobuf field <code>double time_system = 4;</code> 34 */ 35 protected $time_system = 0.0; 36 /** 37 * Number of failed requests (one row per status code seen) 38 * 39 * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code> 40 */ 41 private $request_results; 42 /** 43 * Number of polls called inside completion queue 44 * 45 * Generated from protobuf field <code>uint64 cq_poll_count = 6;</code> 46 */ 47 protected $cq_poll_count = 0; 48 /** 49 * Core library stats 50 * 51 * Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code> 52 */ 53 protected $core_stats = null; 54 55 /** 56 * Constructor. 57 * 58 * @param array $data { 59 * Optional. Data for populating the Message object. 60 * 61 * @type \Grpc\Testing\HistogramData $latencies 62 * Latency histogram. Data points are in nanoseconds. 63 * @type float $time_elapsed 64 * See ServerStats for details. 65 * @type float $time_user 66 * @type float $time_system 67 * @type \Grpc\Testing\RequestResultCount[]|\Google\Protobuf\Internal\RepeatedField $request_results 68 * Number of failed requests (one row per status code seen) 69 * @type int|string $cq_poll_count 70 * Number of polls called inside completion queue 71 * @type \Grpc\Core\Stats $core_stats 72 * Core library stats 73 * } 74 */ 75 public function __construct($data = NULL) { 76 \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce(); 77 parent::__construct($data); 78 } 79 80 /** 81 * Latency histogram. Data points are in nanoseconds. 82 * 83 * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 1;</code> 84 * @return \Grpc\Testing\HistogramData 85 */ 86 public function getLatencies() 87 { 88 return $this->latencies; 89 } 90 91 /** 92 * Latency histogram. Data points are in nanoseconds. 93 * 94 * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 1;</code> 95 * @param \Grpc\Testing\HistogramData $var 96 * @return $this 97 */ 98 public function setLatencies($var) 99 { 100 GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class); 101 $this->latencies = $var; 102 103 return $this; 104 } 105 106 /** 107 * See ServerStats for details. 108 * 109 * Generated from protobuf field <code>double time_elapsed = 2;</code> 110 * @return float 111 */ 112 public function getTimeElapsed() 113 { 114 return $this->time_elapsed; 115 } 116 117 /** 118 * See ServerStats for details. 119 * 120 * Generated from protobuf field <code>double time_elapsed = 2;</code> 121 * @param float $var 122 * @return $this 123 */ 124 public function setTimeElapsed($var) 125 { 126 GPBUtil::checkDouble($var); 127 $this->time_elapsed = $var; 128 129 return $this; 130 } 131 132 /** 133 * Generated from protobuf field <code>double time_user = 3;</code> 134 * @return float 135 */ 136 public function getTimeUser() 137 { 138 return $this->time_user; 139 } 140 141 /** 142 * Generated from protobuf field <code>double time_user = 3;</code> 143 * @param float $var 144 * @return $this 145 */ 146 public function setTimeUser($var) 147 { 148 GPBUtil::checkDouble($var); 149 $this->time_user = $var; 150 151 return $this; 152 } 153 154 /** 155 * Generated from protobuf field <code>double time_system = 4;</code> 156 * @return float 157 */ 158 public function getTimeSystem() 159 { 160 return $this->time_system; 161 } 162 163 /** 164 * Generated from protobuf field <code>double time_system = 4;</code> 165 * @param float $var 166 * @return $this 167 */ 168 public function setTimeSystem($var) 169 { 170 GPBUtil::checkDouble($var); 171 $this->time_system = $var; 172 173 return $this; 174 } 175 176 /** 177 * Number of failed requests (one row per status code seen) 178 * 179 * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code> 180 * @return \Google\Protobuf\Internal\RepeatedField 181 */ 182 public function getRequestResults() 183 { 184 return $this->request_results; 185 } 186 187 /** 188 * Number of failed requests (one row per status code seen) 189 * 190 * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code> 191 * @param \Grpc\Testing\RequestResultCount[]|\Google\Protobuf\Internal\RepeatedField $var 192 * @return $this 193 */ 194 public function setRequestResults($var) 195 { 196 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class); 197 $this->request_results = $arr; 198 199 return $this; 200 } 201 202 /** 203 * Number of polls called inside completion queue 204 * 205 * Generated from protobuf field <code>uint64 cq_poll_count = 6;</code> 206 * @return int|string 207 */ 208 public function getCqPollCount() 209 { 210 return $this->cq_poll_count; 211 } 212 213 /** 214 * Number of polls called inside completion queue 215 * 216 * Generated from protobuf field <code>uint64 cq_poll_count = 6;</code> 217 * @param int|string $var 218 * @return $this 219 */ 220 public function setCqPollCount($var) 221 { 222 GPBUtil::checkUint64($var); 223 $this->cq_poll_count = $var; 224 225 return $this; 226 } 227 228 /** 229 * Core library stats 230 * 231 * Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code> 232 * @return \Grpc\Core\Stats 233 */ 234 public function getCoreStats() 235 { 236 return $this->core_stats; 237 } 238 239 /** 240 * Core library stats 241 * 242 * Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code> 243 * @param \Grpc\Core\Stats $var 244 * @return $this 245 */ 246 public function setCoreStats($var) 247 { 248 GPBUtil::checkMessage($var, \Grpc\Core\Stats::class); 249 $this->core_stats = $var; 250 251 return $this; 252 } 253 254} 255 256