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