1<?php 2# Generated by the protocol buffer compiler. DO NOT EDIT! 3# source: src/proto/grpc/testing/control.proto 4 5namespace Grpc\Testing; 6 7use Google\Protobuf\Internal\GPBType; 8use Google\Protobuf\Internal\RepeatedField; 9use Google\Protobuf\Internal\GPBUtil; 10 11/** 12 * Results of a single benchmark scenario. 13 * 14 * Generated from protobuf message <code>grpc.testing.ScenarioResult</code> 15 */ 16class ScenarioResult extends \Google\Protobuf\Internal\Message 17{ 18 /** 19 * Inputs used to run the scenario. 20 * 21 * Generated from protobuf field <code>.grpc.testing.Scenario scenario = 1;</code> 22 */ 23 private $scenario = null; 24 /** 25 * Histograms from all clients merged into one histogram. 26 * 27 * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 2;</code> 28 */ 29 private $latencies = null; 30 /** 31 * Client stats for each client 32 * 33 * Generated from protobuf field <code>repeated .grpc.testing.ClientStats client_stats = 3;</code> 34 */ 35 private $client_stats; 36 /** 37 * Server stats for each server 38 * 39 * Generated from protobuf field <code>repeated .grpc.testing.ServerStats server_stats = 4;</code> 40 */ 41 private $server_stats; 42 /** 43 * Number of cores available to each server 44 * 45 * Generated from protobuf field <code>repeated int32 server_cores = 5;</code> 46 */ 47 private $server_cores; 48 /** 49 * An after-the-fact computed summary 50 * 51 * Generated from protobuf field <code>.grpc.testing.ScenarioResultSummary summary = 6;</code> 52 */ 53 private $summary = null; 54 /** 55 * Information on success or failure of each worker 56 * 57 * Generated from protobuf field <code>repeated bool client_success = 7;</code> 58 */ 59 private $client_success; 60 /** 61 * Generated from protobuf field <code>repeated bool server_success = 8;</code> 62 */ 63 private $server_success; 64 /** 65 * Number of failed requests (one row per status code seen) 66 * 67 * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code> 68 */ 69 private $request_results; 70 71 public function __construct() { 72 \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); 73 parent::__construct(); 74 } 75 76 /** 77 * Inputs used to run the scenario. 78 * 79 * Generated from protobuf field <code>.grpc.testing.Scenario scenario = 1;</code> 80 * @return \Grpc\Testing\Scenario 81 */ 82 public function getScenario() 83 { 84 return $this->scenario; 85 } 86 87 /** 88 * Inputs used to run the scenario. 89 * 90 * Generated from protobuf field <code>.grpc.testing.Scenario scenario = 1;</code> 91 * @param \Grpc\Testing\Scenario $var 92 * @return $this 93 */ 94 public function setScenario($var) 95 { 96 GPBUtil::checkMessage($var, \Grpc\Testing\Scenario::class); 97 $this->scenario = $var; 98 99 return $this; 100 } 101 102 /** 103 * Histograms from all clients merged into one histogram. 104 * 105 * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 2;</code> 106 * @return \Grpc\Testing\HistogramData 107 */ 108 public function getLatencies() 109 { 110 return $this->latencies; 111 } 112 113 /** 114 * Histograms from all clients merged into one histogram. 115 * 116 * Generated from protobuf field <code>.grpc.testing.HistogramData latencies = 2;</code> 117 * @param \Grpc\Testing\HistogramData $var 118 * @return $this 119 */ 120 public function setLatencies($var) 121 { 122 GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class); 123 $this->latencies = $var; 124 125 return $this; 126 } 127 128 /** 129 * Client stats for each client 130 * 131 * Generated from protobuf field <code>repeated .grpc.testing.ClientStats client_stats = 3;</code> 132 * @return \Google\Protobuf\Internal\RepeatedField 133 */ 134 public function getClientStats() 135 { 136 return $this->client_stats; 137 } 138 139 /** 140 * Client stats for each client 141 * 142 * Generated from protobuf field <code>repeated .grpc.testing.ClientStats client_stats = 3;</code> 143 * @param \Grpc\Testing\ClientStats[]|\Google\Protobuf\Internal\RepeatedField $var 144 * @return $this 145 */ 146 public function setClientStats($var) 147 { 148 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ClientStats::class); 149 $this->client_stats = $arr; 150 151 return $this; 152 } 153 154 /** 155 * Server stats for each server 156 * 157 * Generated from protobuf field <code>repeated .grpc.testing.ServerStats server_stats = 4;</code> 158 * @return \Google\Protobuf\Internal\RepeatedField 159 */ 160 public function getServerStats() 161 { 162 return $this->server_stats; 163 } 164 165 /** 166 * Server stats for each server 167 * 168 * Generated from protobuf field <code>repeated .grpc.testing.ServerStats server_stats = 4;</code> 169 * @param \Grpc\Testing\ServerStats[]|\Google\Protobuf\Internal\RepeatedField $var 170 * @return $this 171 */ 172 public function setServerStats($var) 173 { 174 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ServerStats::class); 175 $this->server_stats = $arr; 176 177 return $this; 178 } 179 180 /** 181 * Number of cores available to each server 182 * 183 * Generated from protobuf field <code>repeated int32 server_cores = 5;</code> 184 * @return \Google\Protobuf\Internal\RepeatedField 185 */ 186 public function getServerCores() 187 { 188 return $this->server_cores; 189 } 190 191 /** 192 * Number of cores available to each server 193 * 194 * Generated from protobuf field <code>repeated int32 server_cores = 5;</code> 195 * @param int[]|\Google\Protobuf\Internal\RepeatedField $var 196 * @return $this 197 */ 198 public function setServerCores($var) 199 { 200 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); 201 $this->server_cores = $arr; 202 203 return $this; 204 } 205 206 /** 207 * An after-the-fact computed summary 208 * 209 * Generated from protobuf field <code>.grpc.testing.ScenarioResultSummary summary = 6;</code> 210 * @return \Grpc\Testing\ScenarioResultSummary 211 */ 212 public function getSummary() 213 { 214 return $this->summary; 215 } 216 217 /** 218 * An after-the-fact computed summary 219 * 220 * Generated from protobuf field <code>.grpc.testing.ScenarioResultSummary summary = 6;</code> 221 * @param \Grpc\Testing\ScenarioResultSummary $var 222 * @return $this 223 */ 224 public function setSummary($var) 225 { 226 GPBUtil::checkMessage($var, \Grpc\Testing\ScenarioResultSummary::class); 227 $this->summary = $var; 228 229 return $this; 230 } 231 232 /** 233 * Information on success or failure of each worker 234 * 235 * Generated from protobuf field <code>repeated bool client_success = 7;</code> 236 * @return \Google\Protobuf\Internal\RepeatedField 237 */ 238 public function getClientSuccess() 239 { 240 return $this->client_success; 241 } 242 243 /** 244 * Information on success or failure of each worker 245 * 246 * Generated from protobuf field <code>repeated bool client_success = 7;</code> 247 * @param bool[]|\Google\Protobuf\Internal\RepeatedField $var 248 * @return $this 249 */ 250 public function setClientSuccess($var) 251 { 252 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL); 253 $this->client_success = $arr; 254 255 return $this; 256 } 257 258 /** 259 * Generated from protobuf field <code>repeated bool server_success = 8;</code> 260 * @return \Google\Protobuf\Internal\RepeatedField 261 */ 262 public function getServerSuccess() 263 { 264 return $this->server_success; 265 } 266 267 /** 268 * Generated from protobuf field <code>repeated bool server_success = 8;</code> 269 * @param bool[]|\Google\Protobuf\Internal\RepeatedField $var 270 * @return $this 271 */ 272 public function setServerSuccess($var) 273 { 274 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL); 275 $this->server_success = $arr; 276 277 return $this; 278 } 279 280 /** 281 * Number of failed requests (one row per status code seen) 282 * 283 * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code> 284 * @return \Google\Protobuf\Internal\RepeatedField 285 */ 286 public function getRequestResults() 287 { 288 return $this->request_results; 289 } 290 291 /** 292 * Number of failed requests (one row per status code seen) 293 * 294 * Generated from protobuf field <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code> 295 * @param \Grpc\Testing\RequestResultCount[]|\Google\Protobuf\Internal\RepeatedField $var 296 * @return $this 297 */ 298 public function setRequestResults($var) 299 { 300 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class); 301 $this->request_results = $arr; 302 303 return $this; 304 } 305 306} 307 308