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 private $latencies = null; 22 /** 23 * See ServerStats for details. 24 * 25 * Generated from protobuf field <code>double time_elapsed = 2;</code> 26 */ 27 private $time_elapsed = 0.0; 28 /** 29 * Generated from protobuf field <code>double time_user = 3;</code> 30 */ 31 private $time_user = 0.0; 32 /** 33 * Generated from protobuf field <code>double time_system = 4;</code> 34 */ 35 private $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 private $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 private $core_stats = null; 54 55 public function __construct() { 56 \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce(); 57 parent::__construct(); 58 } 59 60 /** 61 * Latency histogram. Data points are in nanoseconds. 62 * 63 * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 1;</code> 64 * @return \Grpc\Testing\HistogramData 65 */ 66 public function getLatencies() 67 { 68 return $this->latencies; 69 } 70 71 /** 72 * Latency histogram. Data points are in nanoseconds. 73 * 74 * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 1;</code> 75 * @param \Grpc\Testing\HistogramData $var 76 * @return $this 77 */ 78 public function setLatencies($var) 79 { 80 GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class); 81 $this->latencies = $var; 82 83 return $this; 84 } 85 86 /** 87 * See ServerStats for details. 88 * 89 * Generated from protobuf field <code>double time_elapsed = 2;</code> 90 * @return float 91 */ 92 public function getTimeElapsed() 93 { 94 return $this->time_elapsed; 95 } 96 97 /** 98 * See ServerStats for details. 99 * 100 * Generated from protobuf field <code>double time_elapsed = 2;</code> 101 * @param float $var 102 * @return $this 103 */ 104 public function setTimeElapsed($var) 105 { 106 GPBUtil::checkDouble($var); 107 $this->time_elapsed = $var; 108 109 return $this; 110 } 111 112 /** 113 * Generated from protobuf field <code>double time_user = 3;</code> 114 * @return float 115 */ 116 public function getTimeUser() 117 { 118 return $this->time_user; 119 } 120 121 /** 122 * Generated from protobuf field <code>double time_user = 3;</code> 123 * @param float $var 124 * @return $this 125 */ 126 public function setTimeUser($var) 127 { 128 GPBUtil::checkDouble($var); 129 $this->time_user = $var; 130 131 return $this; 132 } 133 134 /** 135 * Generated from protobuf field <code>double time_system = 4;</code> 136 * @return float 137 */ 138 public function getTimeSystem() 139 { 140 return $this->time_system; 141 } 142 143 /** 144 * Generated from protobuf field <code>double time_system = 4;</code> 145 * @param float $var 146 * @return $this 147 */ 148 public function setTimeSystem($var) 149 { 150 GPBUtil::checkDouble($var); 151 $this->time_system = $var; 152 153 return $this; 154 } 155 156 /** 157 * Number of failed requests (one row per status code seen) 158 * 159 * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code> 160 * @return \Google\Protobuf\Internal\RepeatedField 161 */ 162 public function getRequestResults() 163 { 164 return $this->request_results; 165 } 166 167 /** 168 * Number of failed requests (one row per status code seen) 169 * 170 * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code> 171 * @param \Grpc\Testing\RequestResultCount[]|\Google\Protobuf\Internal\RepeatedField $var 172 * @return $this 173 */ 174 public function setRequestResults($var) 175 { 176 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class); 177 $this->request_results = $arr; 178 179 return $this; 180 } 181 182 /** 183 * Number of polls called inside completion queue 184 * 185 * Generated from protobuf field <code>uint64 cq_poll_count = 6;</code> 186 * @return int|string 187 */ 188 public function getCqPollCount() 189 { 190 return $this->cq_poll_count; 191 } 192 193 /** 194 * Number of polls called inside completion queue 195 * 196 * Generated from protobuf field <code>uint64 cq_poll_count = 6;</code> 197 * @param int|string $var 198 * @return $this 199 */ 200 public function setCqPollCount($var) 201 { 202 GPBUtil::checkUint64($var); 203 $this->cq_poll_count = $var; 204 205 return $this; 206 } 207 208 /** 209 * Core library stats 210 * 211 * Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code> 212 * @return \Grpc\Core\Stats 213 */ 214 public function getCoreStats() 215 { 216 return $this->core_stats; 217 } 218 219 /** 220 * Core library stats 221 * 222 * Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code> 223 * @param \Grpc\Core\Stats $var 224 * @return $this 225 */ 226 public function setCoreStats($var) 227 { 228 GPBUtil::checkMessage($var, \Grpc\Core\Stats::class); 229 $this->core_stats = $var; 230 231 return $this; 232 } 233 234} 235 236