• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // <auto-generated>
2 //     Generated by the protocol buffer compiler.  DO NOT EDIT!
3 //     source: benchmarks.proto
4 // </auto-generated>
5 #pragma warning disable 1591, 0612, 3021
6 #region Designer generated code
7 
8 using pb = global::Google.Protobuf;
9 using pbc = global::Google.Protobuf.Collections;
10 using pbr = global::Google.Protobuf.Reflection;
11 using scg = global::System.Collections.Generic;
12 namespace Benchmarks {
13 
14   /// <summary>Holder for reflection information generated from benchmarks.proto</summary>
15   public static partial class BenchmarksReflection {
16 
17     #region Descriptor
18     /// <summary>File descriptor for benchmarks.proto</summary>
19     public static pbr::FileDescriptor Descriptor {
20       get { return descriptor; }
21     }
22     private static pbr::FileDescriptor descriptor;
23 
BenchmarksReflection()24     static BenchmarksReflection() {
25       byte[] descriptorData = global::System.Convert.FromBase64String(
26           string.Concat(
27             "ChBiZW5jaG1hcmtzLnByb3RvEgpiZW5jaG1hcmtzIkcKEEJlbmNobWFya0Rh",
28             "dGFzZXQSDAoEbmFtZRgBIAEoCRIUCgxtZXNzYWdlX25hbWUYAiABKAkSDwoH",
29             "cGF5bG9hZBgDIAMoDEIgCh5jb20uZ29vZ2xlLnByb3RvYnVmLmJlbmNobWFy",
30             "a3NiBnByb3RvMw=="));
31       descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
32           new pbr::FileDescriptor[] { },
33           new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
34             new pbr::GeneratedClrTypeInfo(typeof(global::Benchmarks.BenchmarkDataset), global::Benchmarks.BenchmarkDataset.Parser, new[]{ "Name", "MessageName", "Payload" }, null, null, null, null)
35           }));
36     }
37     #endregion
38 
39   }
40   #region Messages
41   public sealed partial class BenchmarkDataset : pb::IMessage<BenchmarkDataset> {
42     private static readonly pb::MessageParser<BenchmarkDataset> _parser = new pb::MessageParser<BenchmarkDataset>(() => new BenchmarkDataset());
43     private pb::UnknownFieldSet _unknownFields;
44     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
45     public static pb::MessageParser<BenchmarkDataset> Parser { get { return _parser; } }
46 
47     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
48     public static pbr::MessageDescriptor Descriptor {
49       get { return global::Benchmarks.BenchmarksReflection.Descriptor.MessageTypes[0]; }
50     }
51 
52     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
53     pbr::MessageDescriptor pb::IMessage.Descriptor {
54       get { return Descriptor; }
55     }
56 
57     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
BenchmarkDataset()58     public BenchmarkDataset() {
59       OnConstruction();
60     }
61 
OnConstruction()62     partial void OnConstruction();
63 
64     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
BenchmarkDataset(BenchmarkDataset other)65     public BenchmarkDataset(BenchmarkDataset other) : this() {
66       name_ = other.name_;
67       messageName_ = other.messageName_;
68       payload_ = other.payload_.Clone();
69       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
70     }
71 
72     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()73     public BenchmarkDataset Clone() {
74       return new BenchmarkDataset(this);
75     }
76 
77     /// <summary>Field number for the "name" field.</summary>
78     public const int NameFieldNumber = 1;
79     private string name_ = "";
80     /// <summary>
81     /// Name of the benchmark dataset.  This should be unique across all datasets.
82     /// Should only contain word characters: [a-zA-Z0-9_]
83     /// </summary>
84     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
85     public string Name {
86       get { return name_; }
87       set {
88         name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
89       }
90     }
91 
92     /// <summary>Field number for the "message_name" field.</summary>
93     public const int MessageNameFieldNumber = 2;
94     private string messageName_ = "";
95     /// <summary>
96     /// Fully-qualified name of the protobuf message for this dataset.
97     /// It will be one of the messages defined benchmark_messages_proto2.proto
98     /// or benchmark_messages_proto3.proto.
99     ///
100     /// Implementations that do not support reflection can implement this with
101     /// an explicit "if/else" chain that lists every known message defined
102     /// in those files.
103     /// </summary>
104     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
105     public string MessageName {
106       get { return messageName_; }
107       set {
108         messageName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
109       }
110     }
111 
112     /// <summary>Field number for the "payload" field.</summary>
113     public const int PayloadFieldNumber = 3;
114     private static readonly pb::FieldCodec<pb::ByteString> _repeated_payload_codec
115         = pb::FieldCodec.ForBytes(26);
116     private readonly pbc::RepeatedField<pb::ByteString> payload_ = new pbc::RepeatedField<pb::ByteString>();
117     /// <summary>
118     /// The payload(s) for this dataset.  They should be parsed or serialized
119     /// in sequence, in a loop, ie.
120     ///
121     ///  while (!benchmarkDone) {  // Benchmark runner decides when to exit.
122     ///    for (i = 0; i &lt; benchmark.payload.length; i++) {
123     ///      parse(benchmark.payload[i])
124     ///    }
125     ///  }
126     ///
127     /// This is intended to let datasets include a variety of data to provide
128     /// potentially more realistic results than just parsing the same message
129     /// over and over.  A single message parsed repeatedly could yield unusually
130     /// good branch prediction performance.
131     /// </summary>
132     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
133     public pbc::RepeatedField<pb::ByteString> Payload {
134       get { return payload_; }
135     }
136 
137     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)138     public override bool Equals(object other) {
139       return Equals(other as BenchmarkDataset);
140     }
141 
142     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(BenchmarkDataset other)143     public bool Equals(BenchmarkDataset other) {
144       if (ReferenceEquals(other, null)) {
145         return false;
146       }
147       if (ReferenceEquals(other, this)) {
148         return true;
149       }
150       if (Name != other.Name) return false;
151       if (MessageName != other.MessageName) return false;
152       if(!payload_.Equals(other.payload_)) return false;
153       return Equals(_unknownFields, other._unknownFields);
154     }
155 
156     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()157     public override int GetHashCode() {
158       int hash = 1;
159       if (Name.Length != 0) hash ^= Name.GetHashCode();
160       if (MessageName.Length != 0) hash ^= MessageName.GetHashCode();
161       hash ^= payload_.GetHashCode();
162       if (_unknownFields != null) {
163         hash ^= _unknownFields.GetHashCode();
164       }
165       return hash;
166     }
167 
168     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()169     public override string ToString() {
170       return pb::JsonFormatter.ToDiagnosticString(this);
171     }
172 
173     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)174     public void WriteTo(pb::CodedOutputStream output) {
175       if (Name.Length != 0) {
176         output.WriteRawTag(10);
177         output.WriteString(Name);
178       }
179       if (MessageName.Length != 0) {
180         output.WriteRawTag(18);
181         output.WriteString(MessageName);
182       }
183       payload_.WriteTo(output, _repeated_payload_codec);
184       if (_unknownFields != null) {
185         _unknownFields.WriteTo(output);
186       }
187     }
188 
189     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()190     public int CalculateSize() {
191       int size = 0;
192       if (Name.Length != 0) {
193         size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
194       }
195       if (MessageName.Length != 0) {
196         size += 1 + pb::CodedOutputStream.ComputeStringSize(MessageName);
197       }
198       size += payload_.CalculateSize(_repeated_payload_codec);
199       if (_unknownFields != null) {
200         size += _unknownFields.CalculateSize();
201       }
202       return size;
203     }
204 
205     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(BenchmarkDataset other)206     public void MergeFrom(BenchmarkDataset other) {
207       if (other == null) {
208         return;
209       }
210       if (other.Name.Length != 0) {
211         Name = other.Name;
212       }
213       if (other.MessageName.Length != 0) {
214         MessageName = other.MessageName;
215       }
216       payload_.Add(other.payload_);
217       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
218     }
219 
220     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)221     public void MergeFrom(pb::CodedInputStream input) {
222       uint tag;
223       while ((tag = input.ReadTag()) != 0) {
224         switch(tag) {
225           default:
226             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
227             break;
228           case 10: {
229             Name = input.ReadString();
230             break;
231           }
232           case 18: {
233             MessageName = input.ReadString();
234             break;
235           }
236           case 26: {
237             payload_.AddEntriesFrom(input, _repeated_payload_codec);
238             break;
239           }
240         }
241       }
242     }
243 
244   }
245 
246   #endregion
247 
248 }
249 
250 #endregion Designer generated code
251