QueryStats.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_query_stats.proto
  4. namespace Ydb\TableStats;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Generated from protobuf message <code>Ydb.TableStats.QueryStats</code>
  10. */
  11. class QueryStats extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * A query might have one or more execution phases
  15. *
  16. * Generated from protobuf field <code>repeated .Ydb.TableStats.QueryPhaseStats query_phases = 1;</code>
  17. */
  18. private $query_phases;
  19. /**
  20. * Generated from protobuf field <code>.Ydb.TableStats.CompilationStats compilation = 2;</code>
  21. */
  22. protected $compilation = null;
  23. /**
  24. * Generated from protobuf field <code>uint64 process_cpu_time_us = 3;</code>
  25. */
  26. protected $process_cpu_time_us = 0;
  27. /**
  28. * Generated from protobuf field <code>string query_plan = 4;</code>
  29. */
  30. protected $query_plan = '';
  31. /**
  32. * Generated from protobuf field <code>string query_ast = 5;</code>
  33. */
  34. protected $query_ast = '';
  35. /**
  36. * Generated from protobuf field <code>uint64 total_duration_us = 6;</code>
  37. */
  38. protected $total_duration_us = 0;
  39. /**
  40. * Generated from protobuf field <code>uint64 total_cpu_time_us = 7;</code>
  41. */
  42. protected $total_cpu_time_us = 0;
  43. /**
  44. * Constructor.
  45. *
  46. * @param array $data {
  47. * Optional. Data for populating the Message object.
  48. *
  49. * @type array<\Ydb\TableStats\QueryPhaseStats>|\Google\Protobuf\Internal\RepeatedField $query_phases
  50. * A query might have one or more execution phases
  51. * @type \Ydb\TableStats\CompilationStats $compilation
  52. * @type int|string $process_cpu_time_us
  53. * @type string $query_plan
  54. * @type string $query_ast
  55. * @type int|string $total_duration_us
  56. * @type int|string $total_cpu_time_us
  57. * }
  58. */
  59. public function __construct($data = NULL) {
  60. \GPBMetadata\Protos\YdbQueryStats::initOnce();
  61. parent::__construct($data);
  62. }
  63. /**
  64. * A query might have one or more execution phases
  65. *
  66. * Generated from protobuf field <code>repeated .Ydb.TableStats.QueryPhaseStats query_phases = 1;</code>
  67. * @return \Google\Protobuf\Internal\RepeatedField
  68. */
  69. public function getQueryPhases()
  70. {
  71. return $this->query_phases;
  72. }
  73. /**
  74. * A query might have one or more execution phases
  75. *
  76. * Generated from protobuf field <code>repeated .Ydb.TableStats.QueryPhaseStats query_phases = 1;</code>
  77. * @param array<\Ydb\TableStats\QueryPhaseStats>|\Google\Protobuf\Internal\RepeatedField $var
  78. * @return $this
  79. */
  80. public function setQueryPhases($var)
  81. {
  82. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\TableStats\QueryPhaseStats::class);
  83. $this->query_phases = $arr;
  84. return $this;
  85. }
  86. /**
  87. * Generated from protobuf field <code>.Ydb.TableStats.CompilationStats compilation = 2;</code>
  88. * @return \Ydb\TableStats\CompilationStats|null
  89. */
  90. public function getCompilation()
  91. {
  92. return $this->compilation;
  93. }
  94. public function hasCompilation()
  95. {
  96. return isset($this->compilation);
  97. }
  98. public function clearCompilation()
  99. {
  100. unset($this->compilation);
  101. }
  102. /**
  103. * Generated from protobuf field <code>.Ydb.TableStats.CompilationStats compilation = 2;</code>
  104. * @param \Ydb\TableStats\CompilationStats $var
  105. * @return $this
  106. */
  107. public function setCompilation($var)
  108. {
  109. GPBUtil::checkMessage($var, \Ydb\TableStats\CompilationStats::class);
  110. $this->compilation = $var;
  111. return $this;
  112. }
  113. /**
  114. * Generated from protobuf field <code>uint64 process_cpu_time_us = 3;</code>
  115. * @return int|string
  116. */
  117. public function getProcessCpuTimeUs()
  118. {
  119. return $this->process_cpu_time_us;
  120. }
  121. /**
  122. * Generated from protobuf field <code>uint64 process_cpu_time_us = 3;</code>
  123. * @param int|string $var
  124. * @return $this
  125. */
  126. public function setProcessCpuTimeUs($var)
  127. {
  128. GPBUtil::checkUint64($var);
  129. $this->process_cpu_time_us = $var;
  130. return $this;
  131. }
  132. /**
  133. * Generated from protobuf field <code>string query_plan = 4;</code>
  134. * @return string
  135. */
  136. public function getQueryPlan()
  137. {
  138. return $this->query_plan;
  139. }
  140. /**
  141. * Generated from protobuf field <code>string query_plan = 4;</code>
  142. * @param string $var
  143. * @return $this
  144. */
  145. public function setQueryPlan($var)
  146. {
  147. GPBUtil::checkString($var, True);
  148. $this->query_plan = $var;
  149. return $this;
  150. }
  151. /**
  152. * Generated from protobuf field <code>string query_ast = 5;</code>
  153. * @return string
  154. */
  155. public function getQueryAst()
  156. {
  157. return $this->query_ast;
  158. }
  159. /**
  160. * Generated from protobuf field <code>string query_ast = 5;</code>
  161. * @param string $var
  162. * @return $this
  163. */
  164. public function setQueryAst($var)
  165. {
  166. GPBUtil::checkString($var, True);
  167. $this->query_ast = $var;
  168. return $this;
  169. }
  170. /**
  171. * Generated from protobuf field <code>uint64 total_duration_us = 6;</code>
  172. * @return int|string
  173. */
  174. public function getTotalDurationUs()
  175. {
  176. return $this->total_duration_us;
  177. }
  178. /**
  179. * Generated from protobuf field <code>uint64 total_duration_us = 6;</code>
  180. * @param int|string $var
  181. * @return $this
  182. */
  183. public function setTotalDurationUs($var)
  184. {
  185. GPBUtil::checkUint64($var);
  186. $this->total_duration_us = $var;
  187. return $this;
  188. }
  189. /**
  190. * Generated from protobuf field <code>uint64 total_cpu_time_us = 7;</code>
  191. * @return int|string
  192. */
  193. public function getTotalCpuTimeUs()
  194. {
  195. return $this->total_cpu_time_us;
  196. }
  197. /**
  198. * Generated from protobuf field <code>uint64 total_cpu_time_us = 7;</code>
  199. * @param int|string $var
  200. * @return $this
  201. */
  202. public function setTotalCpuTimeUs($var)
  203. {
  204. GPBUtil::checkUint64($var);
  205. $this->total_cpu_time_us = $var;
  206. return $this;
  207. }
  208. }