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.ServerStats</code> 13 */ 14class 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 private $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 private $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 private $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 private $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 private $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 private $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 private $core_stats = null; 59 60 public function __construct() { 61 \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce(); 62 parent::__construct(); 63 } 64 65 /** 66 * wall clock time change in seconds since last reset 67 * 68 * Generated from protobuf field <code>double time_elapsed = 1;</code> 69 * @return float 70 */ 71 public function getTimeElapsed() 72 { 73 return $this->time_elapsed; 74 } 75 76 /** 77 * wall clock time change in seconds since last reset 78 * 79 * Generated from protobuf field <code>double time_elapsed = 1;</code> 80 * @param float $var 81 * @return $this 82 */ 83 public function setTimeElapsed($var) 84 { 85 GPBUtil::checkDouble($var); 86 $this->time_elapsed = $var; 87 88 return $this; 89 } 90 91 /** 92 * change in user time (in seconds) used by the server since last reset 93 * 94 * Generated from protobuf field <code>double time_user = 2;</code> 95 * @return float 96 */ 97 public function getTimeUser() 98 { 99 return $this->time_user; 100 } 101 102 /** 103 * change in user time (in seconds) used by the server since last reset 104 * 105 * Generated from protobuf field <code>double time_user = 2;</code> 106 * @param float $var 107 * @return $this 108 */ 109 public function setTimeUser($var) 110 { 111 GPBUtil::checkDouble($var); 112 $this->time_user = $var; 113 114 return $this; 115 } 116 117 /** 118 * change in server time (in seconds) used by the server process and all 119 * threads since last reset 120 * 121 * Generated from protobuf field <code>double time_system = 3;</code> 122 * @return float 123 */ 124 public function getTimeSystem() 125 { 126 return $this->time_system; 127 } 128 129 /** 130 * change in server time (in seconds) used by the server process and all 131 * threads since last reset 132 * 133 * Generated from protobuf field <code>double time_system = 3;</code> 134 * @param float $var 135 * @return $this 136 */ 137 public function setTimeSystem($var) 138 { 139 GPBUtil::checkDouble($var); 140 $this->time_system = $var; 141 142 return $this; 143 } 144 145 /** 146 * change in total cpu time of the server (data from proc/stat) 147 * 148 * Generated from protobuf field <code>uint64 total_cpu_time = 4;</code> 149 * @return int|string 150 */ 151 public function getTotalCpuTime() 152 { 153 return $this->total_cpu_time; 154 } 155 156 /** 157 * change in total cpu time of the server (data from proc/stat) 158 * 159 * Generated from protobuf field <code>uint64 total_cpu_time = 4;</code> 160 * @param int|string $var 161 * @return $this 162 */ 163 public function setTotalCpuTime($var) 164 { 165 GPBUtil::checkUint64($var); 166 $this->total_cpu_time = $var; 167 168 return $this; 169 } 170 171 /** 172 * change in idle time of the server (data from proc/stat) 173 * 174 * Generated from protobuf field <code>uint64 idle_cpu_time = 5;</code> 175 * @return int|string 176 */ 177 public function getIdleCpuTime() 178 { 179 return $this->idle_cpu_time; 180 } 181 182 /** 183 * change in idle time of the server (data from proc/stat) 184 * 185 * Generated from protobuf field <code>uint64 idle_cpu_time = 5;</code> 186 * @param int|string $var 187 * @return $this 188 */ 189 public function setIdleCpuTime($var) 190 { 191 GPBUtil::checkUint64($var); 192 $this->idle_cpu_time = $var; 193 194 return $this; 195 } 196 197 /** 198 * Number of polls called inside completion queue 199 * 200 * Generated from protobuf field <code>uint64 cq_poll_count = 6;</code> 201 * @return int|string 202 */ 203 public function getCqPollCount() 204 { 205 return $this->cq_poll_count; 206 } 207 208 /** 209 * Number of polls called inside completion queue 210 * 211 * Generated from protobuf field <code>uint64 cq_poll_count = 6;</code> 212 * @param int|string $var 213 * @return $this 214 */ 215 public function setCqPollCount($var) 216 { 217 GPBUtil::checkUint64($var); 218 $this->cq_poll_count = $var; 219 220 return $this; 221 } 222 223 /** 224 * Core library stats 225 * 226 * Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code> 227 * @return \Grpc\Core\Stats 228 */ 229 public function getCoreStats() 230 { 231 return $this->core_stats; 232 } 233 234 /** 235 * Core library stats 236 * 237 * Generated from protobuf field <code>.grpc.core.Stats core_stats = 7;</code> 238 * @param \Grpc\Core\Stats $var 239 * @return $this 240 */ 241 public function setCoreStats($var) 242 { 243 GPBUtil::checkMessage($var, \Grpc\Core\Stats::class); 244 $this->core_stats = $var; 245 246 return $this; 247 } 248 249} 250 251