benchmark_message2.proto 4.0 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. // LINT: ALLOW_GROUPS
  31. // Benchmark messages for proto2.
  32. syntax = "proto2";
  33. package benchmarks.proto2;
  34. option java_package = "com.google.protobuf.benchmarks";
  35. // This is the default, but we specify it here explicitly.
  36. option optimize_for = SPEED;
  37. option cc_enable_arenas = true;
  38. message GoogleMessage2 {
  39. optional string field1 = 1;
  40. optional int64 field3 = 3;
  41. optional int64 field4 = 4;
  42. optional int64 field30 = 30;
  43. optional bool field75 = 75 [default = false];
  44. optional string field6 = 6;
  45. optional bytes field2 = 2;
  46. optional int32 field21 = 21 [default = 0];
  47. optional int32 field71 = 71;
  48. optional float field25 = 25;
  49. optional int32 field109 = 109 [default = 0];
  50. optional int32 field210 = 210 [default = 0];
  51. optional int32 field211 = 211 [default = 0];
  52. optional int32 field212 = 212 [default = 0];
  53. optional int32 field213 = 213 [default = 0];
  54. optional int32 field216 = 216 [default = 0];
  55. optional int32 field217 = 217 [default = 0];
  56. optional int32 field218 = 218 [default = 0];
  57. optional int32 field220 = 220 [default = 0];
  58. optional int32 field221 = 221 [default = 0];
  59. optional float field222 = 222 [default = 0.0];
  60. optional int32 field63 = 63;
  61. repeated group Group1 = 10 {
  62. required float field11 = 11;
  63. optional float field26 = 26;
  64. optional string field12 = 12;
  65. optional string field13 = 13;
  66. repeated string field14 = 14;
  67. required uint64 field15 = 15;
  68. optional int32 field5 = 5;
  69. optional string field27 = 27;
  70. optional int32 field28 = 28;
  71. optional string field29 = 29;
  72. optional string field16 = 16;
  73. repeated string field22 = 22;
  74. repeated int32 field73 = 73;
  75. optional int32 field20 = 20 [default = 0];
  76. optional string field24 = 24;
  77. optional GoogleMessage2GroupedMessage field31 = 31;
  78. }
  79. repeated string field128 = 128;
  80. optional int64 field131 = 131;
  81. repeated string field127 = 127;
  82. optional int32 field129 = 129;
  83. repeated int64 field130 = 130;
  84. optional bool field205 = 205 [default = false];
  85. optional bool field206 = 206 [default = false];
  86. }
  87. message GoogleMessage2GroupedMessage {
  88. optional float field1 = 1;
  89. optional float field2 = 2;
  90. optional float field3 = 3 [default = 0.0];
  91. optional bool field4 = 4;
  92. optional bool field5 = 5;
  93. optional bool field6 = 6 [default = true];
  94. optional bool field7 = 7 [default = false];
  95. optional float field8 = 8;
  96. optional bool field9 = 9;
  97. optional float field10 = 10;
  98. optional int64 field11 = 11;
  99. }