benchmark_message2.proto 4.0 KB

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