Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 2 | // source: src/proto/grpc/testing/stats.proto |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 3 | #pragma warning disable 1591, 0612, 3021 |
| 4 | #region Designer generated code |
| 5 | |
| 6 | using pb = global::Google.Protobuf; |
| 7 | using pbc = global::Google.Protobuf.Collections; |
| 8 | using pbr = global::Google.Protobuf.Reflection; |
| 9 | using scg = global::System.Collections.Generic; |
| 10 | namespace Grpc.Testing { |
| 11 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 12 | /// <summary>Holder for reflection information generated from src/proto/grpc/testing/stats.proto</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 13 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 14 | public static partial class StatsReflection { |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 15 | |
| 16 | #region Descriptor |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 17 | /// <summary>File descriptor for src/proto/grpc/testing/stats.proto</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 18 | public static pbr::FileDescriptor Descriptor { |
| 19 | get { return descriptor; } |
| 20 | } |
| 21 | private static pbr::FileDescriptor descriptor; |
| 22 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 23 | static StatsReflection() { |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 24 | byte[] descriptorData = global::System.Convert.FromBase64String( |
| 25 | string.Concat( |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 26 | "CiJzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3N0YXRzLnByb3RvEgxncnBjLnRl", |
| 27 | "c3RpbmciSwoLU2VydmVyU3RhdHMSFAoMdGltZV9lbGFwc2VkGAEgASgBEhEK", |
| 28 | "CXRpbWVfdXNlchgCIAEoARITCgt0aW1lX3N5c3RlbRgDIAEoASI7Cg9IaXN0", |
| 29 | "b2dyYW1QYXJhbXMSEgoKcmVzb2x1dGlvbhgBIAEoARIUCgxtYXhfcG9zc2li", |
| 30 | "bGUYAiABKAEidwoNSGlzdG9ncmFtRGF0YRIOCgZidWNrZXQYASADKA0SEAoI", |
| 31 | "bWluX3NlZW4YAiABKAESEAoIbWF4X3NlZW4YAyABKAESCwoDc3VtGAQgASgB", |
| 32 | "EhYKDnN1bV9vZl9zcXVhcmVzGAUgASgBEg0KBWNvdW50GAYgASgBInsKC0Ns", |
| 33 | "aWVudFN0YXRzEi4KCWxhdGVuY2llcxgBIAEoCzIbLmdycGMudGVzdGluZy5I", |
| 34 | "aXN0b2dyYW1EYXRhEhQKDHRpbWVfZWxhcHNlZBgCIAEoARIRCgl0aW1lX3Vz", |
| 35 | "ZXIYAyABKAESEwoLdGltZV9zeXN0ZW0YBCABKAFiBnByb3RvMw==")); |
| 36 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 37 | new pbr::FileDescriptor[] { }, |
| 38 | new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 39 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerStats), global::Grpc.Testing.ServerStats.Parser, new[]{ "TimeElapsed", "TimeUser", "TimeSystem" }, null, null, null), |
| 40 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.HistogramParams), global::Grpc.Testing.HistogramParams.Parser, new[]{ "Resolution", "MaxPossible" }, null, null, null), |
| 41 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.HistogramData), global::Grpc.Testing.HistogramData.Parser, new[]{ "Bucket", "MinSeen", "MaxSeen", "Sum", "SumOfSquares", "Count" }, null, null, null), |
| 42 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientStats), global::Grpc.Testing.ClientStats.Parser, new[]{ "Latencies", "TimeElapsed", "TimeUser", "TimeSystem" }, null, null, null) |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 43 | })); |
| 44 | } |
| 45 | #endregion |
| 46 | |
| 47 | } |
| 48 | #region Messages |
| 49 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 50 | public sealed partial class ServerStats : pb::IMessage<ServerStats> { |
| 51 | private static readonly pb::MessageParser<ServerStats> _parser = new pb::MessageParser<ServerStats>(() => new ServerStats()); |
| 52 | public static pb::MessageParser<ServerStats> Parser { get { return _parser; } } |
| 53 | |
| 54 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 55 | get { return global::Grpc.Testing.StatsReflection.Descriptor.MessageTypes[0]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 59 | get { return Descriptor; } |
| 60 | } |
| 61 | |
| 62 | public ServerStats() { |
| 63 | OnConstruction(); |
| 64 | } |
| 65 | |
| 66 | partial void OnConstruction(); |
| 67 | |
| 68 | public ServerStats(ServerStats other) : this() { |
| 69 | timeElapsed_ = other.timeElapsed_; |
| 70 | timeUser_ = other.timeUser_; |
| 71 | timeSystem_ = other.timeSystem_; |
| 72 | } |
| 73 | |
| 74 | public ServerStats Clone() { |
| 75 | return new ServerStats(this); |
| 76 | } |
| 77 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 78 | /// <summary>Field number for the "time_elapsed" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 79 | public const int TimeElapsedFieldNumber = 1; |
| 80 | private double timeElapsed_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 81 | /// <summary> |
| 82 | /// wall clock time change in seconds since last reset |
| 83 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 84 | public double TimeElapsed { |
| 85 | get { return timeElapsed_; } |
| 86 | set { |
| 87 | timeElapsed_ = value; |
| 88 | } |
| 89 | } |
| 90 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 91 | /// <summary>Field number for the "time_user" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 92 | public const int TimeUserFieldNumber = 2; |
| 93 | private double timeUser_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 94 | /// <summary> |
| 95 | /// change in user time (in seconds) used by the server since last reset |
| 96 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 97 | public double TimeUser { |
| 98 | get { return timeUser_; } |
| 99 | set { |
| 100 | timeUser_ = value; |
| 101 | } |
| 102 | } |
| 103 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 104 | /// <summary>Field number for the "time_system" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 105 | public const int TimeSystemFieldNumber = 3; |
| 106 | private double timeSystem_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 107 | /// <summary> |
| 108 | /// change in server time (in seconds) used by the server process and all |
| 109 | /// threads since last reset |
| 110 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 111 | public double TimeSystem { |
| 112 | get { return timeSystem_; } |
| 113 | set { |
| 114 | timeSystem_ = value; |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | public override bool Equals(object other) { |
| 119 | return Equals(other as ServerStats); |
| 120 | } |
| 121 | |
| 122 | public bool Equals(ServerStats other) { |
| 123 | if (ReferenceEquals(other, null)) { |
| 124 | return false; |
| 125 | } |
| 126 | if (ReferenceEquals(other, this)) { |
| 127 | return true; |
| 128 | } |
| 129 | if (TimeElapsed != other.TimeElapsed) return false; |
| 130 | if (TimeUser != other.TimeUser) return false; |
| 131 | if (TimeSystem != other.TimeSystem) return false; |
| 132 | return true; |
| 133 | } |
| 134 | |
| 135 | public override int GetHashCode() { |
| 136 | int hash = 1; |
| 137 | if (TimeElapsed != 0D) hash ^= TimeElapsed.GetHashCode(); |
| 138 | if (TimeUser != 0D) hash ^= TimeUser.GetHashCode(); |
| 139 | if (TimeSystem != 0D) hash ^= TimeSystem.GetHashCode(); |
| 140 | return hash; |
| 141 | } |
| 142 | |
| 143 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 144 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 145 | } |
| 146 | |
| 147 | public void WriteTo(pb::CodedOutputStream output) { |
| 148 | if (TimeElapsed != 0D) { |
| 149 | output.WriteRawTag(9); |
| 150 | output.WriteDouble(TimeElapsed); |
| 151 | } |
| 152 | if (TimeUser != 0D) { |
| 153 | output.WriteRawTag(17); |
| 154 | output.WriteDouble(TimeUser); |
| 155 | } |
| 156 | if (TimeSystem != 0D) { |
| 157 | output.WriteRawTag(25); |
| 158 | output.WriteDouble(TimeSystem); |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | public int CalculateSize() { |
| 163 | int size = 0; |
| 164 | if (TimeElapsed != 0D) { |
| 165 | size += 1 + 8; |
| 166 | } |
| 167 | if (TimeUser != 0D) { |
| 168 | size += 1 + 8; |
| 169 | } |
| 170 | if (TimeSystem != 0D) { |
| 171 | size += 1 + 8; |
| 172 | } |
| 173 | return size; |
| 174 | } |
| 175 | |
| 176 | public void MergeFrom(ServerStats other) { |
| 177 | if (other == null) { |
| 178 | return; |
| 179 | } |
| 180 | if (other.TimeElapsed != 0D) { |
| 181 | TimeElapsed = other.TimeElapsed; |
| 182 | } |
| 183 | if (other.TimeUser != 0D) { |
| 184 | TimeUser = other.TimeUser; |
| 185 | } |
| 186 | if (other.TimeSystem != 0D) { |
| 187 | TimeSystem = other.TimeSystem; |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | public void MergeFrom(pb::CodedInputStream input) { |
| 192 | uint tag; |
| 193 | while ((tag = input.ReadTag()) != 0) { |
| 194 | switch(tag) { |
| 195 | default: |
| 196 | input.SkipLastField(); |
| 197 | break; |
| 198 | case 9: { |
| 199 | TimeElapsed = input.ReadDouble(); |
| 200 | break; |
| 201 | } |
| 202 | case 17: { |
| 203 | TimeUser = input.ReadDouble(); |
| 204 | break; |
| 205 | } |
| 206 | case 25: { |
| 207 | TimeSystem = input.ReadDouble(); |
| 208 | break; |
| 209 | } |
| 210 | } |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | } |
| 215 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 216 | /// <summary> |
| 217 | /// Histogram params based on grpc/support/histogram.c |
| 218 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 219 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 220 | public sealed partial class HistogramParams : pb::IMessage<HistogramParams> { |
| 221 | private static readonly pb::MessageParser<HistogramParams> _parser = new pb::MessageParser<HistogramParams>(() => new HistogramParams()); |
| 222 | public static pb::MessageParser<HistogramParams> Parser { get { return _parser; } } |
| 223 | |
| 224 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 225 | get { return global::Grpc.Testing.StatsReflection.Descriptor.MessageTypes[1]; } |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 226 | } |
| 227 | |
| 228 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 229 | get { return Descriptor; } |
| 230 | } |
| 231 | |
| 232 | public HistogramParams() { |
| 233 | OnConstruction(); |
| 234 | } |
| 235 | |
| 236 | partial void OnConstruction(); |
| 237 | |
| 238 | public HistogramParams(HistogramParams other) : this() { |
| 239 | resolution_ = other.resolution_; |
| 240 | maxPossible_ = other.maxPossible_; |
| 241 | } |
| 242 | |
| 243 | public HistogramParams Clone() { |
| 244 | return new HistogramParams(this); |
| 245 | } |
| 246 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 247 | /// <summary>Field number for the "resolution" field.</summary> |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 248 | public const int ResolutionFieldNumber = 1; |
| 249 | private double resolution_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 250 | /// <summary> |
| 251 | /// first bucket is [0, 1 + resolution) |
| 252 | /// </summary> |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 253 | public double Resolution { |
| 254 | get { return resolution_; } |
| 255 | set { |
| 256 | resolution_ = value; |
| 257 | } |
| 258 | } |
| 259 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 260 | /// <summary>Field number for the "max_possible" field.</summary> |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 261 | public const int MaxPossibleFieldNumber = 2; |
| 262 | private double maxPossible_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 263 | /// <summary> |
| 264 | /// use enough buckets to allow this value |
| 265 | /// </summary> |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 266 | public double MaxPossible { |
| 267 | get { return maxPossible_; } |
| 268 | set { |
| 269 | maxPossible_ = value; |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | public override bool Equals(object other) { |
| 274 | return Equals(other as HistogramParams); |
| 275 | } |
| 276 | |
| 277 | public bool Equals(HistogramParams other) { |
| 278 | if (ReferenceEquals(other, null)) { |
| 279 | return false; |
| 280 | } |
| 281 | if (ReferenceEquals(other, this)) { |
| 282 | return true; |
| 283 | } |
| 284 | if (Resolution != other.Resolution) return false; |
| 285 | if (MaxPossible != other.MaxPossible) return false; |
| 286 | return true; |
| 287 | } |
| 288 | |
| 289 | public override int GetHashCode() { |
| 290 | int hash = 1; |
| 291 | if (Resolution != 0D) hash ^= Resolution.GetHashCode(); |
| 292 | if (MaxPossible != 0D) hash ^= MaxPossible.GetHashCode(); |
| 293 | return hash; |
| 294 | } |
| 295 | |
| 296 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 297 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 298 | } |
| 299 | |
| 300 | public void WriteTo(pb::CodedOutputStream output) { |
| 301 | if (Resolution != 0D) { |
| 302 | output.WriteRawTag(9); |
| 303 | output.WriteDouble(Resolution); |
| 304 | } |
| 305 | if (MaxPossible != 0D) { |
| 306 | output.WriteRawTag(17); |
| 307 | output.WriteDouble(MaxPossible); |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | public int CalculateSize() { |
| 312 | int size = 0; |
| 313 | if (Resolution != 0D) { |
| 314 | size += 1 + 8; |
| 315 | } |
| 316 | if (MaxPossible != 0D) { |
| 317 | size += 1 + 8; |
| 318 | } |
| 319 | return size; |
| 320 | } |
| 321 | |
| 322 | public void MergeFrom(HistogramParams other) { |
| 323 | if (other == null) { |
| 324 | return; |
| 325 | } |
| 326 | if (other.Resolution != 0D) { |
| 327 | Resolution = other.Resolution; |
| 328 | } |
| 329 | if (other.MaxPossible != 0D) { |
| 330 | MaxPossible = other.MaxPossible; |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | public void MergeFrom(pb::CodedInputStream input) { |
| 335 | uint tag; |
| 336 | while ((tag = input.ReadTag()) != 0) { |
| 337 | switch(tag) { |
| 338 | default: |
| 339 | input.SkipLastField(); |
| 340 | break; |
| 341 | case 9: { |
| 342 | Resolution = input.ReadDouble(); |
| 343 | break; |
| 344 | } |
| 345 | case 17: { |
| 346 | MaxPossible = input.ReadDouble(); |
| 347 | break; |
| 348 | } |
| 349 | } |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | } |
| 354 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 355 | /// <summary> |
| 356 | /// Histogram data based on grpc/support/histogram.c |
| 357 | /// </summary> |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 358 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 359 | public sealed partial class HistogramData : pb::IMessage<HistogramData> { |
| 360 | private static readonly pb::MessageParser<HistogramData> _parser = new pb::MessageParser<HistogramData>(() => new HistogramData()); |
| 361 | public static pb::MessageParser<HistogramData> Parser { get { return _parser; } } |
| 362 | |
| 363 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 364 | get { return global::Grpc.Testing.StatsReflection.Descriptor.MessageTypes[2]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 365 | } |
| 366 | |
| 367 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 368 | get { return Descriptor; } |
| 369 | } |
| 370 | |
| 371 | public HistogramData() { |
| 372 | OnConstruction(); |
| 373 | } |
| 374 | |
| 375 | partial void OnConstruction(); |
| 376 | |
| 377 | public HistogramData(HistogramData other) : this() { |
| 378 | bucket_ = other.bucket_.Clone(); |
| 379 | minSeen_ = other.minSeen_; |
| 380 | maxSeen_ = other.maxSeen_; |
| 381 | sum_ = other.sum_; |
| 382 | sumOfSquares_ = other.sumOfSquares_; |
| 383 | count_ = other.count_; |
| 384 | } |
| 385 | |
| 386 | public HistogramData Clone() { |
| 387 | return new HistogramData(this); |
| 388 | } |
| 389 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 390 | /// <summary>Field number for the "bucket" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 391 | public const int BucketFieldNumber = 1; |
| 392 | private static readonly pb::FieldCodec<uint> _repeated_bucket_codec |
| 393 | = pb::FieldCodec.ForUInt32(10); |
| 394 | private readonly pbc::RepeatedField<uint> bucket_ = new pbc::RepeatedField<uint>(); |
| 395 | public pbc::RepeatedField<uint> Bucket { |
| 396 | get { return bucket_; } |
| 397 | } |
| 398 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 399 | /// <summary>Field number for the "min_seen" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 400 | public const int MinSeenFieldNumber = 2; |
| 401 | private double minSeen_; |
| 402 | public double MinSeen { |
| 403 | get { return minSeen_; } |
| 404 | set { |
| 405 | minSeen_ = value; |
| 406 | } |
| 407 | } |
| 408 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 409 | /// <summary>Field number for the "max_seen" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 410 | public const int MaxSeenFieldNumber = 3; |
| 411 | private double maxSeen_; |
| 412 | public double MaxSeen { |
| 413 | get { return maxSeen_; } |
| 414 | set { |
| 415 | maxSeen_ = value; |
| 416 | } |
| 417 | } |
| 418 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 419 | /// <summary>Field number for the "sum" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 420 | public const int SumFieldNumber = 4; |
| 421 | private double sum_; |
| 422 | public double Sum { |
| 423 | get { return sum_; } |
| 424 | set { |
| 425 | sum_ = value; |
| 426 | } |
| 427 | } |
| 428 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 429 | /// <summary>Field number for the "sum_of_squares" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 430 | public const int SumOfSquaresFieldNumber = 5; |
| 431 | private double sumOfSquares_; |
| 432 | public double SumOfSquares { |
| 433 | get { return sumOfSquares_; } |
| 434 | set { |
| 435 | sumOfSquares_ = value; |
| 436 | } |
| 437 | } |
| 438 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 439 | /// <summary>Field number for the "count" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 440 | public const int CountFieldNumber = 6; |
| 441 | private double count_; |
| 442 | public double Count { |
| 443 | get { return count_; } |
| 444 | set { |
| 445 | count_ = value; |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | public override bool Equals(object other) { |
| 450 | return Equals(other as HistogramData); |
| 451 | } |
| 452 | |
| 453 | public bool Equals(HistogramData other) { |
| 454 | if (ReferenceEquals(other, null)) { |
| 455 | return false; |
| 456 | } |
| 457 | if (ReferenceEquals(other, this)) { |
| 458 | return true; |
| 459 | } |
| 460 | if(!bucket_.Equals(other.bucket_)) return false; |
| 461 | if (MinSeen != other.MinSeen) return false; |
| 462 | if (MaxSeen != other.MaxSeen) return false; |
| 463 | if (Sum != other.Sum) return false; |
| 464 | if (SumOfSquares != other.SumOfSquares) return false; |
| 465 | if (Count != other.Count) return false; |
| 466 | return true; |
| 467 | } |
| 468 | |
| 469 | public override int GetHashCode() { |
| 470 | int hash = 1; |
| 471 | hash ^= bucket_.GetHashCode(); |
| 472 | if (MinSeen != 0D) hash ^= MinSeen.GetHashCode(); |
| 473 | if (MaxSeen != 0D) hash ^= MaxSeen.GetHashCode(); |
| 474 | if (Sum != 0D) hash ^= Sum.GetHashCode(); |
| 475 | if (SumOfSquares != 0D) hash ^= SumOfSquares.GetHashCode(); |
| 476 | if (Count != 0D) hash ^= Count.GetHashCode(); |
| 477 | return hash; |
| 478 | } |
| 479 | |
| 480 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 481 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 482 | } |
| 483 | |
| 484 | public void WriteTo(pb::CodedOutputStream output) { |
| 485 | bucket_.WriteTo(output, _repeated_bucket_codec); |
| 486 | if (MinSeen != 0D) { |
| 487 | output.WriteRawTag(17); |
| 488 | output.WriteDouble(MinSeen); |
| 489 | } |
| 490 | if (MaxSeen != 0D) { |
| 491 | output.WriteRawTag(25); |
| 492 | output.WriteDouble(MaxSeen); |
| 493 | } |
| 494 | if (Sum != 0D) { |
| 495 | output.WriteRawTag(33); |
| 496 | output.WriteDouble(Sum); |
| 497 | } |
| 498 | if (SumOfSquares != 0D) { |
| 499 | output.WriteRawTag(41); |
| 500 | output.WriteDouble(SumOfSquares); |
| 501 | } |
| 502 | if (Count != 0D) { |
| 503 | output.WriteRawTag(49); |
| 504 | output.WriteDouble(Count); |
| 505 | } |
| 506 | } |
| 507 | |
| 508 | public int CalculateSize() { |
| 509 | int size = 0; |
| 510 | size += bucket_.CalculateSize(_repeated_bucket_codec); |
| 511 | if (MinSeen != 0D) { |
| 512 | size += 1 + 8; |
| 513 | } |
| 514 | if (MaxSeen != 0D) { |
| 515 | size += 1 + 8; |
| 516 | } |
| 517 | if (Sum != 0D) { |
| 518 | size += 1 + 8; |
| 519 | } |
| 520 | if (SumOfSquares != 0D) { |
| 521 | size += 1 + 8; |
| 522 | } |
| 523 | if (Count != 0D) { |
| 524 | size += 1 + 8; |
| 525 | } |
| 526 | return size; |
| 527 | } |
| 528 | |
| 529 | public void MergeFrom(HistogramData other) { |
| 530 | if (other == null) { |
| 531 | return; |
| 532 | } |
| 533 | bucket_.Add(other.bucket_); |
| 534 | if (other.MinSeen != 0D) { |
| 535 | MinSeen = other.MinSeen; |
| 536 | } |
| 537 | if (other.MaxSeen != 0D) { |
| 538 | MaxSeen = other.MaxSeen; |
| 539 | } |
| 540 | if (other.Sum != 0D) { |
| 541 | Sum = other.Sum; |
| 542 | } |
| 543 | if (other.SumOfSquares != 0D) { |
| 544 | SumOfSquares = other.SumOfSquares; |
| 545 | } |
| 546 | if (other.Count != 0D) { |
| 547 | Count = other.Count; |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | public void MergeFrom(pb::CodedInputStream input) { |
| 552 | uint tag; |
| 553 | while ((tag = input.ReadTag()) != 0) { |
| 554 | switch(tag) { |
| 555 | default: |
| 556 | input.SkipLastField(); |
| 557 | break; |
| 558 | case 10: |
| 559 | case 8: { |
| 560 | bucket_.AddEntriesFrom(input, _repeated_bucket_codec); |
| 561 | break; |
| 562 | } |
| 563 | case 17: { |
| 564 | MinSeen = input.ReadDouble(); |
| 565 | break; |
| 566 | } |
| 567 | case 25: { |
| 568 | MaxSeen = input.ReadDouble(); |
| 569 | break; |
| 570 | } |
| 571 | case 33: { |
| 572 | Sum = input.ReadDouble(); |
| 573 | break; |
| 574 | } |
| 575 | case 41: { |
| 576 | SumOfSquares = input.ReadDouble(); |
| 577 | break; |
| 578 | } |
| 579 | case 49: { |
| 580 | Count = input.ReadDouble(); |
| 581 | break; |
| 582 | } |
| 583 | } |
| 584 | } |
| 585 | } |
| 586 | |
| 587 | } |
| 588 | |
| 589 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 590 | public sealed partial class ClientStats : pb::IMessage<ClientStats> { |
| 591 | private static readonly pb::MessageParser<ClientStats> _parser = new pb::MessageParser<ClientStats>(() => new ClientStats()); |
| 592 | public static pb::MessageParser<ClientStats> Parser { get { return _parser; } } |
| 593 | |
| 594 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 595 | get { return global::Grpc.Testing.StatsReflection.Descriptor.MessageTypes[3]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 596 | } |
| 597 | |
| 598 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 599 | get { return Descriptor; } |
| 600 | } |
| 601 | |
| 602 | public ClientStats() { |
| 603 | OnConstruction(); |
| 604 | } |
| 605 | |
| 606 | partial void OnConstruction(); |
| 607 | |
| 608 | public ClientStats(ClientStats other) : this() { |
| 609 | Latencies = other.latencies_ != null ? other.Latencies.Clone() : null; |
| 610 | timeElapsed_ = other.timeElapsed_; |
| 611 | timeUser_ = other.timeUser_; |
| 612 | timeSystem_ = other.timeSystem_; |
| 613 | } |
| 614 | |
| 615 | public ClientStats Clone() { |
| 616 | return new ClientStats(this); |
| 617 | } |
| 618 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 619 | /// <summary>Field number for the "latencies" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 620 | public const int LatenciesFieldNumber = 1; |
| 621 | private global::Grpc.Testing.HistogramData latencies_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 622 | /// <summary> |
| 623 | /// Latency histogram. Data points are in nanoseconds. |
| 624 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 625 | public global::Grpc.Testing.HistogramData Latencies { |
| 626 | get { return latencies_; } |
| 627 | set { |
| 628 | latencies_ = value; |
| 629 | } |
| 630 | } |
| 631 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 632 | /// <summary>Field number for the "time_elapsed" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 633 | public const int TimeElapsedFieldNumber = 2; |
| 634 | private double timeElapsed_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 635 | /// <summary> |
| 636 | /// See ServerStats for details. |
| 637 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 638 | public double TimeElapsed { |
| 639 | get { return timeElapsed_; } |
| 640 | set { |
| 641 | timeElapsed_ = value; |
| 642 | } |
| 643 | } |
| 644 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 645 | /// <summary>Field number for the "time_user" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 646 | public const int TimeUserFieldNumber = 3; |
| 647 | private double timeUser_; |
| 648 | public double TimeUser { |
| 649 | get { return timeUser_; } |
| 650 | set { |
| 651 | timeUser_ = value; |
| 652 | } |
| 653 | } |
| 654 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 655 | /// <summary>Field number for the "time_system" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 656 | public const int TimeSystemFieldNumber = 4; |
| 657 | private double timeSystem_; |
| 658 | public double TimeSystem { |
| 659 | get { return timeSystem_; } |
| 660 | set { |
| 661 | timeSystem_ = value; |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | public override bool Equals(object other) { |
| 666 | return Equals(other as ClientStats); |
| 667 | } |
| 668 | |
| 669 | public bool Equals(ClientStats other) { |
| 670 | if (ReferenceEquals(other, null)) { |
| 671 | return false; |
| 672 | } |
| 673 | if (ReferenceEquals(other, this)) { |
| 674 | return true; |
| 675 | } |
| 676 | if (!object.Equals(Latencies, other.Latencies)) return false; |
| 677 | if (TimeElapsed != other.TimeElapsed) return false; |
| 678 | if (TimeUser != other.TimeUser) return false; |
| 679 | if (TimeSystem != other.TimeSystem) return false; |
| 680 | return true; |
| 681 | } |
| 682 | |
| 683 | public override int GetHashCode() { |
| 684 | int hash = 1; |
| 685 | if (latencies_ != null) hash ^= Latencies.GetHashCode(); |
| 686 | if (TimeElapsed != 0D) hash ^= TimeElapsed.GetHashCode(); |
| 687 | if (TimeUser != 0D) hash ^= TimeUser.GetHashCode(); |
| 688 | if (TimeSystem != 0D) hash ^= TimeSystem.GetHashCode(); |
| 689 | return hash; |
| 690 | } |
| 691 | |
| 692 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame^] | 693 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 694 | } |
| 695 | |
| 696 | public void WriteTo(pb::CodedOutputStream output) { |
| 697 | if (latencies_ != null) { |
| 698 | output.WriteRawTag(10); |
| 699 | output.WriteMessage(Latencies); |
| 700 | } |
| 701 | if (TimeElapsed != 0D) { |
| 702 | output.WriteRawTag(17); |
| 703 | output.WriteDouble(TimeElapsed); |
| 704 | } |
| 705 | if (TimeUser != 0D) { |
| 706 | output.WriteRawTag(25); |
| 707 | output.WriteDouble(TimeUser); |
| 708 | } |
| 709 | if (TimeSystem != 0D) { |
| 710 | output.WriteRawTag(33); |
| 711 | output.WriteDouble(TimeSystem); |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | public int CalculateSize() { |
| 716 | int size = 0; |
| 717 | if (latencies_ != null) { |
| 718 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Latencies); |
| 719 | } |
| 720 | if (TimeElapsed != 0D) { |
| 721 | size += 1 + 8; |
| 722 | } |
| 723 | if (TimeUser != 0D) { |
| 724 | size += 1 + 8; |
| 725 | } |
| 726 | if (TimeSystem != 0D) { |
| 727 | size += 1 + 8; |
| 728 | } |
| 729 | return size; |
| 730 | } |
| 731 | |
| 732 | public void MergeFrom(ClientStats other) { |
| 733 | if (other == null) { |
| 734 | return; |
| 735 | } |
| 736 | if (other.latencies_ != null) { |
| 737 | if (latencies_ == null) { |
| 738 | latencies_ = new global::Grpc.Testing.HistogramData(); |
| 739 | } |
| 740 | Latencies.MergeFrom(other.Latencies); |
| 741 | } |
| 742 | if (other.TimeElapsed != 0D) { |
| 743 | TimeElapsed = other.TimeElapsed; |
| 744 | } |
| 745 | if (other.TimeUser != 0D) { |
| 746 | TimeUser = other.TimeUser; |
| 747 | } |
| 748 | if (other.TimeSystem != 0D) { |
| 749 | TimeSystem = other.TimeSystem; |
| 750 | } |
| 751 | } |
| 752 | |
| 753 | public void MergeFrom(pb::CodedInputStream input) { |
| 754 | uint tag; |
| 755 | while ((tag = input.ReadTag()) != 0) { |
| 756 | switch(tag) { |
| 757 | default: |
| 758 | input.SkipLastField(); |
| 759 | break; |
| 760 | case 10: { |
| 761 | if (latencies_ == null) { |
| 762 | latencies_ = new global::Grpc.Testing.HistogramData(); |
| 763 | } |
| 764 | input.ReadMessage(latencies_); |
| 765 | break; |
| 766 | } |
| 767 | case 17: { |
| 768 | TimeElapsed = input.ReadDouble(); |
| 769 | break; |
| 770 | } |
| 771 | case 25: { |
| 772 | TimeUser = input.ReadDouble(); |
| 773 | break; |
| 774 | } |
| 775 | case 33: { |
| 776 | TimeSystem = input.ReadDouble(); |
| 777 | break; |
| 778 | } |
| 779 | } |
| 780 | } |
| 781 | } |
| 782 | |
| 783 | } |
| 784 | |
| 785 | #endregion |
| 786 | |
| 787 | } |
| 788 | |
| 789 | #endregion Designer generated code |