Stats.cs 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: src/proto/grpc/testing/stats.proto
  3. #pragma warning disable 1591, 0612, 3021
  4. #region Designer generated code
  5. using pb = global::Google.Protobuf;
  6. using pbc = global::Google.Protobuf.Collections;
  7. using pbr = global::Google.Protobuf.Reflection;
  8. using scg = global::System.Collections.Generic;
  9. namespace Grpc.Testing {
  10. /// <summary>Holder for reflection information generated from src/proto/grpc/testing/stats.proto</summary>
  11. public static partial class StatsReflection {
  12. #region Descriptor
  13. /// <summary>File descriptor for src/proto/grpc/testing/stats.proto</summary>
  14. public static pbr::FileDescriptor Descriptor {
  15. get { return descriptor; }
  16. }
  17. private static pbr::FileDescriptor descriptor;
  18. static StatsReflection() {
  19. byte[] descriptorData = global::System.Convert.FromBase64String(
  20. string.Concat(
  21. "CiJzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3N0YXRzLnByb3RvEgxncnBjLnRl",
  22. "c3RpbmciegoLU2VydmVyU3RhdHMSFAoMdGltZV9lbGFwc2VkGAEgASgBEhEK",
  23. "CXRpbWVfdXNlchgCIAEoARITCgt0aW1lX3N5c3RlbRgDIAEoARIWCg50b3Rh",
  24. "bF9jcHVfdGltZRgEIAEoBBIVCg1pZGxlX2NwdV90aW1lGAUgASgEIjsKD0hp",
  25. "c3RvZ3JhbVBhcmFtcxISCgpyZXNvbHV0aW9uGAEgASgBEhQKDG1heF9wb3Nz",
  26. "aWJsZRgCIAEoASJ3Cg1IaXN0b2dyYW1EYXRhEg4KBmJ1Y2tldBgBIAMoDRIQ",
  27. "CghtaW5fc2VlbhgCIAEoARIQCghtYXhfc2VlbhgDIAEoARILCgNzdW0YBCAB",
  28. "KAESFgoOc3VtX29mX3NxdWFyZXMYBSABKAESDQoFY291bnQYBiABKAEiOAoS",
  29. "UmVxdWVzdFJlc3VsdENvdW50EhMKC3N0YXR1c19jb2RlGAEgASgFEg0KBWNv",
  30. "dW50GAIgASgDIrYBCgtDbGllbnRTdGF0cxIuCglsYXRlbmNpZXMYASABKAsy",
  31. "Gy5ncnBjLnRlc3RpbmcuSGlzdG9ncmFtRGF0YRIUCgx0aW1lX2VsYXBzZWQY",
  32. "AiABKAESEQoJdGltZV91c2VyGAMgASgBEhMKC3RpbWVfc3lzdGVtGAQgASgB",
  33. "EjkKD3JlcXVlc3RfcmVzdWx0cxgFIAMoCzIgLmdycGMudGVzdGluZy5SZXF1",
  34. "ZXN0UmVzdWx0Q291bnRiBnByb3RvMw=="));
  35. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  36. new pbr::FileDescriptor[] { },
  37. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  38. new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ServerStats), global::Grpc.Testing.ServerStats.Parser, new[]{ "TimeElapsed", "TimeUser", "TimeSystem", "TotalCpuTime", "IdleCpuTime" }, null, null, null),
  39. new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.HistogramParams), global::Grpc.Testing.HistogramParams.Parser, new[]{ "Resolution", "MaxPossible" }, null, null, null),
  40. new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.HistogramData), global::Grpc.Testing.HistogramData.Parser, new[]{ "Bucket", "MinSeen", "MaxSeen", "Sum", "SumOfSquares", "Count" }, null, null, null),
  41. new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.RequestResultCount), global::Grpc.Testing.RequestResultCount.Parser, new[]{ "StatusCode", "Count" }, null, null, null),
  42. new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ClientStats), global::Grpc.Testing.ClientStats.Parser, new[]{ "Latencies", "TimeElapsed", "TimeUser", "TimeSystem", "RequestResults" }, null, null, null)
  43. }));
  44. }
  45. #endregion
  46. }
  47. #region Messages
  48. public sealed partial class ServerStats : pb::IMessage<ServerStats> {
  49. private static readonly pb::MessageParser<ServerStats> _parser = new pb::MessageParser<ServerStats>(() => new ServerStats());
  50. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  51. public static pb::MessageParser<ServerStats> Parser { get { return _parser; } }
  52. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  53. public static pbr::MessageDescriptor Descriptor {
  54. get { return global::Grpc.Testing.StatsReflection.Descriptor.MessageTypes[0]; }
  55. }
  56. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  57. pbr::MessageDescriptor pb::IMessage.Descriptor {
  58. get { return Descriptor; }
  59. }
  60. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  61. public ServerStats() {
  62. OnConstruction();
  63. }
  64. partial void OnConstruction();
  65. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  66. public ServerStats(ServerStats other) : this() {
  67. timeElapsed_ = other.timeElapsed_;
  68. timeUser_ = other.timeUser_;
  69. timeSystem_ = other.timeSystem_;
  70. totalCpuTime_ = other.totalCpuTime_;
  71. idleCpuTime_ = other.idleCpuTime_;
  72. }
  73. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  74. public ServerStats Clone() {
  75. return new ServerStats(this);
  76. }
  77. /// <summary>Field number for the "time_elapsed" field.</summary>
  78. public const int TimeElapsedFieldNumber = 1;
  79. private double timeElapsed_;
  80. /// <summary>
  81. /// wall clock time change in seconds since last reset
  82. /// </summary>
  83. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  84. public double TimeElapsed {
  85. get { return timeElapsed_; }
  86. set {
  87. timeElapsed_ = value;
  88. }
  89. }
  90. /// <summary>Field number for the "time_user" field.</summary>
  91. public const int TimeUserFieldNumber = 2;
  92. private double timeUser_;
  93. /// <summary>
  94. /// change in user time (in seconds) used by the server since last reset
  95. /// </summary>
  96. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  97. public double TimeUser {
  98. get { return timeUser_; }
  99. set {
  100. timeUser_ = value;
  101. }
  102. }
  103. /// <summary>Field number for the "time_system" field.</summary>
  104. public const int TimeSystemFieldNumber = 3;
  105. private double timeSystem_;
  106. /// <summary>
  107. /// change in server time (in seconds) used by the server process and all
  108. /// threads since last reset
  109. /// </summary>
  110. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  111. public double TimeSystem {
  112. get { return timeSystem_; }
  113. set {
  114. timeSystem_ = value;
  115. }
  116. }
  117. /// <summary>Field number for the "total_cpu_time" field.</summary>
  118. public const int TotalCpuTimeFieldNumber = 4;
  119. private ulong totalCpuTime_;
  120. /// <summary>
  121. /// change in total cpu time of the server (data from proc/stat)
  122. /// </summary>
  123. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  124. public ulong TotalCpuTime {
  125. get { return totalCpuTime_; }
  126. set {
  127. totalCpuTime_ = value;
  128. }
  129. }
  130. /// <summary>Field number for the "idle_cpu_time" field.</summary>
  131. public const int IdleCpuTimeFieldNumber = 5;
  132. private ulong idleCpuTime_;
  133. /// <summary>
  134. /// change in idle time of the server (data from proc/stat)
  135. /// </summary>
  136. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  137. public ulong IdleCpuTime {
  138. get { return idleCpuTime_; }
  139. set {
  140. idleCpuTime_ = value;
  141. }
  142. }
  143. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  144. public override bool Equals(object other) {
  145. return Equals(other as ServerStats);
  146. }
  147. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  148. public bool Equals(ServerStats other) {
  149. if (ReferenceEquals(other, null)) {
  150. return false;
  151. }
  152. if (ReferenceEquals(other, this)) {
  153. return true;
  154. }
  155. if (TimeElapsed != other.TimeElapsed) return false;
  156. if (TimeUser != other.TimeUser) return false;
  157. if (TimeSystem != other.TimeSystem) return false;
  158. if (TotalCpuTime != other.TotalCpuTime) return false;
  159. if (IdleCpuTime != other.IdleCpuTime) return false;
  160. return true;
  161. }
  162. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  163. public override int GetHashCode() {
  164. int hash = 1;
  165. if (TimeElapsed != 0D) hash ^= TimeElapsed.GetHashCode();
  166. if (TimeUser != 0D) hash ^= TimeUser.GetHashCode();
  167. if (TimeSystem != 0D) hash ^= TimeSystem.GetHashCode();
  168. if (TotalCpuTime != 0UL) hash ^= TotalCpuTime.GetHashCode();
  169. if (IdleCpuTime != 0UL) hash ^= IdleCpuTime.GetHashCode();
  170. return hash;
  171. }
  172. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  173. public override string ToString() {
  174. return pb::JsonFormatter.ToDiagnosticString(this);
  175. }
  176. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  177. public void WriteTo(pb::CodedOutputStream output) {
  178. if (TimeElapsed != 0D) {
  179. output.WriteRawTag(9);
  180. output.WriteDouble(TimeElapsed);
  181. }
  182. if (TimeUser != 0D) {
  183. output.WriteRawTag(17);
  184. output.WriteDouble(TimeUser);
  185. }
  186. if (TimeSystem != 0D) {
  187. output.WriteRawTag(25);
  188. output.WriteDouble(TimeSystem);
  189. }
  190. if (TotalCpuTime != 0UL) {
  191. output.WriteRawTag(32);
  192. output.WriteUInt64(TotalCpuTime);
  193. }
  194. if (IdleCpuTime != 0UL) {
  195. output.WriteRawTag(40);
  196. output.WriteUInt64(IdleCpuTime);
  197. }
  198. }
  199. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  200. public int CalculateSize() {
  201. int size = 0;
  202. if (TimeElapsed != 0D) {
  203. size += 1 + 8;
  204. }
  205. if (TimeUser != 0D) {
  206. size += 1 + 8;
  207. }
  208. if (TimeSystem != 0D) {
  209. size += 1 + 8;
  210. }
  211. if (TotalCpuTime != 0UL) {
  212. size += 1 + pb::CodedOutputStream.ComputeUInt64Size(TotalCpuTime);
  213. }
  214. if (IdleCpuTime != 0UL) {
  215. size += 1 + pb::CodedOutputStream.ComputeUInt64Size(IdleCpuTime);
  216. }
  217. return size;
  218. }
  219. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  220. public void MergeFrom(ServerStats other) {
  221. if (other == null) {
  222. return;
  223. }
  224. if (other.TimeElapsed != 0D) {
  225. TimeElapsed = other.TimeElapsed;
  226. }
  227. if (other.TimeUser != 0D) {
  228. TimeUser = other.TimeUser;
  229. }
  230. if (other.TimeSystem != 0D) {
  231. TimeSystem = other.TimeSystem;
  232. }
  233. if (other.TotalCpuTime != 0UL) {
  234. TotalCpuTime = other.TotalCpuTime;
  235. }
  236. if (other.IdleCpuTime != 0UL) {
  237. IdleCpuTime = other.IdleCpuTime;
  238. }
  239. }
  240. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  241. public void MergeFrom(pb::CodedInputStream input) {
  242. uint tag;
  243. while ((tag = input.ReadTag()) != 0) {
  244. switch(tag) {
  245. default:
  246. input.SkipLastField();
  247. break;
  248. case 9: {
  249. TimeElapsed = input.ReadDouble();
  250. break;
  251. }
  252. case 17: {
  253. TimeUser = input.ReadDouble();
  254. break;
  255. }
  256. case 25: {
  257. TimeSystem = input.ReadDouble();
  258. break;
  259. }
  260. case 32: {
  261. TotalCpuTime = input.ReadUInt64();
  262. break;
  263. }
  264. case 40: {
  265. IdleCpuTime = input.ReadUInt64();
  266. break;
  267. }
  268. }
  269. }
  270. }
  271. }
  272. /// <summary>
  273. /// Histogram params based on grpc/support/histogram.c
  274. /// </summary>
  275. public sealed partial class HistogramParams : pb::IMessage<HistogramParams> {
  276. private static readonly pb::MessageParser<HistogramParams> _parser = new pb::MessageParser<HistogramParams>(() => new HistogramParams());
  277. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  278. public static pb::MessageParser<HistogramParams> Parser { get { return _parser; } }
  279. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  280. public static pbr::MessageDescriptor Descriptor {
  281. get { return global::Grpc.Testing.StatsReflection.Descriptor.MessageTypes[1]; }
  282. }
  283. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  284. pbr::MessageDescriptor pb::IMessage.Descriptor {
  285. get { return Descriptor; }
  286. }
  287. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  288. public HistogramParams() {
  289. OnConstruction();
  290. }
  291. partial void OnConstruction();
  292. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  293. public HistogramParams(HistogramParams other) : this() {
  294. resolution_ = other.resolution_;
  295. maxPossible_ = other.maxPossible_;
  296. }
  297. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  298. public HistogramParams Clone() {
  299. return new HistogramParams(this);
  300. }
  301. /// <summary>Field number for the "resolution" field.</summary>
  302. public const int ResolutionFieldNumber = 1;
  303. private double resolution_;
  304. /// <summary>
  305. /// first bucket is [0, 1 + resolution)
  306. /// </summary>
  307. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  308. public double Resolution {
  309. get { return resolution_; }
  310. set {
  311. resolution_ = value;
  312. }
  313. }
  314. /// <summary>Field number for the "max_possible" field.</summary>
  315. public const int MaxPossibleFieldNumber = 2;
  316. private double maxPossible_;
  317. /// <summary>
  318. /// use enough buckets to allow this value
  319. /// </summary>
  320. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  321. public double MaxPossible {
  322. get { return maxPossible_; }
  323. set {
  324. maxPossible_ = value;
  325. }
  326. }
  327. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  328. public override bool Equals(object other) {
  329. return Equals(other as HistogramParams);
  330. }
  331. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  332. public bool Equals(HistogramParams other) {
  333. if (ReferenceEquals(other, null)) {
  334. return false;
  335. }
  336. if (ReferenceEquals(other, this)) {
  337. return true;
  338. }
  339. if (Resolution != other.Resolution) return false;
  340. if (MaxPossible != other.MaxPossible) return false;
  341. return true;
  342. }
  343. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  344. public override int GetHashCode() {
  345. int hash = 1;
  346. if (Resolution != 0D) hash ^= Resolution.GetHashCode();
  347. if (MaxPossible != 0D) hash ^= MaxPossible.GetHashCode();
  348. return hash;
  349. }
  350. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  351. public override string ToString() {
  352. return pb::JsonFormatter.ToDiagnosticString(this);
  353. }
  354. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  355. public void WriteTo(pb::CodedOutputStream output) {
  356. if (Resolution != 0D) {
  357. output.WriteRawTag(9);
  358. output.WriteDouble(Resolution);
  359. }
  360. if (MaxPossible != 0D) {
  361. output.WriteRawTag(17);
  362. output.WriteDouble(MaxPossible);
  363. }
  364. }
  365. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  366. public int CalculateSize() {
  367. int size = 0;
  368. if (Resolution != 0D) {
  369. size += 1 + 8;
  370. }
  371. if (MaxPossible != 0D) {
  372. size += 1 + 8;
  373. }
  374. return size;
  375. }
  376. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  377. public void MergeFrom(HistogramParams other) {
  378. if (other == null) {
  379. return;
  380. }
  381. if (other.Resolution != 0D) {
  382. Resolution = other.Resolution;
  383. }
  384. if (other.MaxPossible != 0D) {
  385. MaxPossible = other.MaxPossible;
  386. }
  387. }
  388. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  389. public void MergeFrom(pb::CodedInputStream input) {
  390. uint tag;
  391. while ((tag = input.ReadTag()) != 0) {
  392. switch(tag) {
  393. default:
  394. input.SkipLastField();
  395. break;
  396. case 9: {
  397. Resolution = input.ReadDouble();
  398. break;
  399. }
  400. case 17: {
  401. MaxPossible = input.ReadDouble();
  402. break;
  403. }
  404. }
  405. }
  406. }
  407. }
  408. /// <summary>
  409. /// Histogram data based on grpc/support/histogram.c
  410. /// </summary>
  411. public sealed partial class HistogramData : pb::IMessage<HistogramData> {
  412. private static readonly pb::MessageParser<HistogramData> _parser = new pb::MessageParser<HistogramData>(() => new HistogramData());
  413. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  414. public static pb::MessageParser<HistogramData> Parser { get { return _parser; } }
  415. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  416. public static pbr::MessageDescriptor Descriptor {
  417. get { return global::Grpc.Testing.StatsReflection.Descriptor.MessageTypes[2]; }
  418. }
  419. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  420. pbr::MessageDescriptor pb::IMessage.Descriptor {
  421. get { return Descriptor; }
  422. }
  423. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  424. public HistogramData() {
  425. OnConstruction();
  426. }
  427. partial void OnConstruction();
  428. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  429. public HistogramData(HistogramData other) : this() {
  430. bucket_ = other.bucket_.Clone();
  431. minSeen_ = other.minSeen_;
  432. maxSeen_ = other.maxSeen_;
  433. sum_ = other.sum_;
  434. sumOfSquares_ = other.sumOfSquares_;
  435. count_ = other.count_;
  436. }
  437. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  438. public HistogramData Clone() {
  439. return new HistogramData(this);
  440. }
  441. /// <summary>Field number for the "bucket" field.</summary>
  442. public const int BucketFieldNumber = 1;
  443. private static readonly pb::FieldCodec<uint> _repeated_bucket_codec
  444. = pb::FieldCodec.ForUInt32(10);
  445. private readonly pbc::RepeatedField<uint> bucket_ = new pbc::RepeatedField<uint>();
  446. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  447. public pbc::RepeatedField<uint> Bucket {
  448. get { return bucket_; }
  449. }
  450. /// <summary>Field number for the "min_seen" field.</summary>
  451. public const int MinSeenFieldNumber = 2;
  452. private double minSeen_;
  453. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  454. public double MinSeen {
  455. get { return minSeen_; }
  456. set {
  457. minSeen_ = value;
  458. }
  459. }
  460. /// <summary>Field number for the "max_seen" field.</summary>
  461. public const int MaxSeenFieldNumber = 3;
  462. private double maxSeen_;
  463. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  464. public double MaxSeen {
  465. get { return maxSeen_; }
  466. set {
  467. maxSeen_ = value;
  468. }
  469. }
  470. /// <summary>Field number for the "sum" field.</summary>
  471. public const int SumFieldNumber = 4;
  472. private double sum_;
  473. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  474. public double Sum {
  475. get { return sum_; }
  476. set {
  477. sum_ = value;
  478. }
  479. }
  480. /// <summary>Field number for the "sum_of_squares" field.</summary>
  481. public const int SumOfSquaresFieldNumber = 5;
  482. private double sumOfSquares_;
  483. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  484. public double SumOfSquares {
  485. get { return sumOfSquares_; }
  486. set {
  487. sumOfSquares_ = value;
  488. }
  489. }
  490. /// <summary>Field number for the "count" field.</summary>
  491. public const int CountFieldNumber = 6;
  492. private double count_;
  493. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  494. public double Count {
  495. get { return count_; }
  496. set {
  497. count_ = value;
  498. }
  499. }
  500. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  501. public override bool Equals(object other) {
  502. return Equals(other as HistogramData);
  503. }
  504. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  505. public bool Equals(HistogramData other) {
  506. if (ReferenceEquals(other, null)) {
  507. return false;
  508. }
  509. if (ReferenceEquals(other, this)) {
  510. return true;
  511. }
  512. if(!bucket_.Equals(other.bucket_)) return false;
  513. if (MinSeen != other.MinSeen) return false;
  514. if (MaxSeen != other.MaxSeen) return false;
  515. if (Sum != other.Sum) return false;
  516. if (SumOfSquares != other.SumOfSquares) return false;
  517. if (Count != other.Count) return false;
  518. return true;
  519. }
  520. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  521. public override int GetHashCode() {
  522. int hash = 1;
  523. hash ^= bucket_.GetHashCode();
  524. if (MinSeen != 0D) hash ^= MinSeen.GetHashCode();
  525. if (MaxSeen != 0D) hash ^= MaxSeen.GetHashCode();
  526. if (Sum != 0D) hash ^= Sum.GetHashCode();
  527. if (SumOfSquares != 0D) hash ^= SumOfSquares.GetHashCode();
  528. if (Count != 0D) hash ^= Count.GetHashCode();
  529. return hash;
  530. }
  531. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  532. public override string ToString() {
  533. return pb::JsonFormatter.ToDiagnosticString(this);
  534. }
  535. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  536. public void WriteTo(pb::CodedOutputStream output) {
  537. bucket_.WriteTo(output, _repeated_bucket_codec);
  538. if (MinSeen != 0D) {
  539. output.WriteRawTag(17);
  540. output.WriteDouble(MinSeen);
  541. }
  542. if (MaxSeen != 0D) {
  543. output.WriteRawTag(25);
  544. output.WriteDouble(MaxSeen);
  545. }
  546. if (Sum != 0D) {
  547. output.WriteRawTag(33);
  548. output.WriteDouble(Sum);
  549. }
  550. if (SumOfSquares != 0D) {
  551. output.WriteRawTag(41);
  552. output.WriteDouble(SumOfSquares);
  553. }
  554. if (Count != 0D) {
  555. output.WriteRawTag(49);
  556. output.WriteDouble(Count);
  557. }
  558. }
  559. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  560. public int CalculateSize() {
  561. int size = 0;
  562. size += bucket_.CalculateSize(_repeated_bucket_codec);
  563. if (MinSeen != 0D) {
  564. size += 1 + 8;
  565. }
  566. if (MaxSeen != 0D) {
  567. size += 1 + 8;
  568. }
  569. if (Sum != 0D) {
  570. size += 1 + 8;
  571. }
  572. if (SumOfSquares != 0D) {
  573. size += 1 + 8;
  574. }
  575. if (Count != 0D) {
  576. size += 1 + 8;
  577. }
  578. return size;
  579. }
  580. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  581. public void MergeFrom(HistogramData other) {
  582. if (other == null) {
  583. return;
  584. }
  585. bucket_.Add(other.bucket_);
  586. if (other.MinSeen != 0D) {
  587. MinSeen = other.MinSeen;
  588. }
  589. if (other.MaxSeen != 0D) {
  590. MaxSeen = other.MaxSeen;
  591. }
  592. if (other.Sum != 0D) {
  593. Sum = other.Sum;
  594. }
  595. if (other.SumOfSquares != 0D) {
  596. SumOfSquares = other.SumOfSquares;
  597. }
  598. if (other.Count != 0D) {
  599. Count = other.Count;
  600. }
  601. }
  602. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  603. public void MergeFrom(pb::CodedInputStream input) {
  604. uint tag;
  605. while ((tag = input.ReadTag()) != 0) {
  606. switch(tag) {
  607. default:
  608. input.SkipLastField();
  609. break;
  610. case 10:
  611. case 8: {
  612. bucket_.AddEntriesFrom(input, _repeated_bucket_codec);
  613. break;
  614. }
  615. case 17: {
  616. MinSeen = input.ReadDouble();
  617. break;
  618. }
  619. case 25: {
  620. MaxSeen = input.ReadDouble();
  621. break;
  622. }
  623. case 33: {
  624. Sum = input.ReadDouble();
  625. break;
  626. }
  627. case 41: {
  628. SumOfSquares = input.ReadDouble();
  629. break;
  630. }
  631. case 49: {
  632. Count = input.ReadDouble();
  633. break;
  634. }
  635. }
  636. }
  637. }
  638. }
  639. public sealed partial class RequestResultCount : pb::IMessage<RequestResultCount> {
  640. private static readonly pb::MessageParser<RequestResultCount> _parser = new pb::MessageParser<RequestResultCount>(() => new RequestResultCount());
  641. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  642. public static pb::MessageParser<RequestResultCount> Parser { get { return _parser; } }
  643. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  644. public static pbr::MessageDescriptor Descriptor {
  645. get { return global::Grpc.Testing.StatsReflection.Descriptor.MessageTypes[3]; }
  646. }
  647. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  648. pbr::MessageDescriptor pb::IMessage.Descriptor {
  649. get { return Descriptor; }
  650. }
  651. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  652. public RequestResultCount() {
  653. OnConstruction();
  654. }
  655. partial void OnConstruction();
  656. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  657. public RequestResultCount(RequestResultCount other) : this() {
  658. statusCode_ = other.statusCode_;
  659. count_ = other.count_;
  660. }
  661. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  662. public RequestResultCount Clone() {
  663. return new RequestResultCount(this);
  664. }
  665. /// <summary>Field number for the "status_code" field.</summary>
  666. public const int StatusCodeFieldNumber = 1;
  667. private int statusCode_;
  668. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  669. public int StatusCode {
  670. get { return statusCode_; }
  671. set {
  672. statusCode_ = value;
  673. }
  674. }
  675. /// <summary>Field number for the "count" field.</summary>
  676. public const int CountFieldNumber = 2;
  677. private long count_;
  678. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  679. public long Count {
  680. get { return count_; }
  681. set {
  682. count_ = value;
  683. }
  684. }
  685. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  686. public override bool Equals(object other) {
  687. return Equals(other as RequestResultCount);
  688. }
  689. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  690. public bool Equals(RequestResultCount other) {
  691. if (ReferenceEquals(other, null)) {
  692. return false;
  693. }
  694. if (ReferenceEquals(other, this)) {
  695. return true;
  696. }
  697. if (StatusCode != other.StatusCode) return false;
  698. if (Count != other.Count) return false;
  699. return true;
  700. }
  701. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  702. public override int GetHashCode() {
  703. int hash = 1;
  704. if (StatusCode != 0) hash ^= StatusCode.GetHashCode();
  705. if (Count != 0L) hash ^= Count.GetHashCode();
  706. return hash;
  707. }
  708. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  709. public override string ToString() {
  710. return pb::JsonFormatter.ToDiagnosticString(this);
  711. }
  712. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  713. public void WriteTo(pb::CodedOutputStream output) {
  714. if (StatusCode != 0) {
  715. output.WriteRawTag(8);
  716. output.WriteInt32(StatusCode);
  717. }
  718. if (Count != 0L) {
  719. output.WriteRawTag(16);
  720. output.WriteInt64(Count);
  721. }
  722. }
  723. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  724. public int CalculateSize() {
  725. int size = 0;
  726. if (StatusCode != 0) {
  727. size += 1 + pb::CodedOutputStream.ComputeInt32Size(StatusCode);
  728. }
  729. if (Count != 0L) {
  730. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Count);
  731. }
  732. return size;
  733. }
  734. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  735. public void MergeFrom(RequestResultCount other) {
  736. if (other == null) {
  737. return;
  738. }
  739. if (other.StatusCode != 0) {
  740. StatusCode = other.StatusCode;
  741. }
  742. if (other.Count != 0L) {
  743. Count = other.Count;
  744. }
  745. }
  746. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  747. public void MergeFrom(pb::CodedInputStream input) {
  748. uint tag;
  749. while ((tag = input.ReadTag()) != 0) {
  750. switch(tag) {
  751. default:
  752. input.SkipLastField();
  753. break;
  754. case 8: {
  755. StatusCode = input.ReadInt32();
  756. break;
  757. }
  758. case 16: {
  759. Count = input.ReadInt64();
  760. break;
  761. }
  762. }
  763. }
  764. }
  765. }
  766. public sealed partial class ClientStats : pb::IMessage<ClientStats> {
  767. private static readonly pb::MessageParser<ClientStats> _parser = new pb::MessageParser<ClientStats>(() => new ClientStats());
  768. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  769. public static pb::MessageParser<ClientStats> Parser { get { return _parser; } }
  770. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  771. public static pbr::MessageDescriptor Descriptor {
  772. get { return global::Grpc.Testing.StatsReflection.Descriptor.MessageTypes[4]; }
  773. }
  774. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  775. pbr::MessageDescriptor pb::IMessage.Descriptor {
  776. get { return Descriptor; }
  777. }
  778. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  779. public ClientStats() {
  780. OnConstruction();
  781. }
  782. partial void OnConstruction();
  783. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  784. public ClientStats(ClientStats other) : this() {
  785. Latencies = other.latencies_ != null ? other.Latencies.Clone() : null;
  786. timeElapsed_ = other.timeElapsed_;
  787. timeUser_ = other.timeUser_;
  788. timeSystem_ = other.timeSystem_;
  789. requestResults_ = other.requestResults_.Clone();
  790. }
  791. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  792. public ClientStats Clone() {
  793. return new ClientStats(this);
  794. }
  795. /// <summary>Field number for the "latencies" field.</summary>
  796. public const int LatenciesFieldNumber = 1;
  797. private global::Grpc.Testing.HistogramData latencies_;
  798. /// <summary>
  799. /// Latency histogram. Data points are in nanoseconds.
  800. /// </summary>
  801. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  802. public global::Grpc.Testing.HistogramData Latencies {
  803. get { return latencies_; }
  804. set {
  805. latencies_ = value;
  806. }
  807. }
  808. /// <summary>Field number for the "time_elapsed" field.</summary>
  809. public const int TimeElapsedFieldNumber = 2;
  810. private double timeElapsed_;
  811. /// <summary>
  812. /// See ServerStats for details.
  813. /// </summary>
  814. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  815. public double TimeElapsed {
  816. get { return timeElapsed_; }
  817. set {
  818. timeElapsed_ = value;
  819. }
  820. }
  821. /// <summary>Field number for the "time_user" field.</summary>
  822. public const int TimeUserFieldNumber = 3;
  823. private double timeUser_;
  824. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  825. public double TimeUser {
  826. get { return timeUser_; }
  827. set {
  828. timeUser_ = value;
  829. }
  830. }
  831. /// <summary>Field number for the "time_system" field.</summary>
  832. public const int TimeSystemFieldNumber = 4;
  833. private double timeSystem_;
  834. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  835. public double TimeSystem {
  836. get { return timeSystem_; }
  837. set {
  838. timeSystem_ = value;
  839. }
  840. }
  841. /// <summary>Field number for the "request_results" field.</summary>
  842. public const int RequestResultsFieldNumber = 5;
  843. private static readonly pb::FieldCodec<global::Grpc.Testing.RequestResultCount> _repeated_requestResults_codec
  844. = pb::FieldCodec.ForMessage(42, global::Grpc.Testing.RequestResultCount.Parser);
  845. private readonly pbc::RepeatedField<global::Grpc.Testing.RequestResultCount> requestResults_ = new pbc::RepeatedField<global::Grpc.Testing.RequestResultCount>();
  846. /// <summary>
  847. /// Number of failed requests (one row per status code seen)
  848. /// </summary>
  849. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  850. public pbc::RepeatedField<global::Grpc.Testing.RequestResultCount> RequestResults {
  851. get { return requestResults_; }
  852. }
  853. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  854. public override bool Equals(object other) {
  855. return Equals(other as ClientStats);
  856. }
  857. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  858. public bool Equals(ClientStats other) {
  859. if (ReferenceEquals(other, null)) {
  860. return false;
  861. }
  862. if (ReferenceEquals(other, this)) {
  863. return true;
  864. }
  865. if (!object.Equals(Latencies, other.Latencies)) return false;
  866. if (TimeElapsed != other.TimeElapsed) return false;
  867. if (TimeUser != other.TimeUser) return false;
  868. if (TimeSystem != other.TimeSystem) return false;
  869. if(!requestResults_.Equals(other.requestResults_)) return false;
  870. return true;
  871. }
  872. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  873. public override int GetHashCode() {
  874. int hash = 1;
  875. if (latencies_ != null) hash ^= Latencies.GetHashCode();
  876. if (TimeElapsed != 0D) hash ^= TimeElapsed.GetHashCode();
  877. if (TimeUser != 0D) hash ^= TimeUser.GetHashCode();
  878. if (TimeSystem != 0D) hash ^= TimeSystem.GetHashCode();
  879. hash ^= requestResults_.GetHashCode();
  880. return hash;
  881. }
  882. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  883. public override string ToString() {
  884. return pb::JsonFormatter.ToDiagnosticString(this);
  885. }
  886. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  887. public void WriteTo(pb::CodedOutputStream output) {
  888. if (latencies_ != null) {
  889. output.WriteRawTag(10);
  890. output.WriteMessage(Latencies);
  891. }
  892. if (TimeElapsed != 0D) {
  893. output.WriteRawTag(17);
  894. output.WriteDouble(TimeElapsed);
  895. }
  896. if (TimeUser != 0D) {
  897. output.WriteRawTag(25);
  898. output.WriteDouble(TimeUser);
  899. }
  900. if (TimeSystem != 0D) {
  901. output.WriteRawTag(33);
  902. output.WriteDouble(TimeSystem);
  903. }
  904. requestResults_.WriteTo(output, _repeated_requestResults_codec);
  905. }
  906. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  907. public int CalculateSize() {
  908. int size = 0;
  909. if (latencies_ != null) {
  910. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Latencies);
  911. }
  912. if (TimeElapsed != 0D) {
  913. size += 1 + 8;
  914. }
  915. if (TimeUser != 0D) {
  916. size += 1 + 8;
  917. }
  918. if (TimeSystem != 0D) {
  919. size += 1 + 8;
  920. }
  921. size += requestResults_.CalculateSize(_repeated_requestResults_codec);
  922. return size;
  923. }
  924. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  925. public void MergeFrom(ClientStats other) {
  926. if (other == null) {
  927. return;
  928. }
  929. if (other.latencies_ != null) {
  930. if (latencies_ == null) {
  931. latencies_ = new global::Grpc.Testing.HistogramData();
  932. }
  933. Latencies.MergeFrom(other.Latencies);
  934. }
  935. if (other.TimeElapsed != 0D) {
  936. TimeElapsed = other.TimeElapsed;
  937. }
  938. if (other.TimeUser != 0D) {
  939. TimeUser = other.TimeUser;
  940. }
  941. if (other.TimeSystem != 0D) {
  942. TimeSystem = other.TimeSystem;
  943. }
  944. requestResults_.Add(other.requestResults_);
  945. }
  946. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  947. public void MergeFrom(pb::CodedInputStream input) {
  948. uint tag;
  949. while ((tag = input.ReadTag()) != 0) {
  950. switch(tag) {
  951. default:
  952. input.SkipLastField();
  953. break;
  954. case 10: {
  955. if (latencies_ == null) {
  956. latencies_ = new global::Grpc.Testing.HistogramData();
  957. }
  958. input.ReadMessage(latencies_);
  959. break;
  960. }
  961. case 17: {
  962. TimeElapsed = input.ReadDouble();
  963. break;
  964. }
  965. case 25: {
  966. TimeUser = input.ReadDouble();
  967. break;
  968. }
  969. case 33: {
  970. TimeSystem = input.ReadDouble();
  971. break;
  972. }
  973. case 42: {
  974. requestResults_.AddEntriesFrom(input, _repeated_requestResults_codec);
  975. break;
  976. }
  977. }
  978. }
  979. }
  980. }
  981. #endregion
  982. }
  983. #endregion Designer generated code