benchmark_message1_proto2.proto 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. // Protocol Buffers - Google's data interchange format
  2. // Copyright 2008 Google Inc. All rights reserved.
  3. // https://developers.google.com/protocol-buffers/
  4. //
  5. // Redistribution and use in source and binary forms, with or without
  6. // modification, are permitted provided that the following conditions are
  7. // met:
  8. //
  9. // * Redistributions of source code must retain the above copyright
  10. // notice, this list of conditions and the following disclaimer.
  11. // * Redistributions in binary form must reproduce the above
  12. // copyright notice, this list of conditions and the following disclaimer
  13. // in the documentation and/or other materials provided with the
  14. // distribution.
  15. // * Neither the name of Google Inc. nor the names of its
  16. // contributors may be used to endorse or promote products derived from
  17. // this software without specific prior written permission.
  18. //
  19. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  22. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  23. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  24. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  25. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  26. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  27. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  28. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  29. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30. // Benchmark messages for proto2.
  31. syntax = "proto2";
  32. package benchmarks.proto2;
  33. option java_package = "com.google.protobuf.benchmarks";
  34. // This is the default, but we specify it here explicitly.
  35. option optimize_for = SPEED;
  36. option cc_enable_arenas = true;
  37. message GoogleMessage1 {
  38. required string field1 = 1;
  39. optional string field9 = 9;
  40. optional string field18 = 18;
  41. optional bool field80 = 80 [default = false];
  42. optional bool field81 = 81 [default = true];
  43. required int32 field2 = 2;
  44. required int32 field3 = 3;
  45. optional int32 field280 = 280;
  46. optional int32 field6 = 6 [default = 0];
  47. optional int64 field22 = 22;
  48. optional string field4 = 4;
  49. repeated fixed64 field5 = 5;
  50. optional bool field59 = 59 [default = false];
  51. optional string field7 = 7;
  52. optional int32 field16 = 16;
  53. optional int32 field130 = 130 [default = 0];
  54. optional bool field12 = 12 [default = true];
  55. optional bool field17 = 17 [default = true];
  56. optional bool field13 = 13 [default = true];
  57. optional bool field14 = 14 [default = true];
  58. optional int32 field104 = 104 [default = 0];
  59. optional int32 field100 = 100 [default = 0];
  60. optional int32 field101 = 101 [default = 0];
  61. optional string field102 = 102;
  62. optional string field103 = 103;
  63. optional int32 field29 = 29 [default = 0];
  64. optional bool field30 = 30 [default = false];
  65. optional int32 field60 = 60 [default = -1];
  66. optional int32 field271 = 271 [default = -1];
  67. optional int32 field272 = 272 [default = -1];
  68. optional int32 field150 = 150;
  69. optional int32 field23 = 23 [default = 0];
  70. optional bool field24 = 24 [default = false];
  71. optional int32 field25 = 25 [default = 0];
  72. optional GoogleMessage1SubMessage field15 = 15;
  73. optional bool field78 = 78;
  74. optional int32 field67 = 67 [default = 0];
  75. optional int32 field68 = 68;
  76. optional int32 field128 = 128 [default = 0];
  77. optional string field129 = 129 [default = "xxxxxxxxxxxxxxxxxxxxx"];
  78. optional int32 field131 = 131 [default = 0];
  79. }
  80. message GoogleMessage1SubMessage {
  81. optional int32 field1 = 1 [default = 0];
  82. optional int32 field2 = 2 [default = 0];
  83. optional int32 field3 = 3 [default = 0];
  84. optional string field15 = 15;
  85. optional bool field12 = 12 [default = true];
  86. optional int64 field13 = 13;
  87. optional int64 field14 = 14;
  88. optional int32 field16 = 16;
  89. optional int32 field19 = 19 [default = 2];
  90. optional bool field20 = 20 [default = true];
  91. optional bool field28 = 28 [default = true];
  92. optional fixed64 field21 = 21;
  93. optional int32 field22 = 22;
  94. optional bool field23 = 23 [default = false];
  95. optional bool field206 = 206 [default = false];
  96. optional fixed32 field203 = 203;
  97. optional int32 field204 = 204;
  98. optional string field205 = 205;
  99. optional uint64 field207 = 207;
  100. optional uint64 field300 = 300;
  101. }